-
15. Re: JSF Custom Component and ajax4jsf problem
krbaburaj Dec 26, 2010 1:05 PM (in response to krbaburaj)One more thing i had found
1) EL expression is not working in rendered property ... Even though the value is true ... the rendering is not happening
2) If im give the value as "TRUE" then rendering is happening
what is wrong with my code...this is meaningful...please help me with ur expereince
-
16. Re: JSF Custom Component and ajax4jsf problem
ilya40umov Dec 26, 2010 1:21 PM (in response to krbaburaj)1) try to remove ajaxSingle
2) try to use valueChangeListener if you have not done it bofore
3) try to debug getters(it's very possible that JSF does not call your getters when it rerender page)
4) try to create and debug the same stuff without custom component(it can simplify finding of problem because there could be several problems with rerendering and with your custom component)
-
17. Re: JSF Custom Component and ajax4jsf problem
krbaburaj Dec 26, 2010 1:27 PM (in response to krbaburaj)Hooi... working fine .. done it
The error is in TAG class i had given the renderer data type as Boolean(Wrapper class)
So when data is setting the, EL is not passed, instead of EL the real value is passed... so always the very first value(ie value at the time of rendering) is setting. So dynamic EL value will not work out. I gave the data type as String. So the EL is setting , thus value expression is called.
One more thing
public Object saveState(FacesContext context) {
Object[] values = new Object[2];
values[0] = super.saveState(context);
values[1] = showSecond ? Boolean.TRUE : Boolean.FALSE; // this is need to change
// values[2] = isRendered(); Since this is dynamically calling, do not use this. Save statie is for static data
return values;
}
public void restoreState(FacesContext context, Object state) {
Object[] values = (Object[]) state;
super.restoreState(context, values[0]);
showSecond = ((Boolean) values[1]).booleanValue(); // this is need to change
// setRendered(((Boolean)values[2]).booleanValue()); // here also same definition as in saveState method
}It had spend a lot of my valuable time....
-
18. Re: JSF Custom Component and ajax4jsf problem
krbaburaj Dec 26, 2010 1:32 PM (in response to ilya40umov)Illya in my example i used ..both custom and non custome... non custome is working fine..custome is failing... thanks Ilya for your valuable commens.. anyway we fond success in that... its another experiance...
-
19. Re: JSF Custom Component and ajax4jsf problem
ilya40umov Dec 26, 2010 1:36 PM (in response to krbaburaj)Thank you for your question. =) It was nice to talk to you.
-
20. Re: JSF Custom Component and ajax4jsf problem
krbaburaj Dec 26, 2010 1:43 PM (in response to ilya40umov)Why im not going for facelets , in my current situation , i cant use xhtml...that is why i go for the old stuff..yes Ilya, in the past 2 weeks i had studied a lot of things... yes Ilya it was a nice talk. Experience is directly propotionl to number of programs(applications) u made ruined . a good sentence na.... im going to sleep ..here time is 12.30 mid nite ...past 2 weeks was sleep less ..good nite Ilya.. once again thank u very much