Hi,
I want to create dynamic lists (combobox for expedition), which depend on what you are selecting at the first list (program). It works fine by creating / saving / interacting and so on, see http://web-intern.awi.de:8080/orbeon/test3/ By "Load Sample Data" i have problem with the appearance from expedition lists. The expect appearance see attached. I notice the following: 1. The 1st expeditionItem/program is correct, the 1st expeditionItem/expedition is not correct. The 2nd expeditionItem both program and expedition are correct. The instance record is a copy of sample data, so the instance relatedItem-template should look like the instance record, but it isn't. 2. Both of them don't appear as they should be expected (see expect_appearance.jpg) 3. If i commont out the text "<xforms:setvalue bind="expedition-trigger" value="instance('reset_Expedition')/element"/>" at 2 positions, the values of both expeditionItems are correct, the appearance for the 1st expeditionItem is correct, but not for the 2nd expeditionItem. I realize, by loading sample data, the "ev:event="xforms-value-changed" is invoked, but only for the 1st expeditionItem and not for the following Items in repeating. In fact, i really need the text "<xforms:setvalue bind="expedition-trigger" value="instance('reset_Expedition')/element"/>" to be sure data will be selected and saved correctly. Do you have any idea how to solve the problem.Code are attached. Any help would be greatly appreciated. best regard, khanh -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Djalma Saraiva [hidden email] Tel +55 51 2117 1872 | +55 11 3717 5271 www.projeler.com.br ----- Original Message ----- From: "Van Khanh Werner" <[hidden email]> To: <[hidden email]> Sent: Wednesday, January 30, 2008 6:05 AM Subject: [ops-users] how to put the appearance from dynamic lists / repeating by loading correctly > Hi, > > I want to create dynamic lists (combobox for expedition), which depend > on what you are selecting at the first list (program). It works fine by > creating / saving / interacting and so on, see > http://web-intern.awi.de:8080/orbeon/test3/ > > By "Load Sample Data" i have problem with the appearance from expedition > lists. The expect appearance see attached. > > I notice the following: > > 1. The 1st expeditionItem/program is correct, the 1st > expeditionItem/expedition is not correct. The 2nd expeditionItem both > program and expedition are correct. The instance record is a copy of > sample data, so the instance relatedItem-template should look like the > instance record, but it isn't. > > 2. Both of them don't appear as they should be expected (see > expect_appearance.jpg) > > 3. If i commont out the text "<xforms:setvalue > bind="expedition-trigger" > value="instance('reset_Expedition')/element"/>" at 2 positions, the > values of both expeditionItems are correct, the appearance for the 1st > expeditionItem is correct, but not for the 2nd expeditionItem. I > realize, by loading sample data, the "ev:event="xforms-value-changed" is > invoked, but only for the 1st expeditionItem and not for the following > Items in repeating. > In fact, i really need the text "<xforms:setvalue > bind="expedition-trigger" > value="instance('reset_Expedition')/element"/>" to be sure data will be > selected and saved correctly. > > Do you have any idea how to solve the problem.Code are attached. > > Any help would be greatly appreciated. > > best regard, > khanh > -------------------------------------------------------------------------------- > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.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 OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by Van Khanh
Hello!
I had a project similar to his a time ago. Perhaps this code can help you. Djalma Saraiva [hidden email] Tel +55 51 2117 1872 | +55 11 3717 5271 www.projeler.com.br ----- Original Message ----- From: "Van Khanh Werner" <[hidden email]> To: <[hidden email]> Sent: Wednesday, January 30, 2008 6:05 AM Subject: [ops-users] how to put the appearance from dynamic lists / repeating by loading correctly > Hi, > > I want to create dynamic lists (combobox for expedition), which depend > on what you are selecting at the first list (program). It works fine by > creating / saving / interacting and so on, see > http://web-intern.awi.de:8080/orbeon/test3/ > > By "Load Sample Data" i have problem with the appearance from expedition > lists. The expect appearance see attached. > > I notice the following: > > 1. The 1st expeditionItem/program is correct, the 1st > expeditionItem/expedition is not correct. The 2nd expeditionItem both > program and expedition are correct. The instance record is a copy of > sample data, so the instance relatedItem-template should look like the > instance record, but it isn't. > > 2. Both of them don't appear as they should be expected (see > expect_appearance.jpg) > > 3. If i commont out the text "<xforms:setvalue > bind="expedition-trigger" > value="instance('reset_Expedition')/element"/>" at 2 positions, the > values of both expeditionItems are correct, the appearance for the 1st > expeditionItem is correct, but not for the 2nd expeditionItem. I > realize, by loading sample data, the "ev:event="xforms-value-changed" is > invoked, but only for the 1st expeditionItem and not for the following > Items in repeating. > In fact, i really need the text "<xforms:setvalue > bind="expedition-trigger" > value="instance('reset_Expedition')/element"/>" to be sure data will be > selected and saved correctly. > > Do you have any idea how to solve the problem.Code are attached. > > Any help would be greatly appreciated. > > best regard, > khanh > -------------------------------------------------------------------------------- > > -- > 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 > OW2 mailing lists service home page: http://www.ow2.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 OW2 mailing lists service home page: http://www.ow2.org/wws view.xhtml (4K) Download Attachment |
Hi Djalma,
Many thanks for your answer, but the problem is not the same! I can create dynamic lists and i can save in database ( in fact in /exist/rest/db/orbeon/test3/testRecord.xml). Now i want to edit this record with the same xforms, using the button "Load Sample Data". By trying to upload this example record (testRecord.xml), the dynamic lists don't appear as they should be. Many thanks anyway. regards, khanh Djalma Saraiva - PROJELER schrieb: > Hello! > I had a project similar to his a time ago. Perhaps this code can help > you. > > Djalma Saraiva > [hidden email] > Tel +55 51 2117 1872 | +55 11 3717 5271 > > www.projeler.com.br > > > ----- Original Message ----- From: "Van Khanh Werner" > <[hidden email]> > To: <[hidden email]> > Sent: Wednesday, January 30, 2008 6:05 AM > Subject: [ops-users] how to put the appearance from dynamic lists / > repeating by loading correctly > > >> Hi, >> >> I want to create dynamic lists (combobox for expedition), which depend >> on what you are selecting at the first list (program). It works fine by >> creating / saving / interacting and so on, see >> http://web-intern.awi.de:8080/orbeon/test3/ >> >> By "Load Sample Data" i have problem with the appearance from expedition >> lists. The expect appearance see attached. >> >> I notice the following: >> >> 1. The 1st expeditionItem/program is correct, the 1st >> expeditionItem/expedition is not correct. The 2nd expeditionItem both >> program and expedition are correct. The instance record is a copy of >> sample data, so the instance relatedItem-template should look like the >> instance record, but it isn't. >> >> 2. Both of them don't appear as they should be expected (see >> expect_appearance.jpg) >> >> 3. If i commont out the text "<xforms:setvalue >> bind="expedition-trigger" >> value="instance('reset_Expedition')/element"/>" at 2 positions, the >> values of both expeditionItems are correct, the appearance for the 1st >> expeditionItem is correct, but not for the 2nd expeditionItem. I >> realize, by loading sample data, the "ev:event="xforms-value-changed" is >> invoked, but only for the 1st expeditionItem and not for the following >> Items in repeating. >> In fact, i really need the text "<xforms:setvalue >> bind="expedition-trigger" >> value="instance('reset_Expedition')/element"/>" to be sure data will be >> selected and saved correctly. >> >> Do you have any idea how to solve the problem.Code are attached. >> >> Any help would be greatly appreciated. >> >> best regard, >> khanh >> > > > -------------------------------------------------------------------------------- > > > >> >> -- >> 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 >> OW2 mailing lists service home page: http://www.ow2.org/wws >> Dipl. -Inf. (FH) Van Khanh Werner Alfred Wegener Institute for Polar and Marine Research Am Handelshafen 12, D-27570 Bremerhaven Email: [hidden email] Web: http://www.awi.de/People/show?vwilts Tel.: +49(471)-4831-1501 Fax: +49(471)-4831-1590 -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
In reply to this post by Van Khanh
On Jan 30, 2008 12:05 AM, Van Khanh Werner <[hidden email]> wrote:
> I want to create dynamic lists (combobox for expedition), which depend > on what you are selecting at the first list (program). It works fine by > creating / saving / interacting and so on, see > http://web-intern.awi.de:8080/orbeon/test3/ I tried to access this page, but the server is not responding. Maybe it was stopped? Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Hi,
Alessandro Vernet schrieb: > On Jan 30, 2008 12:05 AM, Van Khanh Werner <[hidden email]> wrote: > >> I want to create dynamic lists (combobox for expedition), which depend >> on what you are selecting at the first list (program). It works fine by >> creating / saving / interacting and so on, see >> http://web-intern.awi.de:8080/orbeon/test3/ >> > > I tried to access this page, but the server is not responding. Maybe > it was stopped? > http://web-intern.awi.de:8080/orbeon/test3/ regards, khanh -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Administrator
|
Khanh,
On Jan 31, 2008 5:47 AM, Van Khanh Werner <[hidden email]> wrote: > I am terribly sorry about that. Our tomcat server was down at late > evening yesterday and we all were at home. It's now OK with > http://web-intern.awi.de:8080/orbeon/test3/ No problem! I was also able to run this locally. Thank you for the easy to run app you attached to your previous email. When you do a "load data", the problem is that the xforms-value-change is only dispatched to the first program, not the second one. Since it did not exist before, there is no change of value per se. You could try to catch xforms-insert events, but that looks like a lot of work :). Instead you can replace the switch and event catching code with an expression on the ref of the "program" drop-down: <xforms:select1 ref="if (program != '') then expedition else ()" xxforms:refresh-items="true"> I also attached the updated test.xhtml from your example that shows this. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws test.xhtml (11K) Download Attachment |
Hi Alex,
Many thanks for your support. > When you do a "load data", the problem is that the xforms-value-change > is only dispatched to the first program, not the second one. Since it > did not exist before, there is no change of value per se. OK. > You could > try to catch xforms-insert events, but that looks like a lot of work > :). Instead you can replace the switch and event catching code with an > expression on the ref of the "program" drop-down: > > <xforms:select1 ref="if (program != '') then expedition else ()" > xxforms:refresh-items="true"> > It is super, the code will be shortlier and it is easy to understand, and it works very fine, unless a small problem with the value of expedition. For example, one selects program:ODP and expedition:100; after then, he recognizes he had a mistake at program, so he selects another program says IODP. List for expedition is changed, depending on IODP, from 301 - 313, but the value of expedition is still 100 at the background (see widget). If the user re select expedition before he saves the record, all is OK; but if not, expeditions will be saved with an inconsistent values! See attactment or see http://web-intern.awi.de:8080/orbeon/test3/ (if our tomcat server is not down again ;) So i need something like: <xforms:select1 ref="if (program != '') then **reset_Expedition to empty first **and expedition else ()" xxforms:refresh-items="true"> to be sure all values are consistent. If i reset the value of expedition using instance "reset_Expedition", code: <xforms:action ev:event="xforms-value-changed"> <xforms:setvalue bind="expedition-trigger" value="instance('reset_Expedition')/element"/> </xforms:action> i will have the same problem with its appearance again (ofcourse), the second expditionItem will appear incorrectly. (These code aboved is commonted out at the moment). What should i do? best regards, khanh -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws test3.zip (11K) Download Attachment |
Administrator
|
On Feb 1, 2008, at 6:22 AM, Van Khanh Werner wrote:
> It is super, the code will be shortlier and it is easy to > understand, and it works very fine, unless a small problem with the > value of expedition. > > For example, one selects program:ODP and expedition:100; after then, > he recognizes he had a mistake at program, so he selects another > program says IODP. List for expedition is changed, depending on > IODP, from 301 - 313, but the value of expedition is still 100 at > the background (see widget). If the user re select expedition before > he saves the record, all is OK; but if not, expeditions will be > saved with an inconsistent values! Good point. You can solve this by adding a <xforms:bind nodeset="/to/ expedition" calculate="..." where the calculate will look if the expedition is a valid expedition for the current program; if it is, it will return "." (dot, so the current value doesn't change) and otherwise will return '' (empty string, to reset the field). Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ Personal Blog: http://avernet.blogspot.com/ -- 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 OW2 mailing lists service home page: http://www.ow2.org/wws |
Free forum by Nabble | Edit this page |