aspose file tools*
The moose likes JSF and the fly likes VIEWSTATE hidden field size getting increased in UI - JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "VIEWSTATE hidden field size getting increased in UI - JSF" Watch "VIEWSTATE hidden field size getting increased in UI - JSF" New topic
Author

VIEWSTATE hidden field size getting increased in UI - JSF

David samueal
Greenhorn

Joined: Aug 03, 2011
Posts: 19
Hello All,

I am using JSF 1.2, and i am having the STATE_SAVING_METHOD as 'client'.

So when i view the page, sometime in some JSP, the viewstate input hidden value is becoming so big and it is not getting closed properly.

Hence the hidden field is getting printed in UI.

Please suggest some workaround to decrease the size of viewstate hidden input field, or to split the single input hidden field to multiple hidden filed if the size exceeds more. (I know this issue going to address in JSF 2.2, but i want the workaround now to fix this issue.


Thanks,
David
David samueal
Greenhorn

Joined: Aug 03, 2011
Posts: 19
I also changed the STATE_SAVING_METHOD as 'server', but still the problem is not resolved.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16236
    
  21

I'm afraid that this doesn't make any sense to me. Could you provide some concrete examples?


Customer surveys are for companies who didn't pay proper attention to begin with.
David samueal
Greenhorn

Joined: Aug 03, 2011
Posts: 19
Tim Holloway wrote:I'm afraid that this doesn't make any sense to me. Could you provide some concrete examples?


Hi Tim,

The view state is stored in a hidden input field with the name javax.faces.ViewState, so in every page of my application i can able to see this hidden filed got generated automatically by JSF by viewing the source of HTML.

So in my situation, only few scenerios this view state filed value e.g : <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/wEPDwUKLTk2Njk3OTQxNg9kFgICAw9kFgICCQ88KwANAGQYAQUJR3Jp
ZFZpZXcxD2dk4sjERFfnDXV/hMFGAL10HQUnZbk=" />

In some scenerio's the value is getting increased and it is overflows in the page. So this hidden filed getting printing in the JSP.

So i need some workaround to limit the size of this field's value or split this single hidden filed to multiple filed if the value becomes so large.

Thanks
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16236
    
  21

I've been working with JSF since 2006 and I've never, ever seen this problem in any version of JSF.

The only thing that I can figure out is that you're doing something architecturally weird, since you use the phrase "view the page, sometime in some JSP", and I don't have a clue as to what that is supposed to mean.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: VIEWSTATE hidden field size getting increased in UI - JSF