myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Petri (JIRA)" <>
Subject [jira] Created: (TRINIDAD-1755) Refresh problems with tr:tabel using a filter string defined in a tr_inputText
Date Mon, 15 Mar 2010 13:52:27 GMT
Refresh problems with tr:tabel using a filter string defined in a tr_inputText

                 Key: TRINIDAD-1755
             Project: MyFaces Trinidad
          Issue Type: Bug
          Components: Components
    Affects Versions: 1.2.13-core 
         Environment: Trinidad 1.2.13, MyFaces 1.2.8, Tomahawk 1.1.9, Facelets 1.1.15, Tomcat
            Reporter: Markus Petri

In our application, we use a tr:inputText to filter the tables data using PPR.

1st problem:
When the filter method of the backing bean deliveres 1-4 matches, everything works fine. But
if there are more than 5 matches, I need to press the button twice to get the table re-rendered.

2nd problem:
We use the rows attribute to show 10 entries each page. If the filter method deliveres more
than 10 rows, I need also to click twice the "show next" link (but only the first time) to
get to the next page. After the first click, I can switch the pages as purposed. 

Here our *.jspx (this *jspx is included into a <t:panelTabbedPane><t:panelTab>
<tr:panelCaptionGroup captionText="#{resource['label.section.filteroptions']}" inlineStyle="margin-bottom:10px;">
 <table border="0" cellpadding="0" cellspacing="0">
  <td><tr:inputText id="filterString" 
	value="#{listing.filterString}" partialTriggers="cmd_reset" 
	onblur="if(this.value == ''){this.value='#{resource['text.filteroptions.default']}';
= '#A0A0A0';}" 
	onfocus="if(this.value == '#{resource['text.filteroptions.default']}'){this.value='';
= '#000000';}"
   <tr:selectOneChoice value="#{listing.filterDate}"> 
    <f:selectItem itemLabel="#{resource['selectBox.choice.allRegistrations']}" itemValue="0"/>
    <f:selectItem itemLabel="#{resource['selectBox.choice.todaysRegistrations']}" itemValue="1"/>
  <td><tr:commandButton id="cmd_filter" 
		  actionListener="#{listing.filter}" partialSubmit="true" />
   <td><tr:commandButton id="cmd_reset"
		  actionListener="#{listing.reset}" partialSubmit="true"/>
<tr:table binding="#{listing.table}" value="#{listing.regInfos}" var="regs" rowBandingInterval="1"
rows="10" partialTriggers="::cmd_filter ::cmd_reset ::pollid" immediate="true">
 <tr:column width="160" inlineStyle="vertical-align:top;" sortable="true" sortProperty="date">
  <f:facet name="header">
   <tr:outputText value="#{resource['table.registrations.plannedArrival']}"/>
  <tr:outputText value="#{}" id="date">
   <tr:convertDateTime pattern="#{resource['pattern.dateTime']}" type="both" />			
 <tr:column width="100" inlineStyle="vertical-align:top;">
  <f:facet name="header">
   <tr:outputText value="#{resource['']}"/>
  <tr:outputText value="#{regs.roomNumber}"/>

and the relevant part of the backing bean (using SESSION_SCOPE):
 * Process the filter action.
public void filter(ActionEvent e) {
public void refreshTable(){
private void initialize(){
	Authentication auth = SecurityContextHolder.getContext().getAuthentication();
	if (auth instanceof VirAuthenticationToken) {
		String login = ((VirAuthenticationToken)auth).getLogin();
		try {
			setRegInfos(ServiceUtils.getOpenRegistrations(login, getDefaultSearchString().equals(getFilterString())?
"" : getFilterString(),getFilterReriod()));
		}catch (RemoteException exc) {
			log.fatal("Error processing business method - Remote error - " + ServiceManager.getInstance().getServiceExceptionMessage(exc));

When debugging, it shows the same values both at the first and at the second click, but as
told before the table is only re-rendered after the second click.

Any suggestions?

Thanks in advance,

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message