File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes JSF Execution Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF Execution Problem" Watch "JSF Execution Problem" New topic
Author

JSF Execution Problem

Abraham Raju
Greenhorn

Joined: Nov 08, 2012
Posts: 1
Hi,
I am working on JSF 2.0. I created one JSF page in my project and after deploying, when i opened my JSF page in the browser and by clicking view source code i observed that some extra code is added at the last. I did not understand why that code is added at the last after deploying.
For Example the below is one of my JSF pages source code
<!--

function clear_jsfForm()
{
clearFormHiddenParams_jsfForm('jsfForm');
}

function clearFormHiddenParams_jsfForm(currFormName)
{
var f = document.forms['jsfForm'];
f.elements['orgId'].value='';
f.elements['id'].value='';
f.elements['jsfForm:scroll_1'].value='';
f.elements['jsfForm:_idcl'].value='';
f.elements['tschid'].value='';
f.elements['jsfForm:_link_hidden_'].value='';
f.target='';
}

clearFormHiddenParams_jsfForm();
//--></script><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="rO0ABXVyABNbTGphdmEubGFuZy5PYmplY3Q7kM5YnxBzKWwCAAB4cAAAAAN0AAEzcHQAGy9qc3AvZXhwL0pFWFBQSVYwMTAwVjAxLmpzcA==" /></form>

<!-- MYFACES JAVASCRIPT -->

can any one of you please tell me why this is happening!!!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

Welcome to the JavaRanch, Abraham!

JSF is a general-purpose MVC framework system that binds View Templates and Models via vendor-supplier Controllers (the FacesServlet and the logic processors for the JSF tags).

The most common - although not the only - way of rendering the View is to convert it to HTML for use in a web browser. You are surprised that the client version of the View should contain meta-data and functionality that makes the Controller tasks easier?


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JSF Execution Problem
 
Similar Threads
onclick event causing javascript error in jsf.js (jsf-impl.jar file)
Difference in behaviour between javascript click() and user click on a button using JSF
input type="hidden" value="....a chain of rubbish letter..."!!
[JSF2] Hidden input "javax.faces.ViewState" attribute "autocomplete" causes validation failed
Incorrect state saving of the part of the view ?