problem with datatable
arashbahal Jun 25, 2011 7:56 AMhi all.
i am new to richfaces.
i have a problem with rich:datatable filtering, the source code of my page is like the site example:
<
h:form
id
=
"form"
>
<
rich:dataTable
keepSaved
=
"true"
id
=
"richTable"
var
=
"record"
value
=
"#{citiesBean}"
rows
=
"20"
>
<
rich:column
>
<
f:facet
name
=
"header"
>
<
h:commandLink
action
=
"#{bean.toggleSort}"
>
#{bean.sortOrders['cityTitle']}
<
a4j:ajax
render
=
"richTable"
/>
<
f:setPropertyActionListener
target
=
"#{bean.sortProperty}"
value
=
"#{'cityTitle'}"
/>
</
h:commandLink
>
<
br
/>
<
h:inputText
value
=
"#{citiesBean.filterValues['cityTitle']}"
>
<
a4j:ajax
render
=
"richTable@body scroller"
event
=
"keyup"
/>
</
h:inputText
>
</
f:facet
>
<
h:outputText
value
=
"#{record['cityTitle']}"
/>
</
rich:column
>
<
rich:column
>
<
f:facet
name
=
"header"
>
<
h:commandLink
action
=
"#{bean.toggleSort}"
>
#{bean.sortOrders['cityCode']}
<
a4j:ajax
render
=
"richTable"
/>
<
f:setPropertyActionListener
target
=
"#{bean.sortProperty}"
value
=
"#{'cityCode'}"
/>
</
h:commandLink
>
<
br
/>
<
h:inputText
value
=
"#{citiesBean.filterValues['cityCode']}"
>
<
a4j:ajax
render
=
"richTable@body scroller"
event
=
"keyup"
/>
</
h:inputText
>
</
f:facet
>
<
h:outputText
value
=
"#{record['cityCode']}"
/>
</
rich:column
>
<
f:facet
name
=
"footer"
>
<
rich:dataScroller
id
=
"scroller"
/>
</
f:facet
>
</
rich:dataTable
>
</
h:form
>
every things seems OK but it has some problems.
1- datascroller does not work without render attribute set to 'richTable' but it works on demo!!!
2-when i type something on filter input, the table does not get updated!, i have checked the request and response on firebug,
the response does not have a valid id, i mean it look like this:
<update id="form:richTable:tb"><tbody id="form:richTable:0:tb" ....
what is wrong with my codes?!
i am using, richfaces 4, glassfish 3.1, firefox 3.6
thanks in advance.