Administrator
|
Richard,
You can style your input controls by using CSS rules like: .myclass input { ... } For examples of this, look at style.css here: http://www.orbeon.com/ops/ -Erik Richard Braman wrote: > After some more looking around I noticed that your code created span > tags around all of my xforms inputs once they are rendered to HTML. > Span cannot control an input, which is why my style tags are being > ignored. > > -----Original Message----- > From: Richard Braman [mailto:[hidden email]] > Sent: Thursday, February 09, 2006 1:28 PM > To: [hidden email] > Subject: RE: [ops-users] x:forms:bind and xforms:model > > > It is also rendering check boxes as text. > > -----Original Message----- > From: Richard Braman [mailto:[hidden email]] > Sent: Thursday, February 09, 2006 12:54 PM > To: [hidden email] > Subject: RE: [ops-users] x:forms:bind and xforms:model > > > OK I got it to work with xform:bind > http://24.75.221.234:8080/taxcode/1040ez > The only problem is that it looks like Xforms bind is doing client side > recalculations. It my architecture these things are supposed to happen > on the server. It is also chainging the style of the form from what it > was with ref, and ingnoring the styles that I have set up. > > > -----Original Message----- > From: Richard Braman [mailto:[hidden email]] > Sent: Wednesday, February 08, 2006 1:49 PM > To: '[hidden email]' > Subject: RE: [ops-users] x:forms:bind and xforms:model > > > oxf:/xforms/f1040ez.xml returns > Cannot load "/xforms/f1040ez.xml" with webapp loader. > > I don't think that url will serve > http://24.75.221.234:8080/taxcode/1040ez > The file is located in a xforms directory under ops/examples/1040ez/ > > > -----Original Message----- > From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez > Sent: Wednesday, February 08, 2006 10:24 AM > To: [hidden email] > Subject: Re: [ops-users] x:forms:bind and xforms:model > > > Try using src="oxf:/xforms/f1040ez.xml" instead. Those URLs are now > resolved relative to the external request URL, i.e. the HTTP URL. > > -Erik > > Richard Braman wrote: >> I have reproduced snippets from my code. This code throws a response >> cannot be null error in xForms-epilogue.xpl line 81. I don't really >> understand the syntax, because if it was the way understand it, it >> would work :) >> >> Here is my view: >> >> <html> >> <head> >> <title>Form 1040 EZ 2005</title> >> <xforms:model> >> <xforms:instance id="main-instance" src="/xforms/f1040ez.xml"/> >> <xforms:bind id="f1-1" nodeset="/form/f1040ez/f1-1"></xforms:bind> >> </xforms:model> >> </head> >> <body bgcolor="#FFFFFF" text="#000000"> >> >> >> <xforms:input xhtml:type="text" bind="f1-1" >> xhtml:style="height:22px;width:209px;margin:0px;font-size:16px"/> >> >> </body> >> </html> >> >> ********************************** >> Here is my input instance in file /xforms/f1040ez.xml >> >> <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms"> >> <xforms:instance> >> <form> >> <f1040ez> >> <f1-1>first name</f1-1> >> </f1040ez> >> </form> >> </xforms:instance> >> <xforms:submission method="post"/> >> </xforms:model> >> >> >> -----Original Message----- >> From: Richard Braman [mailto:[hidden email]] >> Sent: Wednesday, February 08, 2006 9:28 AM >> To: [hidden email] >> Subject: RE: [ops-users] x:forms:bind and xforms:model >> >> >> I am trying to get my empty instance >> >> -----Original Message----- >> From: Ryan Puddephatt [mailto:[hidden email]] >> Sent: Wednesday, February 08, 2006 9:04 AM >> To: [hidden email] >> Subject: RE: [ops-users] x:forms:bind and xforms:model >> >> >> Richard, >> If your using the classic engine then the instance will be > defined in >> the page-flow, but if your using the NG engine, which it looks like >> your trying to! Then the instance is defined within the page. >> >> Ryan Puddephatt >> Software Engineer >> TFX Group - IT UK >> 1 Michaelson Square >> Livingston >> West Lothian >> Scotand >> EH54 7DP >> >> * [hidden email] >> ( 01506 407 110 >> 7 01506 407 108 >> Any ideas on What is src="input:instance" >> >>> -----Original Message----- >>> From: Richard Braman [mailto:[hidden email]] >>> Sent: 08 February 2006 13:46 >>> To: [hidden email] >>> Subject: RE: [ops-users] x:forms:bind and xforms:model >>> >>> What is src="input:instance" ? >>> I thought my src instance is specified in the page flow.... Is this >>> instance passed into the instance in the view? >>> >>> -----Original Message----- >>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik >>> Bruchez >>> Sent: Wednesday, February 08, 2006 8:45 AM >>> To: [hidden email] >>> Subject: Re: [ops-users] x:forms:bind and xforms:model >>> >>> >>> That goes under your /xhtml:html/xhtml:head in your page view, yes. >>> >>> -Erik >>> >>> Richard Braman wrote: >>>> Is thi syntax supported in3.0? Where would this code go, in the >>>> view? >>>> >>>> >>>> <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms"> >>>> >>>> <!--The actual XForms instance comes from the database --> >>>> >>>> <!--This syntax has yet to be supported by the server-side XForms >>>> processor --> >>>> >>>> <xforms:instance id="main-instance"src="input:instance"/> >>>> >>>> <!--Calculations --> >>>> >>>> <xforms:bind nodeset="/form/this/is/a/calculated/value1" >>>> calculate="sum(/form/some/repeated/values)"/> >>>> >>>> <xforms:bind nodeset="/form/this/is/a/calculated/@value2" >>>> calculate="if >>>> (/form/some/value gt 1000)then 100.0 else 200.0"/> ... >>>> >>>> </xforms:model> >>> >> >> >> >> >> >> >> >> ---------------------------------------------------------------------- >> -- >> >> >> -- >> 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 > > > > > > > > > > > ------------------------------------------------------------------------ > > > -- > 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 -- 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 Ryan Puddephatt
It seems when I switched to using x forms:bid, it sent tverything into
ajax. I see at least one issue with ajax. The code below seems to puts a span tag around the xforms input, which doesn't work on IE. What if I don't want to use AJAX? I am trying to keep everything on the server and simple, as this is version 0.0. <xhtml:span> <xsl:copy-of select="xxforms:copy-attributes(., ('xforms-control', 'xforms-input'), $id)"/> <!-- Output for formatted date --> <xhtml:span> <xsl:variable name="showcalendar-readonly-class" as="xs:string?" select="if ($is-readonly) then 'xforms-readonly' else ()"/> <xsl:copy-of select="xxforms:copy-attributes(., ('xforms-date-display', $showcalendar-readonly-class), ())"/> <xsl:if test="$is-date-or-time"> <xsl:value-of select="xxforms:control($id)/@display-value"/> </xsl:if> </xhtml:span> <!-- Input field --> <xhtml:input type="text" name="{$id}" value="{if ($generate-template) then '' else xxforms:control($id)}"> <xsl:if test="not($generate-template) and xxforms:control($id)/@readonly = 'true'"> <xsl:attribute name="disabled">disabled</xsl:attribute> </xsl:if> <xsl:copy-of select="xxforms:copy-attributes(., ($type-class), ())"/> </xhtml:input> -----Original Message----- From: Ryan Puddephatt [mailto:[hidden email]] Sent: Wednesday, February 08, 2006 10:31 AM To: [hidden email] Subject: RE: [ops-users] x:forms:bind and xforms:model Sorry just seen the instance, that should work! Ryan Puddephatt Software Engineer TFX Group - IT UK 1 Michaelson Square Livingston West Lothian Scotand EH54 7DP * [hidden email] ( 01506 407 110 7 01506 407 108 >-----Original Message----- >From: Ryan Puddephatt [mailto:[hidden email]] >Sent: 08 February 2006 15:24 >To: [hidden email] >Subject: RE: [ops-users] x:forms:bind and xforms:model > >What is the structure of the src file f1040ez.xml? has it got a root >node <form> or <f1040ex>? > >Try the following > ><html> ><head> > <title>Form 1040 EZ 2005</title> > <xforms:model> > <xforms:instance id="main-instance" src="/xforms/f1040ez.xml"/> > </xforms:model> ></head> > <body bgcolor="#FFFFFF" text="#000000"> > <xforms:input xhtml:type="text" ref="/form/f1040/f1-1" > xhtml:style="height:22px;width:209px;margin:0px;font- >size:16px"/> > </body> ></html> > >Ryan Puddephatt >Software Engineer >TFX Group - IT UK >1 Michaelson Square >Livingston >West Lothian >Scotand >EH54 7DP > >* [hidden email] >( 01506 407 110 >7 01506 407 108 > > >>-----Original Message----- >>From: Richard Braman [mailto:[hidden email]] >>Sent: 08 February 2006 15:07 >>To: [hidden email] >>Subject: RE: [ops-users] x:forms:bind and xforms:model >> >>I have reproduced snippets from my code. This code throws a response >>cannot be null error in xForms-epilogue.xpl line 81. I don't really >>understand the syntax, because if it was the way understand it, it >>would work :) >> >>Here is my view: >> >><html> >><head> >> <title>Form 1040 EZ 2005</title> >><xforms:model> >><xforms:instance id="main-instance" src="/xforms/f1040ez.xml"/> >><xforms:bind id="f1-1" nodeset="/form/f1040ez/f1-1"></xforms:bind> >></xforms:model> >></head> >> <body bgcolor="#FFFFFF" text="#000000"> >> >> >> <xforms:input xhtml:type="text" bind="f1-1" >>xhtml:style="height:22px;width:209px;margin:0px;font-size:16px"/> >> >> </body> >></html> >> >>********************************** >>Here is my input instance in file /xforms/f1040ez.xml >> >><xforms:model xmlns:xforms="http://www.w3.org/2002/xforms"> >> <xforms:instance> >> <form> >> <f1040ez> >> <f1-1>first name</f1-1> >> </f1040ez> >> </form> >> </xforms:instance> >> <xforms:submission method="post"/> >></xforms:model> >> >> >>-----Original Message----- >>From: Richard Braman [mailto:[hidden email]] >>Sent: Wednesday, February 08, 2006 9:28 AM >>To: [hidden email] >>Subject: RE: [ops-users] x:forms:bind and xforms:model >> >> >>I am trying to get my empty instance >> >>-----Original Message----- >>From: Ryan Puddephatt [mailto:[hidden email]] >>Sent: Wednesday, February 08, 2006 9:04 AM >>To: [hidden email] >>Subject: RE: [ops-users] x:forms:bind and xforms:model >> >> >>Richard, >> If your using the classic engine then the instance will be >>the page-flow, but if your using the NG engine, which it looks like >>your trying to! Then the instance is defined within the page. >> >>Ryan Puddephatt >>Software Engineer >>TFX Group - IT UK >>1 Michaelson Square >>Livingston >>West Lothian >>Scotand >>EH54 7DP >> >>* [hidden email] >>( 01506 407 110 >>7 01506 407 108 >>Any ideas on What is src="input:instance" >> >>>-----Original Message----- >>>From: Richard Braman [mailto:[hidden email]] >>>Sent: 08 February 2006 13:46 >>>To: [hidden email] >>>Subject: RE: [ops-users] x:forms:bind and xforms:model >>> >>>What is src="input:instance" ? >>>I thought my src instance is specified in the page flow.... Is this >>>instance passed into the instance in the view? >>> >>>-----Original Message----- >>>From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik >>>Bruchez >>>Sent: Wednesday, February 08, 2006 8:45 AM >>>To: [hidden email] >>>Subject: Re: [ops-users] x:forms:bind and xforms:model >>> >>> >>>That goes under your /xhtml:html/xhtml:head in your page view, yes. >>> >>>-Erik >>> >>>Richard Braman wrote: >>>> Is thi syntax supported in3.0? Where would this code go, in the >>>> view? >>>> >>>> >>>> <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms"> >>>> >>>> <!--The actual XForms instance comes from the database --> >>>> >>>> <!--This syntax has yet to be supported by the server-side XForms >>>> processor --> >>>> >>>> <xforms:instance id="main-instance"src="input:instance"/> >>>> >>>> <!--Calculations --> >>>> >>>> <xforms:bind nodeset="/form/this/is/a/calculated/value1" >>>> calculate="sum(/form/some/repeated/values)"/> >>>> >>>> <xforms:bind nodeset="/form/this/is/a/calculated/@value2" >>>> calculate="if >>>> (/form/some/value gt 1000)then 100.0 else 200.0"/> ... >>>> >>>> </xforms:model> >>> >>> >>> >> >> >> >> >> >> > > -- 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
|
In reply to this post by Richard Braman
Richard,
> It is also rendering check boxes as text. This obviously does not happen by default. Did you make any change in your theme that could, for example, modify the generated xhtml:input fields? > The only problem is that it looks like Xforms bind is doing client side > recalculations. It my architecture these things are supposed to happen > on the server. Not sure what you mean here: surely we don't have any code doing client-side calculations! -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 |
In reply to this post by Erik Bruchez
I know how to style controls. That's not the issue. The issu s that my
inline input styles are being recrouted into a span tag which does not work. This seems to be happinign in the xforms to xhtml ajax code. -----Original Message----- From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez Sent: Thursday, February 09, 2006 2:33 PM To: [hidden email] Subject: Re: [ops-users] x:forms:bind and xforms:model Richard, You can style your input controls by using CSS rules like: .myclass input { ... } For examples of this, look at style.css here: http://www.orbeon.com/ops/ -Erik Richard Braman wrote: > After some more looking around I noticed that your code created span > tags around all of my xforms inputs once they are rendered to HTML. > Span cannot control an input, which is why my style tags are being > ignored. > > -----Original Message----- > From: Richard Braman [mailto:[hidden email]] > Sent: Thursday, February 09, 2006 1:28 PM > To: [hidden email] > Subject: RE: [ops-users] x:forms:bind and xforms:model > > > It is also rendering check boxes as text. > > -----Original Message----- > From: Richard Braman [mailto:[hidden email]] > Sent: Thursday, February 09, 2006 12:54 PM > To: [hidden email] > Subject: RE: [ops-users] x:forms:bind and xforms:model > > > OK I got it to work with xform:bind > http://24.75.221.234:8080/taxcode/1040ez > The only problem is that it looks like Xforms bind is doing client > side recalculations. It my architecture these things are supposed to > happen on the server. It is also chainging the style of the form from > what it was with ref, and ingnoring the styles that I have set up. > > > -----Original Message----- > From: Richard Braman [mailto:[hidden email]] > Sent: Wednesday, February 08, 2006 1:49 PM > To: '[hidden email]' > Subject: RE: [ops-users] x:forms:bind and xforms:model > > > oxf:/xforms/f1040ez.xml returns > Cannot load "/xforms/f1040ez.xml" with webapp loader. > > I don't think that url will serve > http://24.75.221.234:8080/taxcode/1040ez > The file is located in a xforms directory under ops/examples/1040ez/ > > > -----Original Message----- > From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik > Bruchez > Sent: Wednesday, February 08, 2006 10:24 AM > To: [hidden email] > Subject: Re: [ops-users] x:forms:bind and xforms:model > > > Try using src="oxf:/xforms/f1040ez.xml" instead. Those URLs are now > resolved relative to the external request URL, i.e. the HTTP URL. > > -Erik > > Richard Braman wrote: >> I have reproduced snippets from my code. This code throws a response >> cannot be null error in xForms-epilogue.xpl line 81. I don't really >> understand the syntax, because if it was the way understand it, it >> would work :) >> >> Here is my view: >> >> <html> >> <head> >> <title>Form 1040 EZ 2005</title> >> <xforms:model> >> <xforms:instance id="main-instance" src="/xforms/f1040ez.xml"/> >> <xforms:bind id="f1-1" nodeset="/form/f1040ez/f1-1"></xforms:bind> >> </xforms:model> >> </head> >> <body bgcolor="#FFFFFF" text="#000000"> >> >> >> <xforms:input xhtml:type="text" bind="f1-1" >> xhtml:style="height:22px;width:209px;margin:0px;font-size:16px"/> >> >> </body> >> </html> >> >> ********************************** >> Here is my input instance in file /xforms/f1040ez.xml >> >> <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms"> >> <xforms:instance> >> <form> >> <f1040ez> >> <f1-1>first name</f1-1> >> </f1040ez> >> </form> >> </xforms:instance> >> <xforms:submission method="post"/> >> </xforms:model> >> >> >> -----Original Message----- >> From: Richard Braman [mailto:[hidden email]] >> Sent: Wednesday, February 08, 2006 9:28 AM >> To: [hidden email] >> Subject: RE: [ops-users] x:forms:bind and xforms:model >> >> >> I am trying to get my empty instance >> >> -----Original Message----- >> From: Ryan Puddephatt [mailto:[hidden email]] >> Sent: Wednesday, February 08, 2006 9:04 AM >> To: [hidden email] >> Subject: RE: [ops-users] x:forms:bind and xforms:model >> >> >> Richard, >> If your using the classic engine then the instance will be > defined in >> the page-flow, but if your using the NG engine, which it looks like >> your trying to! Then the instance is defined within the page. >> >> Ryan Puddephatt >> Software Engineer >> TFX Group - IT UK >> 1 Michaelson Square >> Livingston >> West Lothian >> Scotand >> EH54 7DP >> >> * [hidden email] >> ( 01506 407 110 >> 7 01506 407 108 >> Any ideas on What is src="input:instance" >> >>> -----Original Message----- >>> From: Richard Braman [mailto:[hidden email]] >>> Sent: 08 February 2006 13:46 >>> To: [hidden email] >>> Subject: RE: [ops-users] x:forms:bind and xforms:model >>> >>> What is src="input:instance" ? >>> I thought my src instance is specified in the page flow.... Is this >>> instance passed into the instance in the view? >>> >>> -----Original Message----- >>> From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik >>> Bruchez >>> Sent: Wednesday, February 08, 2006 8:45 AM >>> To: [hidden email] >>> Subject: Re: [ops-users] x:forms:bind and xforms:model >>> >>> >>> That goes under your /xhtml:html/xhtml:head in your page view, yes. >>> >>> -Erik >>> >>> Richard Braman wrote: >>>> Is thi syntax supported in3.0? Where would this code go, in the >>>> view? >>>> >>>> >>>> <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms"> >>>> >>>> <!--The actual XForms instance comes from the database --> >>>> >>>> <!--This syntax has yet to be supported by the server-side XForms >>>> processor --> >>>> >>>> <xforms:instance id="main-instance"src="input:instance"/> >>>> >>>> <!--Calculations --> >>>> >>>> <xforms:bind nodeset="/form/this/is/a/calculated/value1" >>>> calculate="sum(/form/some/repeated/values)"/> >>>> >>>> <xforms:bind nodeset="/form/this/is/a/calculated/@value2" >>>> calculate="if >>>> (/form/some/value gt 1000)then 100.0 else 200.0"/> ... >>>> >>>> </xforms:model> >>> >> >> >> >> >> >> >> >> --------------------------------------------------------------------- >> - >> -- >> >> >> -- >> 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 > > > > > > > > > > > ---------------------------------------------------------------------- > -- > > > -- > 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: -- 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
I haven't changed anything.
-----Original Message----- From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez Sent: Thursday, February 09, 2006 2:36 PM To: [hidden email] Subject: Re: [ops-users] x:forms:bind and xforms:model Richard, > It is also rendering check boxes as text. This obviously does not happen by default. Did you make any change in your theme that could, for example, modify the generated xhtml:input fields? > The only problem is that it looks like Xforms bind is doing client > side recalculations. It my architecture these things are supposed to > happen on the server. Not sure what you mean here: surely we don't have any code doing client-side calculations! -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 |
Administrator
|
In reply to this post by Richard Braman
Richard Braman wrote:
> It seems when I switched to using x forms:bid, it sent tverything into > ajax. Not sure what you mean here. > I see at least one issue with ajax. The code below seems to puts a > span tag around the xforms input, which doesn't work on IE. Note that xforms-to-ajax-xhtml.xsl is no longer used: we should take it out of the code base (just did that in the CVS). The translation to HTML is now done natively in Java. This said, we do put <span> around <input>. But all the OPS examples do work with IE, and they too have <span> around <input>. What is the specific problem you are seeing? > What if I don't want to use AJAX? The only way for now is to use XForms Classic, but then you don't get any of the XForms improvements in OPS 3.0. In other words, you get fairly limited XForms support with Classic. -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 |
In reply to this post by Richard Braman
I don't know, I tried removing the ajax code, but am getting nowhere.
Maybe its not ajax, but if its not, I don't know where else to search. I just don't want the span tag holding tyle="height:22px;width:209px;margin:0px;font-size:16px. This should be in the input tag. This: <div style="position:absolute; left:110px; top:61px; width:209px; height:22px;"> <xforms:input pdf:x-position="202" pdf:y-position="1048" xhtml:type="text" bind="f1-1" xhtml:style="height:22px;width:209px;margin:0px;font-size:16px"/> </div> Is becoming this: <div style="position:absolute; left:110px; top:61px; width:209px; height:22px;"><span id="xforms-element-78" class="xforms-control xforms-input" type="text" style="height:22px;width:209px;margin:0px;font-size:16px"><span class="xforms-date-display"></span><input type="text" name="xforms-element-78" value="" class="xforms-input-input xforms-type-string"><span class="xforms-showcalendar xforms-type-string"></span></span><label class="xforms-alert xforms-alert-inactive" for="xforms-element-78"></label></div> -----Original Message----- From: Richard Braman [mailto:[hidden email]] Sent: Thursday, February 09, 2006 2:35 PM To: [hidden email] Subject: [ops-users] Does Xforms bind foce ajax It seems when I switched to using x forms:bid, it sent tverything into ajax. I see at least one issue with ajax. The code below seems to puts a span tag around the xforms input, which doesn't work on IE. What if I don't want to use AJAX? I am trying to keep everything on the server and simple, as this is version 0.0. <xhtml:span> <xsl:copy-of select="xxforms:copy-attributes(., ('xforms-control', 'xforms-input'), $id)"/> <!-- Output for formatted date --> <xhtml:span> <xsl:variable name="showcalendar-readonly-class" as="xs:string?" select="if ($is-readonly) then 'xforms-readonly' else ()"/> <xsl:copy-of select="xxforms:copy-attributes(., ('xforms-date-display', $showcalendar-readonly-class), ())"/> <xsl:if test="$is-date-or-time"> <xsl:value-of select="xxforms:control($id)/@display-value"/> </xsl:if> </xhtml:span> <!-- Input field --> <xhtml:input type="text" name="{$id}" value="{if ($generate-template) then '' else xxforms:control($id)}"> <xsl:if test="not($generate-template) and xxforms:control($id)/@readonly = 'true'"> <xsl:attribute name="disabled">disabled</xsl:attribute> </xsl:if> <xsl:copy-of select="xxforms:copy-attributes(., ($type-class), ())"/> </xhtml:input> -----Original Message----- From: Ryan Puddephatt [mailto:[hidden email]] Sent: Wednesday, February 08, 2006 10:31 AM To: [hidden email] Subject: RE: [ops-users] x:forms:bind and xforms:model Sorry just seen the instance, that should work! Ryan Puddephatt Software Engineer TFX Group - IT UK 1 Michaelson Square Livingston West Lothian Scotand EH54 7DP * [hidden email] ( 01506 407 110 7 01506 407 108 >-----Original Message----- >From: Ryan Puddephatt [mailto:[hidden email]] >Sent: 08 February 2006 15:24 >To: [hidden email] >Subject: RE: [ops-users] x:forms:bind and xforms:model > >What is the structure of the src file f1040ez.xml? has it got a root >node <form> or <f1040ex>? > >Try the following > ><html> ><head> > <title>Form 1040 EZ 2005</title> > <xforms:model> > <xforms:instance id="main-instance" src="/xforms/f1040ez.xml"/> > </xforms:model> ></head> > <body bgcolor="#FFFFFF" text="#000000"> > <xforms:input xhtml:type="text" ref="/form/f1040/f1-1" > xhtml:style="height:22px;width:209px;margin:0px;font- >size:16px"/> > </body> ></html> > >Ryan Puddephatt >Software Engineer >TFX Group - IT UK >1 Michaelson Square >Livingston >West Lothian >Scotand >EH54 7DP > >* [hidden email] >( 01506 407 110 >7 01506 407 108 > > >>-----Original Message----- >>From: Richard Braman [mailto:[hidden email]] >>Sent: 08 February 2006 15:07 >>To: [hidden email] >>Subject: RE: [ops-users] x:forms:bind and xforms:model >> >>I have reproduced snippets from my code. This code throws a response >>cannot be null error in xForms-epilogue.xpl line 81. I don't really >>understand the syntax, because if it was the way understand it, it >>would work :) >> >>Here is my view: >> >><html> >><head> >> <title>Form 1040 EZ 2005</title> >><xforms:model> >><xforms:instance id="main-instance" src="/xforms/f1040ez.xml"/> >><xforms:bind id="f1-1" nodeset="/form/f1040ez/f1-1"></xforms:bind> >></xforms:model> >></head> >> <body bgcolor="#FFFFFF" text="#000000"> >> >> >> <xforms:input xhtml:type="text" bind="f1-1" >>xhtml:style="height:22px;width:209px;margin:0px;font-size:16px"/> >> >> </body> >></html> >> >>********************************** >>Here is my input instance in file /xforms/f1040ez.xml >> >><xforms:model xmlns:xforms="http://www.w3.org/2002/xforms"> >> <xforms:instance> >> <form> >> <f1040ez> >> <f1-1>first name</f1-1> >> </f1040ez> >> </form> >> </xforms:instance> >> <xforms:submission method="post"/> >></xforms:model> >> >> >>-----Original Message----- >>From: Richard Braman [mailto:[hidden email]] >>Sent: Wednesday, February 08, 2006 9:28 AM >>To: [hidden email] >>Subject: RE: [ops-users] x:forms:bind and xforms:model >> >> >>I am trying to get my empty instance >> >>-----Original Message----- >>From: Ryan Puddephatt [mailto:[hidden email]] >>Sent: Wednesday, February 08, 2006 9:04 AM >>To: [hidden email] >>Subject: RE: [ops-users] x:forms:bind and xforms:model >> >> >>Richard, >> If your using the classic engine then the instance will be >>the page-flow, but if your using the NG engine, which it looks like >>your trying to! Then the instance is defined within the page. >> >>Ryan Puddephatt >>Software Engineer >>TFX Group - IT UK >>1 Michaelson Square >>Livingston >>West Lothian >>Scotand >>EH54 7DP >> >>* [hidden email] >>( 01506 407 110 >>7 01506 407 108 >>Any ideas on What is src="input:instance" >> >>>-----Original Message----- >>>From: Richard Braman [mailto:[hidden email]] >>>Sent: 08 February 2006 13:46 >>>To: [hidden email] >>>Subject: RE: [ops-users] x:forms:bind and xforms:model >>> >>>What is src="input:instance" ? >>>I thought my src instance is specified in the page flow.... Is this >>>instance passed into the instance in the view? >>> >>>-----Original Message----- >>>From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik >>>Bruchez >>>Sent: Wednesday, February 08, 2006 8:45 AM >>>To: [hidden email] >>>Subject: Re: [ops-users] x:forms:bind and xforms:model >>> >>> >>>That goes under your /xhtml:html/xhtml:head in your page view, yes. >>> >>>-Erik >>> >>>Richard Braman wrote: >>>> Is thi syntax supported in3.0? Where would this code go, in the >>>> view? >>>> >>>> >>>> <xforms:model xmlns:xforms="http://www.w3.org/2002/xforms"> >>>> >>>> <!--The actual XForms instance comes from the database --> >>>> >>>> <!--This syntax has yet to be supported by the server-side XForms >>>> processor --> >>>> >>>> <xforms:instance id="main-instance"src="input:instance"/> >>>> >>>> <!--Calculations --> >>>> >>>> <xforms:bind nodeset="/form/this/is/a/calculated/value1" >>>> calculate="sum(/form/some/repeated/values)"/> >>>> >>>> <xforms:bind nodeset="/form/this/is/a/calculated/@value2" >>>> calculate="if >>>> (/form/some/value gt 1000)then 100.0 else 200.0"/> ... >>>> >>>> </xforms:model> >>> >>> >>> >> >> >> >> >> >> > > -- 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
Span tags are meant to format text, not inputs.
please review the following code in IE and tell me what works: <html> <body> <form> <span style="font-size:11px;font-weight:bold"> <input type="text" name="doesnotwork"> </span> <input type="text" name="styley" style="font-size:11px;font-weight:bold"> </form> </body> </html> Putting this code in the native java is a buzkill. -----Original Message----- From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez Sent: Thursday, February 09, 2006 3:59 PM To: [hidden email] Subject: Re: [ops-users] Does Xforms bind foce ajax Richard Braman wrote: > It seems when I switched to using x forms:bid, it sent tverything into > ajax. Not sure what you mean here. > I see at least one issue with ajax. The code below seems to puts a > span tag around the xforms input, which doesn't work on IE. Note that xforms-to-ajax-xhtml.xsl is no longer used: we should take it out of the code base (just did that in the CVS). The translation to HTML is now done natively in Java. This said, we do put <span> around <input>. But all the OPS examples do work with IE, and they too have <span> around <input>. What is the specific problem you are seeing? > What if I don't want to use AJAX? The only way for now is to use XForms Classic, but then you don't get any of the XForms improvements in OPS 3.0. In other words, you get fairly limited XForms support with Classic. -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 |
In reply to this post by Erik Bruchez
When I was using <xforms:group> with
<xfrms:input ref="field"> instead of bind="field" it did not put the span around my input. Richard Braman mailto:[hidden email] 561.748.4002 (voice) http://www.taxcodesoftware.org Free Open Source Tax Software -----Original Message----- From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez Sent: Thursday, February 09, 2006 3:59 PM To: [hidden email] Subject: Re: [ops-users] Does Xforms bind foce ajax Richard Braman wrote: > It seems when I switched to using x forms:bid, it sent tverything into > ajax. Not sure what you mean here. > I see at least one issue with ajax. The code below seems to puts a > span tag around the xforms input, which doesn't work on IE. Note that xforms-to-ajax-xhtml.xsl is no longer used: we should take it out of the code base (just did that in the CVS). The translation to HTML is now done natively in Java. This said, we do put <span> around <input>. But all the OPS examples do work with IE, and they too have <span> around <input>. What is the specific problem you are seeing? > What if I don't want to use AJAX? The only way for now is to use XForms Classic, but then you don't get any of the XForms improvements in OPS 3.0. In other words, you get fairly limited XForms support with Classic. -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 |
Administrator
|
In reply to this post by Richard Braman
According to the HTML DTD:
<!ELEMENT (SUB|SUP) - - (%inline;)* -- subscript, superscript --> <!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;"> <!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON"> So it is perfectly legal to have an <input> inside a <span>. Of course styling the <span> is not equivalent to styling the <input>. Now back to your problem. Two things: 1. If most of your controls share styling attributes, you can use "class" as discussed earlier. 2. If you are looking to do absolute positioning, then positioning the <span> should work as well as positioning the <input>. 3. If really you want to move back the style to the <input>, you can do this with XSLT in theme.xsl. -Erik Richard Braman wrote: > Span tags are meant to format text, not inputs. > please review the following code in IE and tell me what works: > > <html> > <body> > <form> > <span style="font-size:11px;font-weight:bold"> > <input type="text" name="doesnotwork"> > </span> > <input type="text" name="styley" > style="font-size:11px;font-weight:bold"> > </form> > </body> > </html> > > Putting this code in the native java is a buzkill. > > -----Original Message----- > From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez > Sent: Thursday, February 09, 2006 3:59 PM > To: [hidden email] > Subject: Re: [ops-users] Does Xforms bind foce ajax > > > Richard Braman wrote: > > It seems when I switched to using x forms:bid, it sent tverything > into > ajax. > > Not sure what you mean here. > > > I see at least one issue with ajax. The code below seems to puts a >> span tag around the xforms input, which doesn't work on IE. > > Note that xforms-to-ajax-xhtml.xsl is no longer used: we should take it > out of the code base (just did that in the CVS). The translation to HTML > is now done natively in Java. > > This said, we do put <span> around <input>. But all the OPS examples do > work with IE, and they too have <span> around <input>. What is the > specific problem you are seeing? > > > What if I don't want to use AJAX? > > The only way for now is to use XForms Classic, but then you don't get > any of the XForms improvements in OPS 3.0. In other words, you get > fairly limited XForms support with Classic. > > -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 -- 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 |
What if the height,width,and font-size of each input tag are different.
I don't understand why the attributes of the <input> are being moved to the <span> by OPS. I don't understand the assumption that it is OK to move someones attributes from one tag to another. I also really don't understand what is accomplished by moving them. How can I fix this in theme.xsl? I rellay don't want to move them back because I never wanted them to move to begin with. -----Original Message----- From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez Sent: Thursday, February 09, 2006 6:57 PM To: [hidden email] Subject: Re: [ops-users] Does Xforms bind foce ajax According to the HTML DTD: <!ELEMENT (SUB|SUP) - - (%inline;)* -- subscript, superscript --> <!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;"> <!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON"> So it is perfectly legal to have an <input> inside a <span>. Of course styling the <span> is not equivalent to styling the <input>. Now back to your problem. Two things: 1. If most of your controls share styling attributes, you can use "class" as discussed earlier. 2. If you are looking to do absolute positioning, then positioning the <span> should work as well as positioning the <input>. 3. If really you want to move back the style to the <input>, you can do this with XSLT in theme.xsl. -Erik Richard Braman wrote: > Span tags are meant to format text, not inputs. > please review the following code in IE and tell me what works: > > <html> > <body> > <form> > <span style="font-size:11px;font-weight:bold"> > <input type="text" name="doesnotwork"> > </span> > <input type="text" name="styley" > style="font-size:11px;font-weight:bold"> > </form> > </body> > </html> > > Putting this code in the native java is a buzkill. > > -----Original Message----- > From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik > Bruchez > Sent: Thursday, February 09, 2006 3:59 PM > To: [hidden email] > Subject: Re: [ops-users] Does Xforms bind foce ajax > > > Richard Braman wrote: > > It seems when I switched to using x forms:bid, it sent tverything > into > ajax. > > Not sure what you mean here. > > > I see at least one issue with ajax. The code below seems to puts a >> span tag around the xforms input, which doesn't work on IE. > > Note that xforms-to-ajax-xhtml.xsl is no longer used: we should take > it out of the code base (just did that in the CVS). The translation to > HTML is now done natively in Java. > > This said, we do put <span> around <input>. But all the OPS examples > do work with IE, and they too have <span> around <input>. What is the > specific problem you are seeing? > > > What if I don't want to use AJAX? > > The only way for now is to use XForms Classic, but then you don't get > any of the XForms improvements in OPS 3.0. In other words, you get > fairly limited XForms support with Classic. > > -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: -- 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
|
In reply to this post by Richard Braman
Hi Richard,
Input form elements should always be in a span in the generated HTML. If you don't get this with some of your XForms code, please send us an example that shows this behavior and that we can run in the XForms sandbox. Alex On 2/9/06, Richard Braman <[hidden email]> wrote: > When I was using <xforms:group> with > <xfrms:input ref="field"> instead of bind="field" it did not put the > span around my input. > > Richard Braman > mailto:[hidden email] > 561.748.4002 (voice) > > http://www.taxcodesoftware.org > Free Open Source Tax Software > > > > -----Original Message----- > From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez > Sent: Thursday, February 09, 2006 3:59 PM > To: [hidden email] > Subject: Re: [ops-users] Does Xforms bind foce ajax > > > Richard Braman wrote: > > It seems when I switched to using x forms:bid, it sent tverything > into > ajax. > > Not sure what you mean here. > > > I see at least one issue with ajax. The code below seems to puts a > > span tag around the xforms input, which doesn't work on IE. > > Note that xforms-to-ajax-xhtml.xsl is no longer used: we should take it > out of the code base (just did that in the CVS). The translation to HTML > is now done natively in Java. > > This said, we do put <span> around <input>. But all the OPS examples do > work with IE, and they too have <span> around <input>. What is the > specific problem you are seeing? > > > What if I don't want to use AJAX? > > The only way for now is to use XForms Classic, but then you don't get > any of the XForms improvements in OPS 3.0. In other words, you get > fairly limited XForms support with Classic. > > -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 > > > -- Blog (XML, Web apps, Open Source): 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
That last post by Alex was a little off topic. I have spent the last
few posts asking about the behaviour is OPS that takes attribute in an input tag and puts it into a style tag. I think that an xforms tag should be rendered as an html input tag in any tranformation. If you want to put a <span> around it that's fine, but don't move the xforms style attribute into it. That doesn't make any real sense. The span tags DO NOT style input boxes, so why move the style tag that is found in an XForms input tag into a span tag? -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Alessandro Vernet Sent: Thursday, February 09, 2006 8:03 PM To: [hidden email] Subject: Re: [ops-users] Does Xforms bind foce ajax Hi Richard, Input form elements should always be in a span in the generated HTML. If you don't get this with some of your XForms code, please send us an example that shows this behavior and that we can run in the XForms sandbox. Alex On 2/9/06, Richard Braman <[hidden email]> wrote: > When I was using <xforms:group> with > <xfrms:input ref="field"> instead of bind="field" it did not put the > span around my input. > > Richard Braman > mailto:[hidden email] > 561.748.4002 (voice) > > http://www.taxcodesoftware.org > Free Open Source Tax Software > > > > -----Original Message----- > From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik > Bruchez > Sent: Thursday, February 09, 2006 3:59 PM > To: [hidden email] > Subject: Re: [ops-users] Does Xforms bind foce ajax > > > Richard Braman wrote: > > It seems when I switched to using x forms:bid, it sent tverything > into > ajax. > > Not sure what you mean here. > > > I see at least one issue with ajax. The code below seems to puts a > > span tag around the xforms input, which doesn't work on IE. > > Note that xforms-to-ajax-xhtml.xsl is no longer used: we should take > it out of the code base (just did that in the CVS). The translation to > HTML is now done natively in Java. > > This said, we do put <span> around <input>. But all the OPS examples > do work with IE, and they too have <span> around <input>. What is the > specific problem you are seeing? > > > What if I don't want to use AJAX? > > The only way for now is to use XForms Classic, but then you don't get > any of the XForms improvements in OPS 3.0. In other words, you get > fairly limited XForms support with Classic. > > -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: > > > -- Blog (XML, Web apps, Open Source): 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 |
Administrator
|
In reply to this post by Richard Braman
Hi Richard,
Since there is not a one to one mapping between XForms controls and HTML elements, XForms control are often rendered by putting together a number of HTML elements. This is the case for <xforms:input>, which appearance can change as runtime from an input field to a date picker, and vice versa. For instance, an <xforms:input> input is rendered as a span that contains an input form element, a span that contains the date selected with the date picker, and a span that contains an image you can click on to show the date picker. If in the XForms code we find a class or style attribute, on which one of those HTML elements should this attribute be copied? The answer is always going to be arbitrary because we don't know what you are trying to style. Should it be on the input form element, the image? We chose to consistently copy the style and class attributes on the container, in this case the span element. What about using a class on the input? E.g. <xforms:input class="large-input">. Then in CSS you do: .large-input input { my CSS that applies to the HTML input form element } Alex On 2/9/06, Richard Braman <[hidden email]> wrote: > What if the height,width,and font-size of each input tag are different. > I don't understand why the attributes of the <input> are being moved to > the <span> by OPS. I don't understand the assumption that it is OK to > move someones attributes from one tag to another. I also really don't > understand what is accomplished by moving them. How can I fix this in > theme.xsl? I rellay don't want to move them back because I never wanted > them to move to begin with. > > > -----Original Message----- > From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez > Sent: Thursday, February 09, 2006 6:57 PM > To: [hidden email] > Subject: Re: [ops-users] Does Xforms bind foce ajax > > > According to the HTML DTD: > > <!ELEMENT (SUB|SUP) - - (%inline;)* -- subscript, superscript --> > > <!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | > %formctrl;"> > > <!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON"> > > So it is perfectly legal to have an <input> inside a <span>. Of course > styling the <span> is not equivalent to styling the <input>. > > Now back to your problem. Two things: > > 1. If most of your controls share styling attributes, you can use > "class" as discussed earlier. > > 2. If you are looking to do absolute positioning, then positioning the > <span> should work as well as positioning the <input>. > > 3. If really you want to move back the style to the <input>, you can do > this with XSLT in theme.xsl. > > -Erik > > Richard Braman wrote: > > Span tags are meant to format text, not inputs. > > please review the following code in IE and tell me what works: > > > > <html> > > <body> > > <form> > > <span style="font-size:11px;font-weight:bold"> > > <input type="text" name="doesnotwork"> > > </span> > > <input type="text" name="styley" > > style="font-size:11px;font-weight:bold"> > > </form> > > </body> > > </html> > > > > Putting this code in the native java is a buzkill. > > > > -----Original Message----- > > From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik > > Bruchez > > Sent: Thursday, February 09, 2006 3:59 PM > > To: [hidden email] > > Subject: Re: [ops-users] Does Xforms bind foce ajax > > > > > > Richard Braman wrote: > > > It seems when I switched to using x forms:bid, it sent tverything > > into > ajax. > > > > Not sure what you mean here. > > > > > I see at least one issue with ajax. The code below seems to puts a > >> span tag around the xforms input, which doesn't work on IE. > > > > Note that xforms-to-ajax-xhtml.xsl is no longer used: we should take > > it out of the code base (just did that in the CVS). The translation to > > > HTML is now done natively in Java. > > > > This said, we do put <span> around <input>. But all the OPS examples > > do work with IE, and they too have <span> around <input>. What is the > > specific problem you are seeing? > > > > > What if I don't want to use AJAX? > > > > The only way for now is to use XForms Classic, but then you don't get > > any of the XForms improvements in OPS 3.0. In other words, you get > > fairly limited XForms support with Classic. > > > > -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 > > > > > > > > -- > 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 > > > -- Blog (XML, Web apps, Open Source): 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
In your solution I would need a different class for each input. Each
input has a different height, width, font size. I also speficied the input as type="text", which is not a date picker, but rather a text box. It is just as arbitrary to move my style to a span tag. If this were being done in XML, no problem to fix, but now its stuffed in with the native code. -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Alessandro Vernet Sent: Thursday, February 09, 2006 8:20 PM To: [hidden email] Subject: Re: [ops-users] Does Xforms bind foce ajax Hi Richard, Since there is not a one to one mapping between XForms controls and HTML elements, XForms control are often rendered by putting together a number of HTML elements. This is the case for <xforms:input>, which appearance can change as runtime from an input field to a date picker, and vice versa. For instance, an <xforms:input> input is rendered as a span that contains an input form element, a span that contains the date selected with the date picker, and a span that contains an image you can click on to show the date picker. If in the XForms code we find a class or style attribute, on which one of those HTML elements should this attribute be copied? The answer is always going to be arbitrary because we don't know what you are trying to style. Should it be on the input form element, the image? We chose to consistently copy the style and class attributes on the container, in this case the span element. What about using a class on the input? E.g. <xforms:input class="large-input">. Then in CSS you do: .large-input input { my CSS that applies to the HTML input form element } Alex On 2/9/06, Richard Braman <[hidden email]> wrote: > What if the height,width,and font-size of each input tag are > different. I don't understand why the attributes of the <input> are > being moved to the <span> by OPS. I don't understand the assumption > that it is OK to move someones attributes from one tag to another. I > also really don't understand what is accomplished by moving them. How > can I fix this in theme.xsl? I rellay don't want to move them back > because I never wanted them to move to begin with. > > > -----Original Message----- > From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik > Bruchez > Sent: Thursday, February 09, 2006 6:57 PM > To: [hidden email] > Subject: Re: [ops-users] Does Xforms bind foce ajax > > > According to the HTML DTD: > > <!ELEMENT (SUB|SUP) - - (%inline;)* -- subscript, superscript --> > > <!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | > %formctrl;"> > > <!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON"> > > So it is perfectly legal to have an <input> inside a <span>. Of course > styling the <span> is not equivalent to styling the <input>. > > Now back to your problem. Two things: > > 1. If most of your controls share styling attributes, you can use > "class" as discussed earlier. > > 2. If you are looking to do absolute positioning, then positioning the > <span> should work as well as positioning the <input>. > > 3. If really you want to move back the style to the <input>, you can > do this with XSLT in theme.xsl. > > -Erik > > Richard Braman wrote: > > Span tags are meant to format text, not inputs. > > please review the following code in IE and tell me what works: > > > > <html> > > <body> > > <form> > > <span style="font-size:11px;font-weight:bold"> > > <input type="text" name="doesnotwork"> > > </span> > > <input type="text" name="styley" > > style="font-size:11px;font-weight:bold"> > > </form> > > </body> > > </html> > > > > Putting this code in the native java is a buzkill. > > > > -----Original Message----- > > From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik > > Bruchez > > Sent: Thursday, February 09, 2006 3:59 PM > > To: [hidden email] > > Subject: Re: [ops-users] Does Xforms bind foce ajax > > > > > > Richard Braman wrote: > > > It seems when I switched to using x forms:bid, it sent tverything > > into > ajax. > > > > Not sure what you mean here. > > > > > I see at least one issue with ajax. The code below seems to puts > > a > >> span tag around the xforms input, which doesn't work on IE. > > > > Note that xforms-to-ajax-xhtml.xsl is no longer used: we should take > > it out of the code base (just did that in the CVS). The translation > > to > > > HTML is now done natively in Java. > > > > This said, we do put <span> around <input>. But all the OPS examples > > do work with IE, and they too have <span> around <input>. What is > > the specific problem you are seeing? > > > > > What if I don't want to use AJAX? > > > > The only way for now is to use XForms Classic, but then you don't > > get any of the XForms improvements in OPS 3.0. In other words, you > > get fairly limited XForms support with Classic. > > > > -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 > > > > > > > > -- > 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: > > > -- Blog (XML, Web apps, Open Source): 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 |
Aside form my styling problem the other thing I don't get is how:
<div style="position:absolute; left:615px; top:218px; width:13px; height:14px;"> <xforms:input pdf:x-position="707" pdf:y-position="891" xhtml:type="checkbox" bind="c1-1" xhtml:style="height:14px;width:13px;margin:0px;font-size:10px"/> </div> Becomes: <div style="position:absolute; left:615px; top:218px; width:13px; height:14px;"> <span id="xforms-element-93" class="xforms-control xforms-input" type="checkbox" style="height:14px;width:13px;margin:0px;font-size:10px"><span class="xforms-date-display"></span> <input type="text" name="xforms-element-93" value="" class="xforms-input-input xforms-type-string"> <span class="xforms-showcalendar xforms-type-string"></span></span> <label class="xforms-alert xforms-alert-inactive" for="xforms-element-93"></label></div> Also , why is there this code, which I don't want or need. I am not tring to show a calendar. <span class="xforms-showcalendar xforms-type-string"></span> <span class="xforms-date-display"></span> -----Original Message----- From: Richard Braman [mailto:[hidden email]] Sent: Thursday, February 09, 2006 8:17 PM To: [hidden email] Subject: RE: [ops-users] Does Xforms bind foce ajax In your solution I would need a different class for each input. Each input has a different height, width, font size. I also speficied the input as type="text", which is not a date picker, but rather a text box. It is just as arbitrary to move my style to a span tag. If this were being done in XML, no problem to fix, but now its stuffed in with the native code. -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Alessandro Vernet Sent: Thursday, February 09, 2006 8:20 PM To: [hidden email] Subject: Re: [ops-users] Does Xforms bind foce ajax Hi Richard, Since there is not a one to one mapping between XForms controls and HTML elements, XForms control are often rendered by putting together a number of HTML elements. This is the case for <xforms:input>, which appearance can change as runtime from an input field to a date picker, and vice versa. For instance, an <xforms:input> input is rendered as a span that contains an input form element, a span that contains the date selected with the date picker, and a span that contains an image you can click on to show the date picker. If in the XForms code we find a class or style attribute, on which one of those HTML elements should this attribute be copied? The answer is always going to be arbitrary because we don't know what you are trying to style. Should it be on the input form element, the image? We chose to consistently copy the style and class attributes on the container, in this case the span element. What about using a class on the input? E.g. <xforms:input class="large-input">. Then in CSS you do: .large-input input { my CSS that applies to the HTML input form element } Alex On 2/9/06, Richard Braman <[hidden email]> wrote: > What if the height,width,and font-size of each input tag are > different. I don't understand why the attributes of the <input> are > being moved to the <span> by OPS. I don't understand the assumption > that it is OK to move someones attributes from one tag to another. I > also really don't understand what is accomplished by moving them. How > can I fix this in theme.xsl? I rellay don't want to move them back > because I never wanted them to move to begin with. > > > -----Original Message----- > From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik > Bruchez > Sent: Thursday, February 09, 2006 6:57 PM > To: [hidden email] > Subject: Re: [ops-users] Does Xforms bind foce ajax > > > According to the HTML DTD: > > <!ELEMENT (SUB|SUP) - - (%inline;)* -- subscript, superscript --> > > <!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | > %formctrl;"> > > <!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON"> > > So it is perfectly legal to have an <input> inside a <span>. Of course > styling the <span> is not equivalent to styling the <input>. > > Now back to your problem. Two things: > > 1. If most of your controls share styling attributes, you can use > "class" as discussed earlier. > > 2. If you are looking to do absolute positioning, then positioning the > <span> should work as well as positioning the <input>. > > 3. If really you want to move back the style to the <input>, you can > do this with XSLT in theme.xsl. > > -Erik > > Richard Braman wrote: > > Span tags are meant to format text, not inputs. > > please review the following code in IE and tell me what works: > > > > <html> > > <body> > > <form> > > <span style="font-size:11px;font-weight:bold"> > > <input type="text" name="doesnotwork"> > > </span> > > <input type="text" name="styley" > > style="font-size:11px;font-weight:bold"> > > </form> > > </body> > > </html> > > > > Putting this code in the native java is a buzkill. > > > > -----Original Message----- > > From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik > > Bruchez > > Sent: Thursday, February 09, 2006 3:59 PM > > To: [hidden email] > > Subject: Re: [ops-users] Does Xforms bind foce ajax > > > > > > Richard Braman wrote: > > > It seems when I switched to using x forms:bid, it sent tverything > > into > ajax. > > > > Not sure what you mean here. > > > > > I see at least one issue with ajax. The code below seems to puts > > a > >> span tag around the xforms input, which doesn't work on IE. > > > > Note that xforms-to-ajax-xhtml.xsl is no longer used: we should take > > it out of the code base (just did that in the CVS). The translation > > to > > > HTML is now done natively in Java. > > > > This said, we do put <span> around <input>. But all the OPS examples > > do work with IE, and they too have <span> around <input>. What is > > the specific problem you are seeing? > > > > > What if I don't want to use AJAX? > > > > The only way for now is to use XForms Classic, but then you don't > > get any of the XForms improvements in OPS 3.0. In other words, you > > get fairly limited XForms support with Classic. > > > > -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 > > > > > > > > -- > 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: > > > -- Blog (XML, Web apps, Open Source): 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 |
Administrator
|
In reply to this post by Richard Braman
Technically, nothing is "moved": it just happens that the element is
called xhtml:input in XHTML, and xforms:input in XForms, and that they have a similar function. However, they are different elements. An xforms:input, in particular, can be rendered in ways different than an HTML input element: it can end up being a date picker, or be one of those "edit in place" widgets. This is even clearer if you look at xforms:select1, which does not have the same name in HTML, or xforms:range, which does not even have an equivalent in HTML. In order to be consistent, we have decided that whenever possible, the HTML "translation" of XForms controls would be encapsulated within a <span> with the id of the respective XForms control, and that the extra HTML attributes present on the XForms control would be copied to that <span> element as well. As you have seen, this is not without problems when it comes to styling, but we don't think it is necessarily a bad solution. Styling in XForms, to be done perfectly right, would in fact require being able to address the XForms elements directly and perform a translation of CSS styles and rules to apply to the translated HTML elements that make the most sense. As to theme.xsl, something like this should do: <xsl:template match="xhtml:span[contains(@class, 'xforms-input') and xhtml:input]"> <xsl:copy> <xsl:copy-of select="@* except @style"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="xhtml:input[parent::xhtml:span[contains(@class, 'xforms-input')]]"> <xsl:copy> <xsl:copy-of select="(@*, ../@style)"/> <xsl:apply-templates/> </xsl:copy> </xsl:template> -Erik Richard Braman wrote: > What if the height,width,and font-size of each input tag are different. > I don't understand why the attributes of the <input> are being moved to > the <span> by OPS. I don't understand the assumption that it is OK to > move someones attributes from one tag to another. I also really don't > understand what is accomplished by moving them. How can I fix this in > theme.xsl? I rellay don't want to move them back because I never wanted > them to move to begin with. -- 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 Richard Braman
Hi Richard - I think Alex explained why the style attribute is placed in
the wrapping span: because an xforms:input can result in *many* HTML elements being generated, not just a single xhtml:input. If an xforms:input results in 3 xhtml elements being generated (for example), which of these should the style attribute being assigned to? It's easiest just consistently apply them to the containing span, then if required this can be used as a reference to apply styles to the child elements, such as the xhtml:input. Adrian Richard Braman wrote: > That last post by Alex was a little off topic. I have spent the last > few posts asking about the behaviour is OPS that takes attribute in an > input tag and puts it into a style tag. I think that an xforms tag > should be rendered as an html input tag in any tranformation. If you > want to put a <span> around it that's fine, but don't move the xforms > style attribute into it. That doesn't make any real sense. The > span tags DO NOT style input boxes, so why move the style tag that is > found in an XForms input tag into a span tag? > > -- 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 Richard Braman
Having a different class for each input isn't necessarily a bad
solution: it keeps your XForms markup simpler and uncluttered with styling details, and makes it easier to share a consistent appearance across your forms. Richard Braman wrote: > In your solution I would need a different class for each input. Each > input has a different height, width, font size. > I also speficied the input as type="text", which is not a date picker, > but rather a text box. It is just as arbitrary to move > my style to a span tag. If this were being done in XML, no problem to > fix, but now its stuffed in with the native code. -- 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
|
In reply to this post by Richard Braman
You have to understand that there is a translation from XForms to XHTML
which is taking place here. Each XForms control generates "a bunch" of XHTML elements that are useful to render the control and that also allow client-side code to discover the controls. The generated HTML may or may not match your expectations, but in general, there is a good rationale. For example, the type of an input field can change at runtime, from xs:string to xs:date for example, and from an input field become a date picker. The server-side code currently places placeholders in place for that this scenario. This could certainly be optimized, but for now it works and in general the extra elements are of no consequence. -Erik Richard Braman wrote: > Aside form my styling problem the other thing I don't get is how: > > <div style="position:absolute; left:615px; top:218px; > width:13px; height:14px;"> > <xforms:input pdf:x-position="707" > pdf:y-position="891" xhtml:type="checkbox" bind="c1-1" > xhtml:style="height:14px;width:13px;margin:0px;font-size:10px"/> > </div> > > Becomes: > <div style="position:absolute; left:615px; top:218px; width:13px; > height:14px;"> > <span id="xforms-element-93" class="xforms-control xforms-input" > type="checkbox" > style="height:14px;width:13px;margin:0px;font-size:10px"><span > class="xforms-date-display"></span> > <input type="text" name="xforms-element-93" value="" > class="xforms-input-input xforms-type-string"> > <span class="xforms-showcalendar xforms-type-string"></span></span> > <label class="xforms-alert xforms-alert-inactive" > for="xforms-element-93"></label></div> > > Also , why is there this code, which I don't want or need. I am not > tring to show a calendar. > <span class="xforms-showcalendar xforms-type-string"></span> > <span class="xforms-date-display"></span> -- 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 |