Re: beginner question regarding “com.ocpsoft.vP_0”

Splash Forums PrettyFaces Users beginner question regarding "com.ocpsoft.vP_0" Re: beginner question regarding “com.ocpsoft.vP_0”

#22707

Glister
Participant

Hey Christian,

okay i think CODI is the evil. while debugging CODI i stepped into

DefaultWindowHandler.java

there is a code piece:

if(addRequestParameter)
{
url = JsfUtils.addParameters(externalContext, url, true, true, true);
}
else
{
url = JsfUtils.addParameters(externalContext, url, false, true, true);
}

addRequestParameter is true ! before the condition url is without the prettyfaces id.

after

JsfUtils.addParameters(externalContext, url, true, true, true);

i got my prettyfaces-id url.

okay stepped into the addParameters method

for(RequestParameter requestParam :
getParameters(externalContext, true, addRequestParameter, addPageParameter))
{
String key = requestParam.getKey();
... append append .... to url

okay and now,

key = "bId";

okay the root of evil is here in WindowContextManagerObserver.java

// add requst-parameters e.g. for f:viewParam handling
windowHandler.sendRedirect(FacesContext.getCurrentInstance().getExternalContext(), targetURL, true);

because the third parameter is true, the addParameter variable is true, too so … nasty url gets appended. :(