There is nothing special about the first property except that rows
always start at index zero. That's probably why your seeing the ninth
row displayed. I cannot say why your code behaves differently for a
value expression, but I'll try to test this myself.
Dan
John Yeary wrote:
> Hello All,
>
> I originally posted this to the dev list by mistake. This is the more
> appropriate list.
>
> I am trying to determine if the behavior I am seeing is abnormal. If I
> set the tag to a value such as 8 as noted below. This results in the
> table displaying rows starting at 9. This is okay.
>
> <webuijsf:tableRowGroup first="8" binding="#{ Page1.tableRowGroup1}"
> id="tableRowGroup1" rows="3" sourceData="#{Page1.tripDataProvider}"
> sourceVar="currentRow">
>
> The quirk is if I use a binding to set the value, it does not
> correctly set it to the appropriate value. See below.
>
> This is in the SessionBean:
>
> private int selectedValue = 8;
>
> public int getSelectedValue() {
> return selectedValue;
> }
>
> This is the new binding on the JSP:
>
> <webuijsf:tableRowGroup first="#{SessionBean1.selectedValue}"
> binding="#{Page1.tableRowGroup1}" id="tableRowGroup1" rows="3"
> sourceData="#{Page1.tripDataProvider}"
> sourceVar="currentRow">
>
> I would have expected it to start on row 9. Am I missing something, or
> is this a bug?
>
> I added a button to the table which sets the first value to the
> selectedValue and it works as expected.
>
> public String button1_action() {
> tableRowGroup1.setFirst(getSessionBean1().getSelectedValue() -
> 1);
> return null;
> }
>
> This is behavior I want, but I would expect that if I use a binding it
> should work too. I should not have to put a button on the page and
> force the user to press it to go to the selectedValue.
>
>
> John
>
> --
> John Yeary
> --
> "If I have seen further, it is because I have stood on the shoulders
> of giants..." Sir Isaac Newton