Hi,
I'm trying to create an interface along the lines of a database table admin, ie. list of columns, each has a name, datatype, and some custom fields dependant on the datatype. So in the XForms interface, an xforms:repeat is used to iterator over the columns definitions so that they can be added/deleted using xforms:insert/delete. Let say each column interface is simlar to: >>> Name: [ ... ] Datatype: [ ... ] Custom controls go here dependant on the datatype selected above <<< I'd like to load the custom controls from another file dependant on the selected type. Now I believe it should be possible to load the instance data for the custom fields, but can the actual xforms controls be loaded dynamically. Otherwise, I guess i'm going to have to resort to generating the form with XSLT and reload it everytime a column is added/delete, or follow some custom AJAX route. Cheers - Mark -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Mark,
You cannot dynamically add controls to an existing page with XForms. You can have controls that are non-relevant, i.e. not visible. See for example how the TODO Lists example: http://www.orbeon.com/ops/xforms-todo This works in many cases, and maybe you can use a similar strategy? -Erik Mark Gibson wrote: > Hi, > I'm trying to create an interface along the lines of a > database table admin, ie. list of columns, each has a > name, datatype, and some custom fields dependant on the > datatype. > > So in the XForms interface, an xforms:repeat is used > to iterator over the columns definitions so that they > can be added/deleted using xforms:insert/delete. > > Let say each column interface is simlar to: > > >>> > Name: [ ... ] Datatype: [ ... ] > > Custom controls go here dependant > on the datatype selected above > <<< > > I'd like to load the custom controls from another > file dependant on the selected type. > > Now I believe it should be possible to load the > instance data for the custom fields, but can the > actual xforms controls be loaded dynamically. > > Otherwise, I guess i'm going to have to resort > to generating the form with XSLT and reload it > everytime a column is added/delete, or follow > some custom AJAX route. > > Cheers > - Mark Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
I think it was Pascal that mentioned using iframes for dynamically adding controls and models. I was wondering whether that idea is working out?
Ross. On 03/05/06,
Erik Bruchez <[hidden email]> wrote:
Mark, -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
An iframe could possibly work, but at best like a separate XForms page.
Then the question is how you make the main page and the iframe communicate. Certainly, at the moment, the XForms engine is not able, at runtime, to integrate the contents of the iframe into the main page and run the result as a single XForms page. Theoretically, of course, adding controls at runtime to an XForms page is not an impossibility, but this is not covered by the spec right now. It could be implemented as an extension though. -Erik Ross Horne wrote: > I think it was Pascal that mentioned using iframes for dynamically > adding controls and models. I was wondering whether that idea is working > out? > > Ross. > > > On 03/05/06, * Erik Bruchez* <[hidden email] > <mailto:[hidden email]>> wrote: > > Mark, > > You cannot dynamically add controls to an existing page with XForms. You > can have controls that are non-relevant, i.e. not visible. See for > example how the TODO Lists example: > > http://www.orbeon.com/ops/xforms-todo > > This works in many cases, and maybe you can use a similar strategy? > > -Erik > > Mark Gibson wrote: > > Hi, > > I'm trying to create an interface along the lines of a > > database table admin, ie. list of columns, each has a > > name, datatype, and some custom fields dependant on the > > datatype. > > > > So in the XForms interface, an xforms:repeat is used > > to iterator over the columns definitions so that they > > can be added/deleted using xforms:insert/delete. > > > > Let say each column interface is simlar to: > > > > >>> > > Name: [ ... ] Datatype: [ ... ] > > > > Custom controls go here dependant > > on the datatype selected above > > <<< > > > > I'd like to load the custom controls from another > > file dependant on the selected type. > > > > Now I believe it should be possible to load the > > instance data for the custom fields, but can the > > actual xforms controls be loaded dynamically. > > > > Otherwise, I guess i'm going to have to resort > > to generating the form with XSLT and reload it > > everytime a column is added/delete, or follow > > some custom AJAX route. > > > > Cheers > > - Mark > > -- > Orbeon - XForms Everywhere: > http://www.orbeon.com/blog/ <http://www.orbeon.com/blog/> > > > > > -- > You receive this message as a subscriber of the > [hidden email] <mailto:[hidden email]> mailing list. > To unsubscribe: mailto: [hidden email] > <mailto:[hidden email]> > For general help: mailto:[hidden email] > <mailto:[hidden email]>?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > > > ------------------------------------------------------------------------ > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Ross Horne
Ross:
I've been successfully using iframe to load xforms dynamically through httprequest in a page. The only problem with this is that the interaction between the <iframe> and the wrapping browser window is a bit more tricky (but far from impossible). Work in progress can be seen at http://opendatafoundation.org/ops/ddi3/index The Document->Browse, Document->Upload, Document->Sandbox and User->Account command are all different xforms loading in an iframe element. The frame content is simply a stand alone xform. This might be a bit tricky in Mark's problem case but could work (each row in the table would then be an iframe). *P Ross Horne wrote: I think it was Pascal that mentioned using iframes for dynamically adding controls and models. I was wondering whether that idea is working out? -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
In reply to this post by Erik Bruchez
Erik:
an iframe can communicate with its parent through javascript This page provides a good explanation and examples: http://www.quirksmode.org/js/iframe.html *P Erik Bruchez wrote: An iframe could possibly work, but at best like a separate XForms page. Then the question is how you make the main page and the iframe communicate. Certainly, at the moment, the XForms engine is not able, at runtime, to integrate the contents of the iframe into the main page and run the result as a single XForms page. -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |