-
1. Re: reRender issue: characters escaped
ilya_shaikovsky Apr 17, 2008 8:46 AM (in response to shakenbrain)Just tried next code
<h:form id="menu"> <a4j:commandButton reRender="panel"></a4j:commandButton> <a4j:outputPanel id="panel"> <s:link id="viewHotel" value="View Hotel" action="#{menucomponent.printParams}"> <f:param name="key1" value="1" /> <f:param name="key2" value="2" /> </s:link> </a4j:outputPanel> </h:form>
andpublic void printParams() { System.out.println(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("key1")); System.out.println(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("key2")); }
before and also after reRendering s:links prints me to console
before link reRendered
15:44:18,110 INFO [STDOUT] 1
15:44:18,110 INFO [STDOUT] 2
after link reRendered
15:44:32,929 INFO [STDOUT] 1
15:44:32,929 INFO [STDOUT] 2 -
2. Re: reRender issue: characters escaped
ilya_shaikovsky Apr 17, 2008 8:47 AM (in response to shakenbrain)tried under 3.2.1 snapshot.. So check please under 3.2.0 SR1
-
3. Re: reRender issue: characters escaped
shakenbrain Apr 17, 2008 9:48 AM (in response to shakenbrain)Ilya- thanks for taking a look at this. I'll try the 3.2.0 SR1 when I get to work. But unless I'm missing something in your response, the issue isn't with the values of the parameters changing- they have always been correct. The issue is with the parameter separator character ('&') in the http link generated by the s:link tag. After re-rendering, it is no longer the '&' character, but the escaped version of it.
Instead of:<a href="/page.html?param1=1¶m2=2">
we get<a href="/page.html?param1=1&param2=2">
Tom -
4. Re: reRender issue: characters escaped
shakenbrain Apr 17, 2008 9:52 AM (in response to shakenbrain)When previewing this post, the escaped version displays fine, but after it displays 'unescaped' after submitting it. I'll try this again:
Instead of<a href="/page.html?param1=1¶m2=2">
we get<a href="/page.html?param1=1&-#-3-8-;param2=2">
I added the dashes (-) just for the purposes of this post. -
5. Re: reRender issue: characters escaped
shakenbrain Apr 17, 2008 10:06 AM (in response to shakenbrain)Ilya- I apologize- I think I may have misunderstood your post. I'll try the latest version when I get to work (and am more awake). Tom
-
6. Re: reRender issue: characters escaped
nbelaevski Apr 17, 2008 11:30 AM (in response to shakenbrain)Hello,
I do not see the issue. Here is my link:http://localhost:8080/seam-booking/main.seam?key1=1&dataModelSelection=hot%3Ahotels%5B0%5D&key2=2&cid=60&actionMethod=main.xhtml%3AhotelBooking.selectHotel%28hot%29
Seam 2.0.1/RichFaces 3.2.0.SR1/JBoss 4.2.1.GA -
7. Re: reRender issue: characters escaped
nbelaevski Apr 17, 2008 11:35 AM (in response to shakenbrain)For the following code:
<h:form id="menu123"> <a:commandButton reRender="panel123" value="rerender"/> <a:outputPanel id="panel123"> <s:link id="viewHotelabc" value="View Hotel" > <f:param name="key1" value="1" /> <f:param name="key2" value="2" /> </s:link> </a:outputPanel> </h:form>
I get:http://localhost:8080/seam-booking/main.seam?key1=1&key2=2&cid=94
-
8. Re: reRender issue: characters escaped
nbelaevski Apr 17, 2008 11:40 AM (in response to shakenbrain)Clarification: I meant that I couldn't reproduce the issue