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 14:55:27 GMT
Hi!

    

>> why not getElementsByName[0] ?
>>   
>>     
>
> Well, in general document.getElementById is both faster and more elegant.
>
> So in this case, rendering this component with id=clientId seems reasonable.
>
> Hmm..but it is possible that there are multiple "view state" fields in
> the page, one per form. So perhaps using "getElementsByName" is a good
> idea in this specific case.
>   
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.

Ciao,
Mario


Mime
View raw message