Hi
I have a dialog box in which I generate a repeat structure, by means of 3 selections made in 3 drop downs respectively. I generate one row of the repeat structure after the last selection is made and I press and ADD button. Now this repeat structure is also generated in the main form as well. Now, after I am done adding rows/deleting rows, I leave the dialog by pressing a CLOSE button. Now I would expect that when I change my mind and want to reopen the dialog for some reason, I should find the select1 drop downs devoid of any values in them. But I find that the old values are still present in them. I do not want this behaviour. How would I clear the values in these boxes as soon as press the CLOSE button and also avoid deleting any values in the instance that represents the just-previously added repeat structure, because I need to persist the repeat structure in the main form. Any suggestions are appreciated. thanks ilango |
Administrator
|
On Mar 26, 2008, at 11:58 AM, someperson wrote:
> > I have a dialog box in which I generate a repeat structure, by > means of 3 > selections made in 3 drop downs respectively. I generate one row of > the > repeat structure after the last selection is made and I press and ADD > button. Now this repeat structure is also generated in the main form > as > well. Now, after I am done adding rows/deleting rows, I leave the > dialog by > pressing a CLOSE button. > Now I would expect that when I change my mind and want to reopen the > dialog > for some reason, I should find the select1 drop downs devoid of any > values > in them. But I find that the old values are still present in them. I > do not > want this behaviour. > How would I clear the values in these boxes as soon as press the CLOSE > button and also avoid deleting all the generated rows, because I > need to > persist the repeat structure in the main form. How is the control closed? Do you have a close button, or are users clicking to the "x" in the title bar? In the latter case you will need to react to the xxforms-dialog-close event and use <xforms:setvalue> et reset the values of the drop-downs. You will find some documentation about this event on: http://www.orbeon.com/ops/doc/reference-xforms-2#xxforms-dialog-close 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 |
I have a CLOSE button and I leave the dialog by pressing the CLOSE button. The goal is to have users preferably use the CLOSE button, and clear the values in the drop down as well. If they forget to do that and click the "x" then as you suggested I need to react to the xxforms-dialog-close event and use <xforms:setvalue> to reset the values of the drop-downs.
By resetting the values in the drop down on closing, is the repeat structure generated in the main form going to be affected because of the possibility of the instance holding the repeat structure values getting wiped off by the setValue? ilango
|
Administrator
|
On Thu, Mar 27, 2008 at 6:24 AM, someperson <[hidden email]> wrote:
> I have a CLOSE button and I leave the dialog by pressing the CLOSE button. > The goal is to have users preferably use the CLOSE button, and clear the > values in the drop down as well. If they forget to do that and click the "x" > then as you suggested I need to react to the xxforms-dialog-close event and > use <xforms:setvalue> to reset the values of the drop-downs. You might want to just react to the xxforms-dialog-close event. When users press your close button and you close the dialog with <xxforms:hide>, your xxforms-dialog-close event handler is called. This way you just need to listen on one event, and that event will be called whatever method is used to close the dialog. > By resetting the values in the drop down on closing, is the repeat structure > generated in the main form going to be affected because of the possibility > of the instance holding the repeat structure values getting wiped off by the > setValue? If you change the itemset in the drop down, the value of the control won't change. If you change the value by modifying the instance, then obviously the node in the instance you modify is going to be... modified. 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 |