Okay, I had to make a workaround and posting this here as an FYI to
anyone who wants to do the same (or if someone has a better idea). The
problem is the the default HtmlDataScroller sets the first to a
integer. I needed the ability to have an EL expression so I could
get/set this value in a backing bean.
In the JSF I had:
<t:dataTable first="#{bean.firstRow}"
This worked fine until the data scroller was used. The EL expression
was never used again since the UIData now had a "local" value of
first.
Here is my workaround so that EL would always be used for first.
1) create a new class that extends
org.apache.myfaces.component.html.ext.HtmlDataTable
2) Override setFirst:
@Override
public void setFirst(int first)
{
ValueBinding vb = getValueBinding("first");
if (vb != null)
{
vb.setValue(getFacesContext(), first);
return;
}
else
super.setFirst(first);
}
3) created a new tag in my taglib.xml file (this is because I don't
want all tables to behave this way)
4) set the new tag's component type to a new type
5) registered the new tag's component type in my faces-config.xml to
point to the new component
Now the value is always set on my backing-bean and always retrieved
from my backing bean. Therefore, I can have code in the
actionListener/action that is able to change the first row of the
UIData without using component binding.
-Andrew