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 UI:Param Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "UI:Param " Watch "UI:Param " New topic
Author

UI:Param

chiranjeevi gunturu
Ranch Hand

Joined: Mar 02, 2007
Posts: 59
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

Joined: Oct 04, 2012
Posts: 1

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


regards,
Rafael Cechinel Silvestri
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16020
    
  20

"$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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: UI:Param