Quantcast

SetFocus inside FR Accordion - Not working

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

SetFocus inside FR Accordion - Not working

Vedha
I am not able to set focus into a input field which is inside a fr:accordion but i am able to do the same when is field is not inside any accordion. Any solutions here?

Code used to set the focus,

<xf:setfocus event="DOMActivate" control="categoryinput"/>
<xf:setfocus event="DOMActivate" control="categoryaccordioninput"/

Here are some more information,


<i>Working scenario - Without accordion
when i create a field without accordion, the id is rendered as follows,

Source code:
<xf:input ref="xxf:instance('mdl')/fruit/category" id="categoryinput"></xf:input>


Output html:
<input id="categoryinput≡xforms-input-1" type="text" name="categoryinput≡xforms-input-1" value="" class="xforms-input-input" aria-invalid="true">


Not working scenario - with accordion:
when i create a input field inside a accordion then, id of the field is rendered as,

Source Code:


<fr:accordion class="fr-accordion-lnf" id="moduleArrangementsAccordion">
                                                                                                                        <xf:label>Accordion</xf:label>

<xf:input ref="xxf:instance('mdl')/fruit/category" id="categoryaccordioninput"></xf:input>
                                                                                                                        </fr:accordion>
Output html:

<input id="moduleArrangementsAccordion≡categoryaccordioninput≡xforms-input-1" type="text" name="moduleArrangementsAccordion≡categoryaccordioninput≡xforms-input-1" value="" class="xforms-input-input" aria-invalid="true">
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: SetFocus inside FR Accordion - Not working

Alessandro  Vernet
Administrator
Hi Vedha,

I am trying to reproduce this, but for me, at least when the section in which the input is present is open, setting the focus works. Are you saying that if the section that contains the control isn't open, you'd like the accordion to open it before setting the focus?

Test case: view.xhtml

Also, I'd recommend against using that control, as it has been deprecated for a long time (sine 4.5), and thus isn't maintained, or used by Form Builder or Form Runner. Would you be able to use tabs instead? The fr:tabbable is the way to, as it is used by Form Builder and improved with time (e.g. we're now adding vertical tabs).

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Loading...