-
1. Re: urgent help required, a4j onchange event
ilya_shaikovsky Nov 5, 2008 5:15 AM (in response to valatharv)the code seems looks ok.. sorry, but could not understand the problem with your description.
-
2. Re: urgent help required, a4j onchange event
nbelaevski Nov 5, 2008 6:12 AM (in response to valatharv)Hi,
Try to add<a4j:support bypassUpdates= "true" ...>
-
3. Re: urgent help required, a4j onchange event
valatharv Nov 5, 2008 9:43 AM (in response to valatharv)Edit screen: I tried adding bypassUpdates="true" in "a:support" tag but still it updates the database as soon as I select any other value from dropdown.
Create Screen : Using bypassUpdates="true" does not change the other dropdowns in "panel"
Ilya : Issue is, as soon as I change 1st dropdown value, this value is immediately updated in database before even clicking update button.
<a:region renderRegionOnly="false">
<s:decorate id="quantationDec" template="layout/edit.xhtml">
<ui:define name="label">Item : </ui:define>
<h:selectOneMenu value="#{itemList.instance.item}" required="true"
styleClass="message">
<f:selectItem itemValue="A" itemLabel="A"/>
<f:selectItem itemValue="B" itemLabel="B"/>
<f:selectItem itemValue="C" itemLabel="C"/>
<a:support event="onchange" reRender="panel" bypassUpdates="true"/>
</h:selectOneMenu>
</s:decorate>
</a:region> -
4. Re: urgent help required, a4j onchange event
ilya_shaikovsky Nov 5, 2008 11:44 AM (in response to valatharv)Look.. a4j:support works fully the same as h:command except that it uses xmlHttpRequest to rise submit on some event and updates only parts of page. So if your db entities updates after simple h:command* submit - the same will be done during ajax request. So just create some buffer bean which fields will be populated to db only after some action.
-
5. Re: urgent help required, a4j onchange event
valatharv Nov 5, 2008 2:14 PM (in response to valatharv)Thanks for the replying Ilya...
We will only have 1 main 1st. dropdown and 3 other child dropdowns, it is very trival...
Is there no other way instead of writing buffer bean.
I have tried a lot using other simple JSF and Ajax using bean but our child drop-downs will be in UI repeat which will be added dynamically...