Re: Re: Dynamic form and source field
Posted by
Alexandru Ionita on
Jan 31, 2010; 10:10pm
URL: https://discuss.orbeon.com/Dynamic-form-and-source-field-tp1415234p1458277.html
Hello again,
I came up with some updates regarding my needs for identifying the source element. I gave up approaching this solution (F4 keypress), since the F1-F12 buttons are handled different in the major browsers. An easier way to get thinks done is the following:
attach an onFocus event to all input fields, and when this event is triggered for a specific field, a small help icon will appear right next to the field. If the user clicks it, I can dispatch an event with ORBEON.xforms.Document.dispatchEvent("main-model","help-request"). What I don't know at this step is how to make the orbeon action aware about the source input field.
I was thinking that priori calling the dispatch-event, to call ORBEON.xforms.Document.setValue("temp-var",
inputfied.id), to store in a temp instance the id of the source field. The problem now is that the id of the field has nothing to do with the ref attribute (which I need it).
So, to resume, I need somehow to identify the ref attribute of the input field that was detected as a DOM element.
Thank you and kind regards,
Alexandru
On Sat, Jan 30, 2010 at 12:13, Alexandru Ionita
<[hidden email]> wrote:
Hello Alessandro,
yes, I want to identify the field (its full xpath expression in the xml model) the user was focussed on while the F4 key was pressed, and based on this field, I need to build a dynamic form based on a XML model returned by the action triggered by ORBEON.xforms.Document.dispatchEvent("main-model","F4-keypress")
regarding the dynamic form, I found somethig here:
thank you and regards,
Alexandru
On Sat, Jan 30, 2010 at 05:42, Alessandro Vernet
<[hidden email]> wrote:
Alexandru,
I understand you are dispatching an event from the JavaScript to the
server with ORBEON.xforms.Document.dispatchEvent("main-model",
"F4-keypress"). I imagine you dispatch it when users press F4. Is the
case that you would like to know what was the current field the user
was in when this happened?
Regarding your second point, I am not sure to understand what you want
to do. Could you describe this in more details, and maybe give us an
example?
Alex
On Fri, Jan 29, 2010 at 1:23 AM, Alexandru Ionita
<
[hidden email]> wrote:
>
>
> Hello guys,
> here I am again with two questions:
> 1. How can I identify the XPATH that is backing a input text which was
> detected through JS as a source element of a keyPress event. The event is
> dispatched as follows:
> ORBEON.xforms.Document.dispatchEvent("main-model", "F4-keypress")
> 2nd, I need to build a dynamic form in a pop-up window based on a known XML
> model. Is this possible?
>
> thank you,
> Alexandru
>
--
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