This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes Using f:ajax in JSF 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 "Using f:ajax in JSF" Watch "Using f:ajax in JSF" New topic

Using f:ajax in JSF

Lav Bull

Joined: May 25, 2013
Posts: 3
Hello guys,
I am badly in need of using f:ajax functionality for my application. I have a form in which I have to use ajax to submit that form and then update another component with this form data that got submitted. The component that is to be updated in my case is a fragment tag.
My code is as follows:

<h:form id="formid">
<h:inputHidden id="" value="#" />
<h:inputHidden id="" value="#" />
<h:panelGrid columns="2">
<h:inputText id="someid" value="#{}">
<f:convertDateTime pattern="HH:mm" type="time" />
<h:inputText id="someid" value="#{}">
<f:convertDateTime pattern="HH:mm" type="time" />
<h:inputText id="someid" value="#{}"/>
<h:commandButton value="Submit" action="#{someaction}" />
<h:commandButton value="Quick search" action="#{}">
<f:ajax execute="formid" render="fragmentid"/>
<ui:fragment rendered="some conditon" id="fragmentid">
<ui:repeat value="some collection" var="individual item" id="someid">

Here the render attribute of f:ajax says id with "fragmentid" not found.
Really I stuck. Need help asap!!

Thanks in advance!! :)
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960

Hint: use the Code button to create tags that can be wrapped around your XML and make it easier to read.

I can't see anything wrong with your outline there, so the things I'd look for would be possible mis-spellings or mis-capitalizations of "fragmentid". Also, check to see if ui:fragment is an actual UI element. A good indication is to check its documentation and verify that the "rendered" attribute is indeed allowed for that element type.

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: Using f:ajax in JSF
Similar Threads
Display a Popup instead of an error-message at conversionError
ui:repeat, c:foreach in JSF 2.0
Number of <h:form > tags on a page
dynamic div gets reset
Ajax listener method is not fire for other(except first) component