File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UI:Param

 
chiranjeevi gunturu
Ranch Hand
Posts: 59
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am trying to understand a some part of code in my project and came across a syntax which i dont know.

I have the following line of code in one xhtml file. the syntax given for value is not clear to me.





can some one help me here?
 
Rafael Cechinel Silvestri
Greenhorn
Posts: 1
Java Netbeans IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi chiranjeevi gunturu
Your code is too vague. You can post a more complete code?

Anyway i'll try explain the code above.

the first code sent a parameter name "sample" and string value "$SAMPLE$". The target where the value is set depends the more complete code.

the second code print the value of parameter name "sample" to html view. The value can be in request, session or application scope.

it would be like invoke a url through the GET method like this "http://url/index.jsf?sample=$SAMPLE$"
in your Servlet class you can retrive parameter like this

I hope I helped you
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17616
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"$SAMPLE$" looks like the kind of thing that a template processor would use to reference replaceable variables. However, JSF already has a template processor (EL), so this is a little strange.

In any event. any use of "ui:param" or other code-like constructs in a JSF View Definition (xhtml) should be a very rare occasion. The View Definition is supposed to be a template for the display. Logic should be located in the backing beans. Parameter passing between the two is usually not required because JSF has implicit mechanisms to handle such things.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic