<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "JSF problem - Validation error"]]></title>
		<link>http://forums.hotjoe.com/posts/list/9.page</link>
		<description><![CDATA[Latest messages posted in the topic "JSF problem - Validation error"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>JSF problem - Validation error</title>
				<description><![CDATA[ In my sample project the UI is powered by JSF, overall application architecture is J2EE.<br /> In a scenario,we have a page where we toggle between radio buttons and page reloads everytime we toggle, with different forms.<br /> In specific we have three radion buttons namely x ,y and z.<br /> When the default page loads x is selected and when i shift my selection to y the page reloads with different forms and no error is seen.<br /> Next when i select z page reloads with different forms but error is displayed on the top of the page as below<br /> "Validation error:Value is not valid."<br /> Once the error is dispalyed on the page the error continues to remain eventhough we revert back the radio selection.<br /> In the above case jsp calls the js and the snippet of the same is as below<br /> <br /> JSP snippet:<br /> -------------------<br /> &lt;TD&gt;&lt;h:selectOneRadio styleClass="selectOneRadio" id="radio1"<br /> value="#{sessionScope.sameJam}"<br /> onclick=return jump_onclick(this,event);&gt;<br /> &lt;f:select itemValue="x"<br /> itemLabel="#{labels.label_x}" /&gt;<br /> &lt;f:select itemValue="y"<br /> itemLabel="#{labels.label_y}" /&gt;<br /> &lt;f:select itemValue="z"<br /> itemLabel="#{labels.label_z}" /&gt;<br /> &lt;/h:selectOneRadio&gt;&lt;/TD&gt;<br /> <br /> JS snippet:<br /> -----------------<br /> function jump_onclick(thisObj,thisEvent){<br /> thisObj.form.submit();<br /> }<br /> <br /> Java code:<br /> -------------<br /> protected HtmlSelectOneRadio getRadio1() {<br /> if (radio1 == null) {<br /> radio1 = (HtmlSelectOneRadio) findComponentInRoot("radio1");<br /> 	}<br /> 		<br /> return radio1;<br /> <br /> Thanks in advance.]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/379/1569.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/379/1569.page</link>
				<pubDate><![CDATA[Tue, 13 Nov 2007 10:37:20]]> GMT</pubDate>
				<author><![CDATA[ karl]]></author>
			</item>
			<item>
				<title>Re:JSF problem - Validation error</title>
				<description><![CDATA[ I feel like I don't have enough information to answer what is going on.  Can you post some more information?  Specifically, it seems like the error you're getting is "internal" - that is, you're letting JSF do the validation but I don't see  any validation type code.<br /> <br /> Can you post a bit more?]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/379/1571.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/379/1571.page</link>
				<pubDate><![CDATA[Wed, 14 Nov 2007 20:14:17]]> GMT</pubDate>
				<author><![CDATA[ stdunbar]]></author>
			</item>
			<item>
				<title>JSF problem - Validation error</title>
				<description><![CDATA[ I do not have any validation code as such.<br /> <br /> Few more details..<br /> <br /> sameJam is a String, there is no method implementation.<br /> <br /> Below is sameJam code snippet:<br /> <br /> private static final String SAME_JAM = "SameJam";<br /> private static final String S_T_B = "th";<br /> .<br /> .<br /> .<br /> .<br /> public SSR() {<br /> <br /> String sameJam = (String) sessionScope.get(SAME_JAM);<br /> <br /> if (sameJam == null) {<br /> sessionScope.put(SAME_JAM, S_T_B);<br /> }<br /> .<br /> .<br /> .<br /> .<br /> String sameJam = (String) sessionScope.get(SAME_JAM);<br /> <br /> if (sameJam.equalsIgnoreCase(SAME_JAM_x)) {<br /> abc.setabcType(SEARCH_x);<br /> abc.setabcObject(x_B_OBJ);<br /> this.populate_x(abc);<br /> } else if (sameJam.equalsIgnoreCase(SAME_JAM_y)) {<br /> abc.setabcType(SEARCH_y);<br /> abc.setabcObject(y_B_OBJ);<br /> this.populate_y(abc);<br /> } else {<br /> abc.setabcType(z_TX);<br /> abc.setabcObject(z_B_OBJ);<br /> this.populate_z(abc);<br /> } <br /> <br /> Problem i am facing is:<br /> - Form not loading properly.<br /> - When i toggle between radio buttons, the radio retains the same value irrespective of button selected.<br /> This was verified with some debug statements as below:<br /> radio----------&gt; x<br /> radio----------&gt; x<br /> radio----------&gt; x<br /> <br /> Expected result:<br /> <br /> --------------------------------------------------------------------------------<br /> radio should have populated different values. <br /> <br /> If you need further details i can let you know...<br /> ]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/379/1573.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/379/1573.page</link>
				<pubDate><![CDATA[Thu, 15 Nov 2007 00:59:16]]> GMT</pubDate>
				<author><![CDATA[ karl]]></author>
			</item>
	</channel>
</rss>
