You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Bruno Marti <br...@evard.ch> on 2008/11/25 15:57:06 UTC
[Trinidad] dialog auto submit
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: http://www.nabble.com/-Trinidad--dialog-auto-submit-tp20682081p20682081.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Trinidad] dialog auto submit
Posted by Bruno Marti <br...@evard.ch>.
Found the solution. It's a timming problem.
1. select row
2. wait on PPR response
3. Submit by click on button
like this:
ondblclick="document.getElementById('tblSearchDialogResults:#{varState.index}').click();
setTimeout('document.getElementById("btnAccept").click()', 500);"
Be sure inner quotes of setTimeout()-call are escaped -> "
Walter Mourão-2 wrote:
>
> I don't know, but it looks to me you can use the code
> "TrPage._autoSubmit('frmDialog','tblSearchDialogResults',event,1)"
> directly,
> avoiding to call the .click()
>
> Walter Mourão
> http://waltermourao.com.br
> http://arcadian.com.br
> http://oriens.com.br
>
>
>
> On Tue, Dec 2, 2008 at 4:03 AM, Bruno Marti <br...@evard.ch> wrote:
>
>>
>> Both are not working: .onclick() instead of .click()
>> I mean, the first command works perfectly:
>>
>>
>> document.getElementById('tblSearchDialogResults:#{varState.index}').click();
>> but the second is not executed.
>> Is there perhaps a problem with on the first click? The first click
>> excutes
>> this:
>> TrPage._autoSubmit('frmDialog','tblSearchDialogResults',event,1);return
>> true;
>>
>>
>>
>>
>> Walter Mourão-2 wrote:
>> >
>> > Try executing .onclick() instead of .click(). I'm not sure but it looks
>> to
>> > me there is a difference because of the js code it should execute.
>> >
>> > Walter Mourão
>> > http://waltermourao.com.br
>> > http://arcadian.com.br
>> > http://oriens.com.br
>> >
>> >
>> >
>> > On Mon, Dec 1, 2008 at 1:11 PM, Bruno Marti <br...@evard.ch>
>> wrote:
>> >
>> >>
>> >> 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 <br...@evard.ch>
>> >> 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
>> <bruno.marti@evard.ch
>> >
>> >> >> > 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.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-Trinidad--dialog-auto-submit-tp20682081p20786628.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-tp20682081p20793239.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Trinidad] dialog auto submit
Posted by Walter Mourão <wa...@gmail.com>.
I don't know, but it looks to me you can use the code
"TrPage._autoSubmit('frmDialog','tblSearchDialogResults',event,1)" directly,
avoiding to call the .click()
Walter Mourão
http://waltermourao.com.br
http://arcadian.com.br
http://oriens.com.br
On Tue, Dec 2, 2008 at 4:03 AM, Bruno Marti <br...@evard.ch> wrote:
>
> Both are not working: .onclick() instead of .click()
> I mean, the first command works perfectly:
>
>
> document.getElementById('tblSearchDialogResults:#{varState.index}').click();
> but the second is not executed.
> Is there perhaps a problem with on the first click? The first click excutes
> this:
> TrPage._autoSubmit('frmDialog','tblSearchDialogResults',event,1);return
> true;
>
>
>
>
> Walter Mourão-2 wrote:
> >
> > Try executing .onclick() instead of .click(). I'm not sure but it looks
> to
> > me there is a difference because of the js code it should execute.
> >
> > Walter Mourão
> > http://waltermourao.com.br
> > http://arcadian.com.br
> > http://oriens.com.br
> >
> >
> >
> > On Mon, Dec 1, 2008 at 1:11 PM, Bruno Marti <br...@evard.ch>
> wrote:
> >
> >>
> >> 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 <br...@evard.ch>
> >> 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 <bruno.marti@evard.ch
> >
> >> >> > 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.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/-Trinidad--dialog-auto-submit-tp20682081p20786628.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>
Re: [Trinidad] dialog auto submit
Posted by Bruno Marti <br...@evard.ch>.
Both are not working: .onclick() instead of .click()
I mean, the first command works perfectly:
document.getElementById('tblSearchDialogResults:#{varState.index}').click();
but the second is not executed.
Is there perhaps a problem with on the first click? The first click excutes
this:
TrPage._autoSubmit('frmDialog','tblSearchDialogResults',event,1);return
true;
Walter Mourão-2 wrote:
>
> Try executing .onclick() instead of .click(). I'm not sure but it looks to
> me there is a difference because of the js code it should execute.
>
> Walter Mourão
> http://waltermourao.com.br
> http://arcadian.com.br
> http://oriens.com.br
>
>
>
> On Mon, Dec 1, 2008 at 1:11 PM, Bruno Marti <br...@evard.ch> wrote:
>
>>
>> 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 <br...@evard.ch>
>> 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 <br...@evard.ch>
>> >> > 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.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/-Trinidad--dialog-auto-submit-tp20682081p20786628.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.
Re: [Trinidad] dialog auto submit
Posted by Walter Mourão <wa...@gmail.com>.
Try executing .onclick() instead of .click(). I'm not sure but it looks to
me there is a difference because of the js code it should execute.
Walter Mourão
http://waltermourao.com.br
http://arcadian.com.br
http://oriens.com.br
On Mon, Dec 1, 2008 at 1:11 PM, Bruno Marti <br...@evard.ch> wrote:
>
> 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 <br...@evard.ch>
> 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 <br...@evard.ch>
> >> > 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.
>
>
Re: [Trinidad] dialog auto submit
Posted by Bruno Marti <br...@evard.ch>.
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 <br...@evard.ch> 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 <br...@evard.ch>
>> > 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.
Re: [Trinidad] dialog auto submit
Posted by Walter Mourão <wa...@gmail.com>.
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 <br...@evard.ch> 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 <br...@evard.ch>
> > 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.
>
>
Re: [Trinidad] dialog auto submit
Posted by Bruno Marti <br...@evard.ch>.
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 <br...@evard.ch>
> 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.
Re: [Trinidad] dialog auto submit
Posted by Walter Mourão <wa...@gmail.com>.
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 <br...@evard.ch> 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.
>