myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mario Ivankovits <ma...@ops.co.at>
Subject Re: [trinidad] Why <input type="hidden" name="javax.faces.ViewState" ... does not render its id?
Date Thu, 12 Jun 2008 15:20:53 GMT
Hi!
>> And also ensure that every ViewState will be replaced and not only the
>> first [0] one.
>> When you do have multiple JSF forms (which is valid) each ViewState
>> needs to be replaced.
>>     
> Yes, but only when they came from the same view!
>
> I don't know much about JSF "portal bridge" stuff. Can this result in a
> page contains a form that was rendered via JSF from host A, and a
> different form that was rendered via JSF from host B?
I'd say yes. You might be right.
Don't know much about protlets either, but, I guess one solution can be 
to replace only those ViewState fields with the same value as the one 
associated with the form the component is embedded in.

Lets speak code:

var enclosingForm = findEnclosingForm(theComponent);
var oldViewState = enclosingForm["ViewState"].value;
for (form : forms)
{
        if (form["ViewState"].value == oldViewState)
        {
             form["ViewState"].value = newViewState;
        }
}

Or do any portlet have its own namespace reflected into the element id?
Then this could be checked too, though, this will be a portlet specific 
solution then.

Ciao,
Mario


Mime
View raw message