I've added the part for select the row and submit by button as followed:
<tr:table id="tblSearchDialogResults" .... varStatus="varState" ...>
<tr:column>
<f:facet name="header">
<tr:outputText value="ZIP"/>
</f:facet>
<tr:outputText
ondblclick="document.getElementById('tblSearchDialogResults:#{varState.index}').click();
document.getElementById('btnAccept').click();"
value="#{row.zip}"/>
</tr:column>
Well, the selection of the row works as expected BUT the click on button is
not excuted.
Any ideas?
Walter Mourão-2 wrote:
>
> Add a component surrounding the entire row (div or some tr:panel*):
> ondblclick->select the radio and close the dialog.
>
> Or... you can add the ondblclick to each component inside the row.
>
> Walter Mourão
> http://waltermourao.com.br
> http://arcadian.com.br
> http://oriens.com.br
>
>
>
> On Fri, Nov 28, 2008 at 9:18 AM, Bruno Marti <[EMAIL PROTECTED]> wrote:
>
>>
>> ondblclick="document.getElementById('closeButtonId').click();"
>> It works.
>> But:
>> - Event will also be fired on dbclick in headers or all over the table.
>> - If user must select a row (see: tr:table rowSelection="single"), no
>> row
>> will be selected before submitting by button.click. That means I cannot
>> select a row and auto submit the dialog by above method.
>>
>> Any other solutions or could this be a change request, new feature?
>>
>>
>>
>> Walter Mourão-2 wrote:
>> >
>> > Quick & Dirt Solution:
>> >
>> > - add a closing button to the dialog
>> > - hide it with css
>> > - "click" the button using javascript in the ondblclick event of the
>> > tr:table. Something like
>> > ondblclick="documento.getElementById('closeButtonId').click();"
>> >
>> > I don't remember if I used something like that before but I think it
>> > works.
>> >
>> > Walter Mourão
>> > http://waltermourao.com.br
>> > http://arcadian.com.br
>> > http://oriens.com.br
>> >
>> >
>> >
>> > On Tue, Nov 25, 2008 at 12:57 PM, Bruno Marti <[EMAIL PROTECTED]>
>> > wrote:
>> >
>> >> I've got a lightweight dialog with a tr:table as result list. Where
>> row
>> >> selction is "single". Everything works as expected. But now, I'd like
>> to
>> >> autosubmit and close the the dialog on row selection (click on rows
>> radio
>> >> button column OR if I double click somewhere on entire row). Is there
>> a
>> >> way
>> >> to do this? Perhaps on tr:table ondblclick="....", but how? Any
>> >> solutions?
>> >> (myfaces 1.1.5, trinidad 1.0.10) dialog.jsp:
>> >> ------------------------------
>> >> View this message in context: [Trinidad] dialog auto
>> >> submit<
>> http://www.nabble.com/-Trinidad--dialog-auto-submit-tp20682081p20682081.html
>> >
>> >> Sent from the MyFaces - Users mailing list
>> >> archive<http://www.nabble.com/MyFaces---Users-f181.html>at Nabble.com.
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-Trinidad--dialog-auto-submit-tp20682081p20732761.html
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/-Trinidad--dialog-auto-submit-tp20682081p20773798.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.