[richfaces-issues] [JBoss JIRA] Created: (RF-5841) pattern of f:convertDateTime isn't applied for output on the same page.

Mikhail Vitenkov (JIRA) jira-events at lists.jboss.org
Thu Jan 22 07:28:44 EST 2009


pattern of f:convertDateTime isn't applied for output on the same page.
-----------------------------------------------------------------------

                 Key: RF-5841
                 URL: https://jira.jboss.org/jira/browse/RF-5841
             Project: RichFaces
          Issue Type: Bug
    Affects Versions: 3.3.1
         Environment: IE6, IE7, FF 3.1.3, Safari 3.1, Opera 9.62(3.3.1-snapshot)
            Reporter: Mikhail Vitenkov
            Assignee: Nick Belaevski


#1. Add following code on xhtml page:
<h:form>
		<h:selectOneRadio
			value="#{custom.pattern}">
			<f:selectItems value="#{custom.catalogDateFormatList}"
				hideNoSelectionLabel="true" />
			<a4j:support event="onclick" reRender="testDataTable,out">
			</a4j:support>
		</h:selectOneRadio>	
		<rich:dataTable id="testDataTable" value="#{custom.testList}"
			width="100%" var="_cat">
			<rich:column>
				<h:outputText value="_cat" />
				<h:outputText value="#{custom.testDate}">
					<f:convertDateTime pattern="#{custom.pattern}" />
				</h:outputText>
			</rich:column>
		</rich:dataTable>
		<br />
		<h:commandButton value="submit" />
		<h:outputText id="out" value="#{custom.testDate}">
			<f:convertDateTime pattern="#{custom.pattern}" />
		</h:outputText>	
	</h:form>
#2. Use following java bean code:
private String pattern;
	private ArrayList<SelectItem> catalogDateFormatList;
	private ArrayList<String> testList;
	private Date testDate;
...
+getters and setters
...
Inside constructor place:
catalogDateFormatList = new ArrayList<SelectItem>();
		testList = new ArrayList<String>();		
		pattern = "d/MMM/y";
		catalogDateFormatList.add(new SelectItem("d/MMM/y","d/MMM/y"));		
		catalogDateFormatList.add(new SelectItem("dd/M/yy HH:mm","dd/M/yy HH:mm"));
		for(int i=0;i<2;i++){
			testList.add("#" + i + " ");			
		}
		testDate = new Date();
#3. Navigate to page.
#4. Verify #{custom.testDate} date format - d/MMM/y
#5. Select "dd/M/yy HH:mm" radio button and verify date formay again.

Actual behavior:
Date pattern isn't applied for both output(inside and outside rich:dataTable).
But if you place tested outputs on another page and navigate to it, using a4j:support action - 
pattern, selected from radio button group is applied.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the richfaces-issues mailing list