2 <a4j:support> on the same event

View: New views
2 Messages — Rating Filter:   Alert me  

2 <a4j:support> on the same event

by Olivier Terral :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all ,

I try to use 2 <a4j:support> tag on the same event but it seems the 2nd was totally ignored

<h:selectOneMenu id="bbox">
                       <f:selectItem itemLabel="world" itemValue="-179,-89,179,89"></f:selectItem>
                       <f:selectItem itemLabel="North West" itemValue="-179,0,0,89"></f:selectItem>
                       <f:selectItem itemLabel="North East" itemValue="0,0,179,89"></f:selectItem>
                       <f:selectItem itemLabel="South West" itemValue="-179,-89,0,0"></f:selectItem>
                       <f:selectItem itemLabel="South East" itemValue="0,-89,179,0"></f:selectItem>
                       <a4j:support event="onchange" reRender="j_id6" />
                        <a4j:support event="onchange" reRender="j_id7" />
</h:selectOneMenu>


I know I could reRender the 2 object (j_id6,j_id7) in the same a4j:support but it's important for me there was 2 request send to the server and not one (performance issue).

Even if I add id attribute to the 2 a4j:support , it seems the 2nd a4j:support take the id of the first one and so the JSF page doesn't load and say  : avax.servlet.ServletException: javax.servlet.jsp.JspException: java.lang.IllegalStateException: Duplicate component id: 'idDuForm:du', first used in tag: 'org.ajax4jsf.taglib.ajax.AjaxSupport'



Any help will be very appreciate.

Re: 2 <a4j:support> on the same event

by Ilya Shaikovsky :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Such construction fully illegal.

B.t.w. this list deprecated. Write to JBoss forums.

Olivier Terral пишет:

> Hi all ,
>
> I try to use 2 <a4j:support> tag on the same event but it seems the 2nd was
> totally ignored
>
> <h:selectOneMenu id="bbox">
>                        <f:selectItem itemLabel="world"
> itemValue="-179,-89,179,89"></f:selectItem>
>                        <f:selectItem itemLabel="North West"
> itemValue="-179,0,0,89"></f:selectItem>
>                        <f:selectItem itemLabel="North East"
> itemValue="0,0,179,89"></f:selectItem>
>                        <f:selectItem itemLabel="South West"
> itemValue="-179,-89,0,0"></f:selectItem>
>                        <f:selectItem itemLabel="South East"
> itemValue="0,-89,179,0"></f:selectItem>
>                        <a4j:support event="onchange" reRender="j_id6" />
>                         <a4j:support event="onchange" reRender="j_id7" />
> </h:selectOneMenu>
>
>
> I know I could reRender the 2 object (j_id6,j_id7) in the same a4j:support
> but it's important for me there was 2 request send to the server and not one
> (performance issue).
>
> Even if I add id attribute to the 2 a4j:support , it seems the 2nd
> a4j:support take the id of the first one and so the JSF page doesn't load
> and say  : avax.servlet.ServletException: javax.servlet.jsp.JspException:
> java.lang.IllegalStateException: Duplicate component id: 'idDuForm:du',
> first used in tag: 'org.ajax4jsf.taglib.ajax.AjaxSupport'
>
>
>
> Any help will be very appreciate.
>
>  


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

LightInTheBox - Buy quality products at wholesale price!