fire an event (insert) when a item from a dropdown is selected

classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

fire an event (insert) when a item from a dropdown is selected

ilango_g
I have two select1 dropdowns. As soon as I make the selection in the second dropdown, can i fire an event that will automatically copy the selection of dropdown1 and the selection of dropdown2 in a homogeneous table that is generated dynamically because of the selections made before.


My select1 and insert constructs are as follows:

<xforms:select1 ref="instance('subsection-chosen')
xforms:label>Sub-Section:</xforms:label>
                                        <xforms:item>
                                                <xforms:label></xforms:label>
                                                <xforms:value/>
                                        </xforms:item>
                                                                                                <xforms:itemset nodeset="/instance('books-instance')/fe:a/fe:a/fe:c/fe:d/fe:e/fe:subsection-name[../../../fe:section-name=instance('section-chosen')]">
         
                <xforms:label ref="." />
                        <xforms:value ref="." />
                        </xforms:itemset>        </xforms:select1>

----
-------

<xforms:insert ev:event="DOMActivate"
        context="instance('books-instance')/fe:a/fe:b/fe:c/fe:subsections" nodeset="fe:subsection"
                at="last()" position="after" origin="instance('subsection-chosen')" />
Reply | Threaded
Open this post in threaded view
|

Re: fire an event (insert) when a item from a dropdown is selected

Alessandro Vernet
Administrator
someperson wrote
I have two select1 dropdowns. As soon as I make the selection in the second dropdown, can i fire an event that will automatically copy the selection of dropdown1 and the selection of dropdown2 in a homogeneous table that is generated dynamically because of the selections made before.
When you make a selection, an xforms-value-changed event will be fired. You can handle that event and change instances as you like. If you would like the a new item to added to another drop-down, you'll want to use an xforms:itemset in that other xforms:select or xforms:select1, and use xforms:insert in the xforms-value-changed handler to add something to the instance you point to in the xforms:itemset. I hope this helps,

Alex
Reply | Threaded
Open this post in threaded view
|

Re: fire an event (insert) when a item from a dropdown is selected

ilango_g
I have attached the sample XForm here. I will try to work on the code according to your suggestions in the meanwhile. I wanted to give you an idea how the form looks like when you run it in the sandbox.

As soon as I have made the third selection in the dropdown a "description" text will be copied into the textarea in the dialog. This "descriptions text" is found in the instance named "charges-instance". For example:

<fe:charge-description>
                                                                                                (b)The actor offered a dog as an inducement to purchase a product,
                                                                                                commodity or service, in violation of Section 459-603(a) of the
                                                                                                 Dog Law, 3 P.S.ยง459-603(a), as amended.
                                                                                        </fe:charge-description>



Alessandro Vernet wrote
someperson wrote
I have two select1 dropdowns. As soon as I make the selection in the second dropdown, can i fire an event that will automatically copy the selection of dropdown1 and the selection of dropdown2 in a homogeneous table that is generated dynamically because of the selections made before.
When you make a selection, an xforms-value-changed event will be fired. You can handle that event and change instances as you like. If you would like the a new item to added to another drop-down, you'll want to use an xforms:itemset in that other xforms:select or xforms:select1, and use xforms:insert in the xforms-value-changed handler to add something to the instance you point to in the xforms:itemset. I hope this helps,

Alex
view.xhtml
Reply | Threaded
Open this post in threaded view
|

Re: Re: fire an event (insert) when a item from a dropdown is selected

Alessandro Vernet
Administrator
On Feb 20, 2008, at 8:11 AM, someperson wrote:

> I have attached the sample XForm here. I will try to work on the code
> according to your suggestions in the meanwhile.

OK, let us know if you have a problem implementing 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
Reply | Threaded
Open this post in threaded view
|

Re: Re: fire an event (insert) when a item from a dropdown is selected

ilango_g
I am working on this and let you know. The reason I attached the XForm was to give you an idea of how it looks and what it might do.

I will get back to you soon with my results of my experiment.
Alessandro Vernet wrote
On Feb 20, 2008, at 8:11 AM, someperson wrote:

> I have attached the sample XForm here. I will try to work on the code
> according to your suggestions in the meanwhile.

OK, let us know if you have a problem implementing 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 ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws


-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/
Reply | Threaded
Open this post in threaded view
|

Re: Re: fire an event (insert) when a item from a dropdown is selected

ilango_g
In reply to this post by Alessandro Vernet
I do have a problem implementing this.

Not sure what to do. Placing an "insert nodeset" inside an action element in a trigger also does not seem to work. I would like to avoid the trigger if possible (or I can have the trigger working until i get the third select1 to work as a trigger) and make the last select1 box act as a trigger copying the description text into the text box.

As a result of this action on the select1 the following events must also occur:

1) a Save Offense button at the bottom must appear.
2) Clicking on the Save Offense Button must copy the selections made on all three select dropdowns as a record in a dynamic table that can grow as I can make more selections.
 

And I also want to build this dynamic table us
Alessandro Vernet wrote
On Feb 20, 2008, at 8:11 AM, someperson wrote:

> I have attached the sample XForm here. I will try to work on the code
> according to your suggestions in the meanwhile.

OK, let us know if you have a problem implementing 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 ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws


-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/
Reply | Threaded
Open this post in threaded view
|

Re: fire an event (insert) when a item from a dropdown is selected

ilango_g
In reply to this post by Alessandro Vernet
The Xform spec for "xforms-value-changed" tells me that this is 'dispatched in response to: a change to an instance data node bound to a core form control". Further it also says:

"Target: Core Form Controls" Bubbles: Yes.

I am wondering if the Core Form control in question in my situation is the text box into which I want something to be written to. The Orbeon Reference docs, the OPS forum and the Xforms spec seem to be invaluable places to really know what XForms is all about.



Alessandro Vernet wrote
someperson wrote
I have two select1 dropdowns. As soon as I make the selection in the second dropdown, can i fire an event that will automatically copy the selection of dropdown1 and the selection of dropdown2 in a homogeneous table that is generated dynamically because of the selections made before.
When you make a selection, an xforms-value-changed event will be fired. You can handle that event and change instances as you like. If you would like the a new item to added to another drop-down, you'll want to use an xforms:itemset in that other xforms:select or xforms:select1, and use xforms:insert in the xforms-value-changed handler to add something to the instance you point to in the xforms:itemset. I hope this helps,

Alex
Reply | Threaded
Open this post in threaded view
|

Re: Re: fire an event (insert) when a item from a dropdown is selected

Alessandro Vernet
Administrator
On Feb 22, 2008, at 11:23 AM, someperson wrote:

> The Xform spec for "xforms-value-changed" tells me that this is  
> 'dispatched
> in response to: a change to an instance data node bound to a core form
> control". Further it also says:
>
> "Target: Core Form Controls" Bubbles: Yes.
>
> I am wondering if the Core Form control in question in my situation  
> is the
> text box into which I want something to be written to. The Orbeon  
> Reference
> docs, the OPS forum and the Xforms spec seem to be invaluable places  
> to
> really know what XForms is all about.
Yes, the specification is indeed a very useful piece of documentation.  
It can be a little daunting at first, but becomes quite readable after  
you get a little more familiar with it. If I remember correctly, you  
would like to do something when users select an item in a drop-down.  
So in this case the XForms control on which you want to place the  
handler will be the XForms drop-down (<xforms:select1>).

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
Reply | Threaded
Open this post in threaded view
|

Re: Re: fire an event (insert) when a item from a dropdown is selected

ilango_g
Yes, I have three select1 dropdowns and as soon as I make the selection I want  and leave, an entry will be made into a text box.
I am managing this with a trigger that says "copy some text into the textarea below".

Next I am trying to generate a repeat structure that will grow as I add items to it. Each item = all the three items selected in three dropdowns each time. And this makes up one record.A trigger will copy this item record into the dynamic table. I am using repeat nodeset. I am wondering if I should use a repeat-nodeset and repeat-id inside a "repeat" and iterate.

I make a second pass over the dropdowns and have a second record in the dynamic table.

This behaviour is not happening very well right now.

Can I post a copy of the xform or a simplified test case?


Alessandro Vernet wrote
On Feb 22, 2008, at 11:23 AM, someperson wrote:

> The Xform spec for "xforms-value-changed" tells me that this is  
> 'dispatched
> in response to: a change to an instance data node bound to a core form
> control". Further it also says:
>
> "Target: Core Form Controls" Bubbles: Yes.
>
> I am wondering if the Core Form control in question in my situation  
> is the
> text box into which I want something to be written to. The Orbeon  
> Reference
> docs, the OPS forum and the Xforms spec seem to be invaluable places  
> to
> really know what XForms is all about.

Yes, the specification is indeed a very useful piece of documentation.  
It can be a little daunting at first, but becomes quite readable after  
you get a little more familiar with it. If I remember correctly, you  
would like to do something when users select an item in a drop-down.  
So in this case the XForms control on which you want to place the  
handler will be the XForms drop-down (<xforms:select1>).

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 ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws


-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: fire an event (insert) when a item from a dropdown is selected

Erik Bruchez
Administrator
Sure, please send some code, preferably something that runs in the  
sandbox.

-Erik

On Feb 26, 2008, at 2:15 PM, someperson wrote:

>
> Yes, I have three select1 dropdowns and as soon as I make the  
> selection I
> want  and leave, an entry will be made into a text box.
> I am managing this with a trigger that says "copy some text into the
> textarea below".
>
> Next I am trying to generate a repeat structure that will grow as I  
> add
> items to it. Each item = all the three items selected in three  
> dropdowns
> each time. And this makes up one record.A trigger will copy this  
> item record
> into the dynamic table. I am using repeat nodeset. I am wondering if I
> should use a repeat-nodeset and repeat-id inside a "repeat" and  
> iterate.
>
> I make a second pass over the dropdowns and have a second record in  
> the
> dynamic table.
>
> This behaviour is not happening very well right now.
>
> Can I post a copy of the xform or a simplified test case?
>
>
>
> Alessandro Vernet wrote:
>>
>> On Feb 22, 2008, at 11:23 AM, someperson wrote:
>>
>>> The Xform spec for "xforms-value-changed" tells me that this is
>>> 'dispatched
>>> in response to: a change to an instance data node bound to a core  
>>> form
>>> control". Further it also says:
>>>
>>> "Target: Core Form Controls" Bubbles: Yes.
>>>
>>> I am wondering if the Core Form control in question in my situation
>>> is the
>>> text box into which I want something to be written to. The Orbeon
>>> Reference
>>> docs, the OPS forum and the Xforms spec seem to be invaluable places
>>> to
>>> really know what XForms is all about.
>>
>> Yes, the specification is indeed a very useful piece of  
>> documentation.
>> It can be a little daunting at first, but becomes quite readable  
>> after
>> you get a little more familiar with it. If I remember correctly, you
>> would like to do something when users select an item in a drop-down.
>> So in this case the XForms control on which you want to place the
>> handler will be the XForms drop-down (<xforms:select1>).
>>
>> 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
>>
>>
>> -----
>> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
>> http://www.orbeon.com/
>>
>>
>
> --
> View this message in context: http://www.nabble.com/fire-an-event-%28insert%29-when-a-item-from-a-dropdown-is-selected-tp15562625p15701350.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.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
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: fire an event (insert) when a item from a dropdown is selected

ilango_g
I am looking at all these posts on Nabble. And I think from past experience, attachments don't work well here. Is there any other way to send code that runs in the sandbox?  I think copying and pasting here might be a little too unwieldy.

Please suggest.
Erik Bruchez wrote
Sure, please send some code, preferably something that runs in the  
sandbox.

-Erik

On Feb 26, 2008, at 2:15 PM, someperson wrote:

>
> Yes, I have three select1 dropdowns and as soon as I make the  
> selection I
> want  and leave, an entry will be made into a text box.
> I am managing this with a trigger that says "copy some text into the
> textarea below".
>
> Next I am trying to generate a repeat structure that will grow as I  
> add
> items to it. Each item = all the three items selected in three  
> dropdowns
> each time. And this makes up one record.A trigger will copy this  
> item record
> into the dynamic table. I am using repeat nodeset. I am wondering if I
> should use a repeat-nodeset and repeat-id inside a "repeat" and  
> iterate.
>
> I make a second pass over the dropdowns and have a second record in  
> the
> dynamic table.
>
> This behaviour is not happening very well right now.
>
> Can I post a copy of the xform or a simplified test case?
>
>
>
> Alessandro Vernet wrote:
>>
>> On Feb 22, 2008, at 11:23 AM, someperson wrote:
>>
>>> The Xform spec for "xforms-value-changed" tells me that this is
>>> 'dispatched
>>> in response to: a change to an instance data node bound to a core  
>>> form
>>> control". Further it also says:
>>>
>>> "Target: Core Form Controls" Bubbles: Yes.
>>>
>>> I am wondering if the Core Form control in question in my situation
>>> is the
>>> text box into which I want something to be written to. The Orbeon
>>> Reference
>>> docs, the OPS forum and the Xforms spec seem to be invaluable places
>>> to
>>> really know what XForms is all about.
>>
>> Yes, the specification is indeed a very useful piece of  
>> documentation.
>> It can be a little daunting at first, but becomes quite readable  
>> after
>> you get a little more familiar with it. If I remember correctly, you
>> would like to do something when users select an item in a drop-down.
>> So in this case the XForms control on which you want to place the
>> handler will be the XForms drop-down (<xforms:select1>).
>>
>> 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 ops-users@ow2.org  
>> mailing
>> list.
>> To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
>> For general help: mailto:sympa@ow2.org?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>> -----
>> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
>> http://www.orbeon.com/
>>
>>
>
> --
> View this message in context: http://www.nabble.com/fire-an-event-%28insert%29-when-a-item-from-a-dropdown-is-selected-tp15562625p15701350.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.com.
>
>
> --
> You receive this message as a subscriber of the ops-users@ow2.org  
> mailing list.
> To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
> For general help: mailto:sympa@ow2.org?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: fire an event (insert) when a item from a dropdown is selected

Alessandro Vernet
Administrator
On Tue, Feb 26, 2008 at 5:06 PM, someperson <[hidden email]> wrote:
>
>  I am looking at all these posts on Nabble. And I think from past experience,
>  attachments don't work well here. Is there any other way to send code that
>  runs in the sandbox?  I think copying and pasting here might be a little too
>  unwieldy.
>
>  Please suggest.

Really? I don't remember having had any problem with attachment on
emails sent through Nabble. You might want to just give it a try.

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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: fire an event (insert) when a item from a dropdown is selected

ilango_g
Maybe I am wrong (with my apologies).
Well, I have enclosed a test form. I could not strip it down any further because of the detailed logic involved.

The functionality that I seek can be seen as follows:

1)One needs to make selections in the dropdowns. These are dynamic.
2) As soon as I am done making the third selection, a description should appear in the textarea labelled ''DESCRIPTION". (this description is pulled from "charges-instance")
 
"Currently I am using a trigger called 'generate description" that when clicked gets the description text into the box.
This is not what I want."

And then I click "Add Offense" I need to populate the repeat structure at the bottom. This is happening in a crude fashion. The correct behaviour is to have the values appear under their respective headings (these correspond to the drop-downs). Instead they seem to appear in the reverse order and the next set of text appears beside the first one instead of below it as in a regular table.

I have uploaded the file here as an (attachment).

 


Alessandro Vernet wrote
On Tue, Feb 26, 2008 at 5:06 PM, someperson <ilangocal@yahoo.com> wrote:
>
>  I am looking at all these posts on Nabble. And I think from past experience,
>  attachments don't work well here. Is there any other way to send code that
>  runs in the sandbox?  I think copying and pasting here might be a little too
>  unwieldy.
>
>  Please suggest.

Really? I don't remember having had any problem with attachment on
emails sent through Nabble. You might want to just give it a try.

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 ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws


-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/
view.xhtml
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: fire an event (insert) when a item from a dropdown is selected

ilango_g


someperson <[hidden email]> wrote:

Maybe I am wrong (with my apologies).
Well, I have enclosed a test form. I could not strip it down any further
because of the detailed logic involved.

The functionality that I seek can be seen as follows:

1)One needs to make selections in the dropdowns. These are dynamic.
2) As soon as I am done making the third selection, a description should
appear in the textarea labelled ''DESCRIPTION". (this description is pulled
from "charges-instance")

"Currently I am using a trigger called 'generate description" that when
clicked gets the description text into the box.
This is not what I want."

And then I click "Add Offense" I need to populate the repeat structure at
the bottom. This is happening in a crude fashion. The correct behaviour is
to have the values appear under their respective headings (these correspond
to the drop-downs). Instead they seem to appear in the reverse order and the
next set of text appears beside the first one instead of below it as in a
regular table.

I have uploaded the file here as an (attachment).





Alessandro Vernet wrote:

>
> On Tue, Feb 26, 2008 at 5:06 PM, someperson wrote:
>>
>> I am looking at all these posts on Nabble. And I think from past
>> experience,
>> attachments don't work well here. Is there any other way to send code
>> that
>> runs in the sandbox? I think copying and pasting here might be a little
>> too
>> unwieldy.
>>
>> Please suggest.
>
> Really? I don't remember having had any problem with attachment on
> emails sent through Nabble. You might want to just give it a try.
>
> 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
>
>
> -----
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
> http://www.orbeon.com/
>
>
http://www.nabble.com/file/p15717489/view.xhtml view.xhtml
--
View this message in context: http://www.nabble.com/fire-an-event-%28insert%29-when-a-item-from-a-dropdown-is-selected-tp15562625p15717489.html
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.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





Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.

--
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: fire an event (insert) when a item from a dropdown is selected

ilango_g
In reply to this post by Alessandro Vernet
I have attached the Code. I hope it appears in the right place.


Alessandro Vernet wrote
On Tue, Feb 26, 2008 at 5:06 PM, someperson <ilangocal@yahoo.com> wrote:
>
>  I am looking at all these posts on Nabble. And I think from past experience,
>  attachments don't work well here. Is there any other way to send code that
>  runs in the sandbox?  I think copying and pasting here might be a little too
>  unwieldy.
>
>  Please suggest.

Really? I don't remember having had any problem with attachment on
emails sent through Nabble. You might want to just give it a try.

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 ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws


-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: fire an event (insert) when a item from a dropdown is selected

ilango_g
In reply to this post by ilango_g
I can insert stuff into the table, but cannot delete any with the Delete button.
This is another problem that I have right now.

someperson wrote
I am looking at all these posts on Nabble. And I think from past experience, attachments don't work well here. Is there any other way to send code that runs in the sandbox?  I think copying and pasting here might be a little too unwieldy.

Please suggest.
Erik Bruchez wrote
Sure, please send some code, preferably something that runs in the  
sandbox.

-Erik

On Feb 26, 2008, at 2:15 PM, someperson wrote:

>
> Yes, I have three select1 dropdowns and as soon as I make the  
> selection I
> want  and leave, an entry will be made into a text box.
> I am managing this with a trigger that says "copy some text into the
> textarea below".
>
> Next I am trying to generate a repeat structure that will grow as I  
> add
> items to it. Each item = all the three items selected in three  
> dropdowns
> each time. And this makes up one record.A trigger will copy this  
> item record
> into the dynamic table. I am using repeat nodeset. I am wondering if I
> should use a repeat-nodeset and repeat-id inside a "repeat" and  
> iterate.
>
> I make a second pass over the dropdowns and have a second record in  
> the
> dynamic table.
>
> This behaviour is not happening very well right now.
>
> Can I post a copy of the xform or a simplified test case?
>
>
>
> Alessandro Vernet wrote:
>>
>> On Feb 22, 2008, at 11:23 AM, someperson wrote:
>>
>>> The Xform spec for "xforms-value-changed" tells me that this is
>>> 'dispatched
>>> in response to: a change to an instance data node bound to a core  
>>> form
>>> control". Further it also says:
>>>
>>> "Target: Core Form Controls" Bubbles: Yes.
>>>
>>> I am wondering if the Core Form control in question in my situation
>>> is the
>>> text box into which I want something to be written to. The Orbeon
>>> Reference
>>> docs, the OPS forum and the Xforms spec seem to be invaluable places
>>> to
>>> really know what XForms is all about.
>>
>> Yes, the specification is indeed a very useful piece of  
>> documentation.
>> It can be a little daunting at first, but becomes quite readable  
>> after
>> you get a little more familiar with it. If I remember correctly, you
>> would like to do something when users select an item in a drop-down.
>> So in this case the XForms control on which you want to place the
>> handler will be the XForms drop-down (<xforms:select1>).
>>
>> 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 ops-users@ow2.org  
>> mailing
>> list.
>> To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
>> For general help: mailto:sympa@ow2.org?subject=help
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>>
>>
>> -----
>> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
>> http://www.orbeon.com/
>>
>>
>
> --
> View this message in context: http://www.nabble.com/fire-an-event-%28insert%29-when-a-item-from-a-dropdown-is-selected-tp15562625p15701350.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.com.
>
>
> --
> You receive this message as a subscriber of the ops-users@ow2.org  
> mailing list.
> To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
> For general help: mailto:sympa@ow2.org?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws

--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
You receive this message as a subscriber of the ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: fire an event (insert) when a item from a dropdown is selected

Alessandro Vernet
Administrator
In reply to this post by ilango_g
On Wed, Feb 27, 2008 at 8:52 AM, someperson <[hidden email]> wrote:
>  1)One needs to make selections in the dropdowns. These are dynamic.
>  2) As soon as I am done making the third selection, a description should
>  appear in the textarea labelled ''DESCRIPTION". (this description is pulled
>  from "charges-instance")

OK, I see your example. You can just put an event handler for
xforms-value-changed on the 3rd drop-down and do the setvalue there.
Of course if users then change the text in the text area and then
change the value in the 3rd drop-down, the content of the text area
will be reset and they will loose their changes.

>  And then I click "Add Offense" I need to populate the repeat structure at
>  the bottom. This is happening in a crude fashion. The correct behaviour is
>  to have the values appear under their respective headings (these correspond
>  to the drop-downs). Instead they seem to appear in the reverse order and the
>  next set of text appears beside the first one instead of below it as in a
>  regular table.

I don't see the "Add Offense" trigger in the UI.

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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: fire an event (insert) when a item from a dropdown is selected

ilango_g
Yes, I stand corrected. It is the "Save Offense" Button and next to it the "Delete" button.

I need to have a way to persist the "descroption" as well in the textarea.
And the order of data displayed in the "crude-yet-to-work- repeating structure is reverse. Instead of displaying as "Title" Section Subsection" it displays in the reverse order.

And I think because of a faulty repeat structure in my code I can't get a delete button for each row.

I have attached the same file again. The Save Offense button should be visible at the bottom.
Alessandro Vernet wrote
On Wed, Feb 27, 2008 at 8:52 AM, someperson <ilangocal@yahoo.com> wrote:
>  1)One needs to make selections in the dropdowns. These are dynamic.
>  2) As soon as I am done making the third selection, a description should
>  appear in the textarea labelled ''DESCRIPTION". (this description is pulled
>  from "charges-instance")

OK, I see your example. You can just put an event handler for
xforms-value-changed on the 3rd drop-down and do the setvalue there.
Of course if users then change the text in the text area and then
change the value in the 3rd drop-down, the content of the text area
will be reset and they will loose their changes.

>  And then I click "Add Offense" I need to populate the repeat structure at
>  the bottom. This is happening in a crude fashion. The correct behaviour is
>  to have the values appear under their respective headings (these correspond
>  to the drop-downs). Instead they seem to appear in the reverse order and the
>  next set of text appears beside the first one instead of below it as in a
>  regular table.

I don't see the "Add Offense" trigger in the UI.

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 ops-users@ow2.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@ow2.org
For general help: mailto:sympa@ow2.org?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws


-----
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
http://www.orbeon.com/
view.xhtml
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Re: Re: fire an event (insert) when a item from a dropdown is selected

Alessandro Vernet
Administrator
On Fri, Feb 29, 2008 at 6:07 AM, someperson <[hidden email]> wrote:

>
>  Yes, I stand corrected. It is the "Save Offense" Button and next to it the
>  "Delete" button.
>
>  I need to have a way to persist the "descroption" as well in the textarea.
>  And the order of data displayed in the "crude-yet-to-work- repeating
>  structure is reverse. Instead of displaying as "Title" Section Subsection"
>  it displays in the reverse order.
>
>  And I think because of a faulty repeat structure in my code I can't get a
>  delete button for each row.
>
>  I have attached the same file again. The Save Offense button should be
>  visible at the bottom.
I am getting confused. To increase your chances of getting an answer
here on this list, I recommend you start a new thread, talk about only
one problem in that thread, attach an example that shows what you are
talking about, describe what doesn't work in the example you attached,
and how to reproduce 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