Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Duplicate
-
Affects Version/s: EE-1.8.2.GA_P04
-
Fix Version/s: EE-1.8.2.GA_P05
-
Component/s: Facelet Components
-
Labels:None
-
Environment:ICEfaces 1.8.2 EE_P04, Tomcat 7.0.14, Chrome, IE, FF
-
Assignee Priority:P1
Description
The table header is not displayed correctly if the column is sorted in an autosortTable. The problem occurs only if there is an UTF-8 character in the title, because in the CommandSortHeaderRenderer at line 86, the text-value is escaped.
E.g. the column title 'Érték' is transformed to 'Érték' if the column is sorted. Otherwise it is displayed correctly.
To reproduce use the following sample page:
<html xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:ice-cc="http://www.icesoft.com/icefaces-composite-comps">
<head>
<title>Case 10820</title>
<ice:outputStyle href="./xmlhttp/css/rime/rime.css" />
<ice-cc:css/>
</head>
<body>
<ice:form>
<f:view>
<ice-cc:autoSortTable id="entries" bean="#{autoSortBean.autoSortData}" showRowControls="false" paginatorMaxPages="4" >
<ice-cc:column title="Nyelv" name="id" value="#{row.id}" sortable="true"/>
<ice-cc:column title="Kulcs" name="name" value="#{row.name}" sortable="true"/>
<ice-cc:column title="Érték" name="phone" value="#{row.phone}" sortable="true"/>
</ice-cc:autoSortTable>
</f:view>
</ice:form>
</body>
</html>
And a bean like this:
public class AutoSortBean implements Serializable {
private ArrayList<Employee> data;
private AutoSortTableBean autoSortData;
public AutoSortBean() {
data = new ArrayList<Employee>();
for(int i=0; i<10; i++)
{
Employee entry = new Employee();
entry.setId(i);
entry.setName("Employee "+i);
entry.setPhone("555-555"+i);
entry.setSite("Some random place");
entry.setArea("Alberta");
data.add(entry);
}
}
public AutoSortTableBean getAutoSortData() {
if(autoSortData == null)
autoSortData = new AutoSortTableBean(data, "id");
return autoSortData;
}
}
You should be able to see results demonstrated in the attached screen shots.
E.g. the column title 'Érték' is transformed to 'Érték' if the column is sorted. Otherwise it is displayed correctly.
To reproduce use the following sample page:
<html xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:ice-cc="http://www.icesoft.com/icefaces-composite-comps">
<head>
<title>Case 10820</title>
<ice:outputStyle href="./xmlhttp/css/rime/rime.css" />
<ice-cc:css/>
</head>
<body>
<ice:form>
<f:view>
<ice-cc:autoSortTable id="entries" bean="#{autoSortBean.autoSortData}" showRowControls="false" paginatorMaxPages="4" >
<ice-cc:column title="Nyelv" name="id" value="#{row.id}" sortable="true"/>
<ice-cc:column title="Kulcs" name="name" value="#{row.name}" sortable="true"/>
<ice-cc:column title="Érték" name="phone" value="#{row.phone}" sortable="true"/>
</ice-cc:autoSortTable>
</f:view>
</ice:form>
</body>
</html>
And a bean like this:
public class AutoSortBean implements Serializable {
private ArrayList<Employee> data;
private AutoSortTableBean autoSortData;
public AutoSortBean() {
data = new ArrayList<Employee>();
for(int i=0; i<10; i++)
{
Employee entry = new Employee();
entry.setId(i);
entry.setName("Employee "+i);
entry.setPhone("555-555"+i);
entry.setSite("Some random place");
entry.setArea("Alberta");
data.add(entry);
}
}
public AutoSortTableBean getAutoSortData() {
if(autoSortData == null)
autoSortData = new AutoSortTableBean(data, "id");
return autoSortData;
}
}
You should be able to see results demonstrated in the attached screen shots.
The header was displaying correctly with IF 1.8.2_P03