• Using the controls in another database

    By Phil Thain 1 decade ago

    I would like to use the XPages Mobile Controls in an existing application but I am having trouble working out exactly what components I need to take from MobileControls.nsf to make this work.

    For a start, am I being naïve in thinking that I can do this? So far I have imported dojo1.5 as described in the documentation and I have copied the custom controls from MobileControls.nsf.

    Please can you provide some pointers to help me leverage these controls in another application?

     

    • other db

      By Niklas Heidloff 1 decade ago

      Phil, you should copy the design elements from MobileControlsLite.nsf. But it's easier to use that db and point against your existing db for the data.

      • Using MobileControlsLite

        By Phil Thain 1 decade ago

        Thanks for that Niklas - MobileControlsLite is certainly a much better place to start.

        I am having trouble with accessing data from another database. To keep it simple, I copied the 'All' view to the other db changed the selection criteria and made sure that the columns were populated with data.

        Then in the ViewAndDocument Xpage I have edited the database name in the XML source for the xc:mView tag. The Xpage displays but all I get is the 'Loading...' message in the 'home mPage' when I preview the XPage in the browser.

        So I have a problem getting data from the view and even if it did work, It's not clear to me yet how the Custom Control accesses the document content from the view, because somehow I have to define which field I want the control to bind to in the target document so that I get some content. The documents in my application don't have the same fields as your lipsum test data documents.

        thx

        • myDocument

          By Niklas Heidloff 1 decade ago

          You need to change the db also in the document control in that xsp.

           

          And the document control (myXXX, not mXXX) is not generic. You have to customize it in the xsp code since every doc is different. The mDocumentContainer is generic and it handles things for documents that can be handled generically.

          • Thanks that really helped

            By Phil Thain 1 decade ago

            I have the basic framework working now.