Hi Anyone could help me with that issue? Now I am encountering a strange thing. In the page of my application, I firstly need to extract data into a table with three columns, the 1st is index column that indicates the items sequence, the 2nd one is some description about this item, the 3rd one is a link or something like that allow user to go throught a page with some more detail information about that item. My codes like as followed, and every time I print the index as well.Our requirement need that link is a image type as you see. The problem is that the value of instance('instance')/selected-option always is 1, not the index value as you click.So that user always get the first item's detail information.Anyone could tell me what is reason and why? If I change that image to a button even a link, it both work well. Thanks for you time and tips, <xforms:repeat nodeset="*:items/*:item" id="list"> <xhtml:tr> <xhtml:td width="10%"> <div align="center"><xforms:output value="@Option + 1" /></div> </xhtml:td> <xhtml:td width="68%"> <span class="style6"><xforms:output ref="*:Summary" /></span> </xhtml:td> <xhtml:td width="22%"> <xforms:output ref="instance('instance')/selected-option"/> <----------- print that index <div align="center"> <xforms:trigger appearance="xxforms:image"> <xxforms:img src="/inform/public-transport/images/show_button_blue.png" /> <xforms:label>Show Details</xforms:label> <xforms:action ev:event="DOMActivate"> <xforms:setvalue ref="instance('instance')/selected-option" value="index('list')" /> <xforms:send submission="self" /> </xforms:action> </xforms:trigger> </div> </xhtml:td> </xhtml:tr> </xforms:repeat> Many thanks again. Kevin Cheng Information Solutions Consultancy Intelligent Transport Systems Atkins Highways and Transportation Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW Tel: +44 (0) 1372 756471 Fax: +44 (0) 1372 750000 E-mail: [hidden email] www.atkinsglobal.com/its This message has been scanned for viruses by MailControl - (see http://bluepages.wsatkins.co.uk/?4318150) This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding. -- 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
|
Kevin,
I am not sure I see anything wrong in your code below. I created my own example (see attached), and I can run this without any problem in the online sandbox: http://www.orbeon.com/ops/xforms-sandbox Note: If would greatly help if next time you could send a reproducible case that is a complete XForms page that can be run in the sandbox (and attached to the email instead of just code excerpts within the body of the email, as formatting becomes impossible to sort out). The faster we think we can reproduce an issue, the more likely we are to look at it. -Erik > Anyone could help me with that issue? > > Now I am encountering a strange thing. In the page of my application, I > firstly need to extract data into a table with three columns, > the 1st is index column that indicates the items sequence, > the 2nd one is some description about this item, > the 3rd one is a link or something like that allow user to go throught a > page with some more detail information about that item. > > My codes like as followed, and every time I print the index as well.Our > requirement need that link is a image type as you see. > > The problem is that the value of instance('instance')/selected-option > always is 1, not the index value as you click.So that user always get > the first item's detail information.Anyone could tell me what is reason > and why? If I change that image to a button even a link, it both work > well. > > Thanks for you time and tips, > > > <xforms:repeat nodeset="*:items/*:item" id="list"> > <xhtml:tr> > <xhtml:td width="10%"> > <div align="center"><xforms:output > value="@Option + 1" /></div> > </xhtml:td> > <xhtml:td width="68%"> > <span class="style6"><xforms:output > ref="*:Summary" /></span> > </xhtml:td> > <xhtml:td width="22%"> > > <xforms:output > ref="instance('instance')/selected-option"/> > <----------- print that index > > <div align="center"> > <xforms:trigger > appearance="xxforms:image"> > <xxforms:img > src="/inform/public-transport/images/show_button_blue.png" /> > <xforms:label>Show > Details</xforms:label> > <xforms:action > ev:event="DOMActivate"> > <xforms:setvalue > ref="instance('instance')/selected-option" value="index('list')" /> > <xforms:send > submission="self" /> > </xforms:action> > </xforms:trigger> > > </div> > </xhtml:td> > </xhtml:tr> > </xforms:repeat> > > Many thanks again. > > > > Kevin Cheng > Information Solutions Consultancy > Intelligent Transport Systems > Atkins Highways and Transportation > Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW > Tel: +44 (0) 1372 756471 > Fax: +44 (0) 1372 750000 > E-mail: [hidden email] > > www.atkinsglobal.com/its -- Technology, music, and more http://erik.bruchez.name/roller/page/ebruchez/ -- 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
|
Forgot the attachment, of course.
-Erik Erik Bruchez wrote: > Kevin, > > I am not sure I see anything wrong in your code below. I created my > own example (see attached), and I can run this without any problem in > the online sandbox: > > http://www.orbeon.com/ops/xforms-sandbox > > Note: If would greatly help if next time you could send a reproducible > case that is a complete XForms page that can be run in the sandbox > (and attached to the email instead of just code excerpts within the > body of the email, as formatting becomes impossible to sort out). The > faster we think we can reproduce an issue, the more likely we are to > look at it. > > -Erik > > > Anyone could help me with that issue? > > > > Now I am encountering a strange thing. In the page of my application, I > > firstly need to extract data into a table with three columns, > > the 1st is index column that indicates the items sequence, > > the 2nd one is some description about this item, > > the 3rd one is a link or something like that allow user to go throught a > > page with some more detail information about that item. > > > > My codes like as followed, and every time I print the index as well.Our > > requirement need that link is a image type as you see. > > > > The problem is that the value of instance('instance')/selected-option > > always is 1, not the index value as you click.So that user always get > > the first item's detail information.Anyone could tell me what is reason > > and why? If I change that image to a button even a link, it both work > > well. > > > > Thanks for you time and tips, > > > > > > <xforms:repeat nodeset="*:items/*:item" id="list"> > > <xhtml:tr> > > <xhtml:td width="10%"> > > <div align="center"><xforms:output > > value="@Option + 1" /></div> > > </xhtml:td> > > <xhtml:td width="68%"> > > <span class="style6"><xforms:output > > ref="*:Summary" /></span> > > </xhtml:td> > > <xhtml:td width="22%"> > > > > <xforms:output > > ref="instance('instance')/selected-option"/> > > <----------- print that index > > > > <div align="center"> > > <xforms:trigger > > appearance="xxforms:image"> > > <xxforms:img > > src="/inform/public-transport/images/show_button_blue.png" /> > > <xforms:label>Show > > Details</xforms:label> > > <xforms:action > > ev:event="DOMActivate"> > > <xforms:setvalue > > ref="instance('instance')/selected-option" value="index('list')" /> > > <xforms:send > > submission="self" /> > > </xforms:action> > > </xforms:trigger> > > > > </div> > > </xhtml:td> > > </xhtml:tr> > > </xforms:repeat> > > > > Many thanks again. > > > > > > > > Kevin Cheng > > Information Solutions Consultancy > > Intelligent Transport Systems > > Atkins Highways and Transportation > > Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW > > Tel: +44 (0) 1372 756471 > > Fax: +44 (0) 1372 750000 > > E-mail: [hidden email] > > > > www.atkinsglobal.com/its > -- 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 repeat-selected.xhtml (3K) Download Attachment |
In reply to this post by Zhou, Kevin
Hi Erik Thanks for your suggestion about questions with some reproducible cases as possible. |It's Sure, no preblem. I will try to do like this in the future. Actually for this case your code is enough to statement. Yes, I had tried to install your code into that live sandbox, but then it work well with firefox, not Internet Explorer.With IE, every time click that add icon, the value attached after that string "Selected:" always is 1. For fixbox, that value could be changed according your clicking, 1,2,3 or 4. Could you try it again for me,please ? Thank you very much. Cheers Kevin Cheng Information Solutions Consultancy Intelligent Transport Systems Atkins Highways and Transportation Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW Tel: +44 (0) 1372 756471 Fax: +44 (0) 1372 750000 E-mail: [hidden email] www.atkinsglobal.com/its -----Original Message----- From: Erik Bruchez [mailto:[hidden email]] On Behalf Of Erik Bruchez Sent: 29 August 2006 01:09 To: [hidden email] Subject: Re: [ops-users] Why it works like that when trigger button controls is image type. Forgot the attachment, of course. -Erik Erik Bruchez wrote: > Kevin, > > I am not sure I see anything wrong in your code below. I created my > own example (see attached), and I can run this without any problem in > the online sandbox: > > http://www.orbeon.com/ops/xforms-sandbox > > Note: If would greatly help if next time you could send a reproducible > case that is a complete XForms page that can be run in the sandbox > (and attached to the email instead of just code excerpts within the > body of the email, as formatting becomes impossible to sort out). The > faster we think we can reproduce an issue, the more likely we are to > look at it. > > -Erik > > > Anyone could help me with that issue? > > > > Now I am encountering a strange thing. In the page of my > application, I > firstly need to extract data into a table with three > columns, > the 1st is index column that indicates the items sequence, > > the 2nd one is some description about this item, > the 3rd one is a > link or something like that allow user to go throught a > page with > some more detail information about that item. > > > > My codes like as followed, and every time I print the index as > well.Our > requirement need that link is a image type as you see. > > > > The problem is that the value of > instance('instance')/selected-option > > always is 1, not the index value as you click.So that user always > get > the first item's detail information.Anyone could tell me what > is reason > and why? If I change that image to a button even a link, > it both work > well. > > > > Thanks for you time and tips, > > > > > > <xforms:repeat nodeset="*:items/*:item" id="list"> > > <xhtml:tr> > > <xhtml:td width="10%"> > > <div align="center"><xforms:output > > value="@Option + 1" /></div> > > </xhtml:td> > > <xhtml:td width="68%"> > > <span class="style6"><xforms:output > > ref="*:Summary" /></span> > > </xhtml:td> > > <xhtml:td width="22%"> > > > > <xforms:output > > ref="instance('instance')/selected-option"/> > > <----------- print that index > > > > <div align="center"> > > <xforms:trigger > > appearance="xxforms:image"> > > <xxforms:img > > src="/inform/public-transport/images/show_button_blue.png" /> > > <xforms:label>Show > > Details</xforms:label> > > <xforms:action > > ev:event="DOMActivate"> > > <xforms:setvalue > > ref="instance('instance')/selected-option" value="index('list')" /> > > <xforms:send > > submission="self" /> > > </xforms:action> > > </xforms:trigger> > > > > </div> > > </xhtml:td> > > </xhtml:tr> > > </xforms:repeat> > > > > Many thanks again. > > > > > > > > Kevin Cheng > > Information Solutions Consultancy > > Intelligent Transport Systems > > Atkins Highways and Transportation > > Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW > Tel: +44 > (0) 1372 756471 > Fax: +44 (0) 1372 750000 > E-mail: > [hidden email] > > www.atkinsglobal.com/its > -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ This message has been scanned for viruses by MailControl - (see http://bluepages.wsatkins.co.uk/?4318150) This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding. -- 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 |