-
1. Re: a4j:support doesn't work on h:selectOneRadio
liuliu Jul 30, 2008 7:55 AM (in response to user080701)i think event should use onclick for radiobutton
-
2. Re: a4j:support doesn't work on h:selectOneRadio
user080701 Jul 30, 2008 9:29 PM (in response to user080701)I changed to onclick, but it still doesn't work!
The ajax works on a4j:commandLink,
<a4j:commandLink action="#{cart.delete}" reRender="cart,cartno">
<h:outputText value="Delete" />
</a4j:commandLink>
Has any idea? -
3. Re: a4j:support doesn't work on h:selectOneRadio
user080701 Jul 31, 2008 2:49 AM (in response to user080701)Hi,
I change to disable the components in the panelGrid instead of rendered on panelGrid and it works.
e.g.
<h:selectOneRadio id="devption" value="#{myBean.option}" layout="pageDirection" valueChangeListener="#{myBean.valueChanged}">
<f:selectItem itemValue="0" itemLabel="#{msg.option_one}"/>
<f:selectItem itemValue="1" itemLabel="#{msg.option_two}"/>
<a4j:support event="onchange" ajaxSingle="true" id="dummy_id" reRender="address_line1"/>
</h:selectOneRadio>
<h:inputText id="address_line1" label="#{msg.address_line1}" required="true" disabled="#{!myBean.showAddress}"></h:inputText>
It seems that we cannot rerender the component to make it invisible via ajax. Is it right? -
4. Re: a4j:support doesn't work on h:selectOneRadio
liuliu Jul 31, 2008 6:02 AM (in response to user080701)
reRender some component with rendered attribute is not a good idea. read about a4j:outpoutPanel layout="none", there are the answer. -
5. Re: a4j:support doesn't work on h:selectOneRadio
user080701 Aug 1, 2008 12:22 AM (in response to user080701)It doesn't work!
I follow the doc to change my code
<a4j:support event="onclick" reRender="mypanel"/>
...
<a4j:outputPanel layout="none">
<h:panelGrid border="0" columns="2" id="mypanel" rendered="#{not myBean.showAddress}">
....
The panelGrid haven't hidden when sesct the radio button.
Please help! -
6. Re: a4j:support doesn't work on h:selectOneRadio
user080701 Aug 1, 2008 1:01 AM (in response to user080701)Oh! I know the reason.
It is because the components <h:selectOneRadio> and <h:panelGrid> is located in another outer <h:panel>.
When I re-render the outer <h:panel>, the hide/show effect is working now.
Thanks