aspose file tools
The moose likes JSF and the fly likes invoke a bean's method in JSF data table Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "invoke a bean Watch "invoke a bean New topic
Author

invoke a bean's method in JSF data table

lijun wang
Greenhorn

Joined: Jan 20, 2006
Posts: 28
I have A bean like this:
=============================================================
public class UserEventDataBean implements Serializable {

private Timestamp userEventDate;

public String getDateLocalFormatted() {
return DateTimeAdjust.getDateLocalFormatted(userEventDate);
}

public String getTimeLocalFormatted() {
return DateTimeAdjust.getTimeLocalFormatted(userEventDate);
}

public Timestamp getUserEventDate() {
return userEventDate;
}

public void setUserEventDate(Timestamp userEventDate) {
this.userEventDate = userEventDate;
}
}
=================================================================

can I do like this:
=================================================================
<h utputText id="text12"
value="# varuserEventFacadeFindEventsByDateRangeResultBean.getDateLocalFormatted()}"
styleClass="outputText">
</h utputText>
==================================================================
Gregg Bolinger
Ranch Hand

Joined: Jul 11, 2001
Posts: 15229

varuserEventFacadeFindEventsByDateRangeResultBean.dateLocalFormatted

Note there is no get or ().
gopal kishan
Ranch Hand

Joined: Feb 23, 2005
Posts: 99
hi

for buttons:



for other field

 
I agree. Here's the link: http://jrebel.com/download
 
subject: invoke a bean's method in JSF data table
 
Similar Threads
h:commandLink and page Navigation
Input in a Nested table
JSF java.util. Concurrent ModificationException
how to set ' - -' if there is no value for that column??
Property can't be found that's definitely there!