This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one 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 Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 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: 16460

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.
rocket mass heater kickstarter
subject: Using f:ajax in JSF