Hello,
I've build a form and now in my model i have an type field. this can be to options, title or paragraph. Now i want to split this up in my form. The title field must be bold and the paragraph field should not. <field type="title"/> I tried to do this whith an if statement in the output. But when I do this it doesn't work. This is what I tried: <xforms:repeat nodeset="task" id="task"> <xhtml:p> <xforms:output value="if (@type = 'Title') then '<b>' else ''"/> <xforms:output value="if (@description = '') then 'No data... please fill in.' else (@description)" xhtml:size="30"/> <xforms:output value="if (@type = 'Title') then '</b>' else ''"/> </xhtml:p> </xforms:repeat> this outputs: <b>No data... please fill in.</b> but no bold text. Since I tried to use an switch in my repeat it didn't work either. What i read about XSL in my repeat doesn't work so i didn't even tried that. Are there any other options? Second i got the question if its possible to use an textarea in my repeat because that didn't work like i planned it either... :S it's pretty funny if it really workes :P Greetings Stefan -- 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
|
[hidden email] wrote:
> Hello, > > I've build a form and now in my model i have an type field. this can > be to options, title or paragraph. Now i want to split this up in my > form. The title field must be bold and the paragraph field should > not. > > <field type="title"/> > > I tried to do this whith an if statement in the output. But when I > do this it doesn't work. This is what I tried: > > <xforms:repeat nodeset="task" id="task"> > <xhtml:p> > <xforms:output value="if (@type = 'Title') then '<b>' else ''"/> > <xforms:output value="if (@description = '') then 'No data... please > fill in.' else (@description)" xhtml:size="30"/> > <xforms:output value="if (@type = 'Title') then '</b>' else ''"/> > </xhtml:p> > </xforms:repeat> > > this outputs: <b>No data... please fill in.</b> but no bold text. > Since I tried to use an switch in my repeat it didn't work > either. What i read about XSL in my repeat doesn't work so i didn't > even tried that. Are there any other options? For now, there is no standard with in XForms to output HTML markup, so each XForms engine uses a "trick" to do this. OPS does it with the "appearance" attribute, like this: <xforms:output ref="some-ref" appearance="xxforms:html"/> See for example the XForms Controls and Flickr Spell examples for an illustration of this: http://www.orbeon.com/ops/goto-example/xforms-controls http://www.orbeon.com/ops/goto-example/flickr-spell Note that the XForms 1.1 draft (now pretty old since it dates back to December 2004) proposes a new "mediatype" attribute on xforms:output, which could be used to present (X)HTML as well. > Second i got the question if its possible to use an textarea in my > repeat because that didn't work like i planned it either... There is a known bug with xforms:repeat: http://forge.objectweb.org/tracker/index.php?func=detail&aid=304112&group_id=168&atid=350207 Try putting everything in xhtml:tr for now, to see if it will work. -Erik -- 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 |