Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Mastering JavaServer Faces 2.2
  • Table Of Contents Toc
Mastering JavaServer Faces 2.2

Mastering JavaServer Faces 2.2

By : Anghel Leonard
4.3 (15)
close
close
Mastering JavaServer Faces 2.2

Mastering JavaServer Faces 2.2

4.3 (15)
By: Anghel Leonard

Overview of this book

A homogenous guide integrating the features of JSF 2.x (2.0, 2.1 and 2.2), following a “learning through examples” paradigm with its main focus on the advanced concepts of JSF. If you are a web developer who uses JSF, this is the book for you. Catering to an intermediate-advanced audience, the book assumes you have fundamental knowledge of JSF. It is intended for the developer who wants to improve their skills with the combined power of JSF 2.0, 2.1, and 2.2.
Table of Contents (15 chapters)
close
close
13
A. The JSF Life Cycle
14
Index

AJAX and <f:param>


The <f:param> tag can be used to pass request parameters to a managed bean. Since we have discussed this tag in detail in Chapter 2, Communication in JSF, we can continue here with an example of using it inside <f:ajax>:

<h:form>
  <h:inputText id="nameInputId" value="#{ajaxBean.name}"/>
  <h:commandButton value="Send" action="#{ajaxBean.ajaxAction()}">
    <f:ajax execute ="nameInputId" render="nameOutputId">
      <f:param name="surnameInputId" value="Nadal"/>
    </f:ajax>
  </h:commandButton>
  <h:outputText id="nameOutputId" value="#{ajaxBean.name}"/>
</h:form>

Remember that the parameter that was passed is available in the request parameter map:

FacesContext fc = FacesContext.getCurrentInstance();
  Map<String, String> params = 
             fc.getExternalContext().getRequestParameterMap();
  logger.log(Level.INFO, "Surname: {0}", params.get("surnameInputId"));

Note

Keep in mind that <f:param...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Mastering JavaServer Faces 2.2
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon