You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Michael Heinen (JIRA)" <de...@myfaces.apache.org> on 2006/11/01 18:26:18 UTC

[jira] Created: (TOMAHAWK-764) ValueBinding lost for first attribute

ValueBinding lost for first attribute
-------------------------------------

                 Key: TOMAHAWK-764
                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-764
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: Extended Datatable
    Affects Versions: 1.1.3, 1.1.4-SNAPSHOT
         Environment: myFaces core1.1.4
tomahawk 1.1.4 Snapshot
            Reporter: Michael Heinen


There is a major bug using the t:datatable in conjunction with the t:datascroller and a valueBinding for the first attribute.
The HtmlDataScroller erases this value binding due to the fact, that it calls setFirst with an int in the broadcast method.
If the page is then reloaded via ajax, then first contains a pagenumber instead of the valuebinding.

Patch for setFirst:
    public void setFirst(int first)
    {
      ValueBinding vb = getValueBinding("first");
      if (vb != null)
      {
        //do nothing and keep the valueBinding
        return;
      }
      else
        if (_preservedDataModel != null)
        {
            //Also change the currently restored DataModel attribute
            _preservedDataModel.setFirst(first);
        }
        super.setFirst(first);
    }   

see this threads:
http://marc.theaimsgroup.com/?l=myfaces-user&m=116211813709147&w=2
http://marc.theaimsgroup.com/?l=myfaces-user&m=114529361608223&w=2

Michael

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

        

[jira] Resolved: (TOMAHAWK-764) ValueBinding lost for first attribute

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-764?page=all ]

Martin Marinschek resolved TOMAHAWK-764.
----------------------------------------

    Resolution: Fixed

of course! one shouldn't program at 20:00 on a public holiday.

fixed now...

regards,

Martin

> ValueBinding lost for first attribute
> -------------------------------------
>
>                 Key: TOMAHAWK-764
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-764
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Extended Datatable
>    Affects Versions: 1.1.4-SNAPSHOT, 1.1.3
>         Environment: myFaces core1.1.4
> tomahawk 1.1.4 Snapshot
>            Reporter: Michael Heinen
>         Assigned To: Martin Marinschek
>             Fix For: 1.1.5-SNAPSHOT
>
>
> There is a major bug using the t:datatable in conjunction with the t:datascroller and a valueBinding for the first attribute.
> The HtmlDataScroller erases this value binding due to the fact, that it calls setFirst with an int in the broadcast method.
> If the page is then reloaded via ajax, then first contains a pagenumber instead of the valuebinding.
> Patch for setFirst:
>     public void setFirst(int first)
>     {
>       ValueBinding vb = getValueBinding("first");
>       if (vb != null)
>       {
>         //do nothing and keep the valueBinding
>         return;
>       }
>       else
>         if (_preservedDataModel != null)
>         {
>             //Also change the currently restored DataModel attribute
>             _preservedDataModel.setFirst(first);
>         }
>         super.setFirst(first);
>     }   
> see this threads:
> http://marc.theaimsgroup.com/?l=myfaces-user&m=116211813709147&w=2
> http://marc.theaimsgroup.com/?l=myfaces-user&m=114529361608223&w=2
> Michael

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

        

[jira] Commented: (TOMAHAWK-764) ValueBinding lost for first attribute

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-764?page=comments#action_12446317 ] 
            
Martin Marinschek commented on TOMAHAWK-764:
--------------------------------------------

But how will the data-scroller ever update the first attribute then?

regards,

Martin

> ValueBinding lost for first attribute
> -------------------------------------
>
>                 Key: TOMAHAWK-764
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-764
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Extended Datatable
>    Affects Versions: 1.1.4-SNAPSHOT, 1.1.3
>         Environment: myFaces core1.1.4
> tomahawk 1.1.4 Snapshot
>            Reporter: Michael Heinen
>
> There is a major bug using the t:datatable in conjunction with the t:datascroller and a valueBinding for the first attribute.
> The HtmlDataScroller erases this value binding due to the fact, that it calls setFirst with an int in the broadcast method.
> If the page is then reloaded via ajax, then first contains a pagenumber instead of the valuebinding.
> Patch for setFirst:
>     public void setFirst(int first)
>     {
>       ValueBinding vb = getValueBinding("first");
>       if (vb != null)
>       {
>         //do nothing and keep the valueBinding
>         return;
>       }
>       else
>         if (_preservedDataModel != null)
>         {
>             //Also change the currently restored DataModel attribute
>             _preservedDataModel.setFirst(first);
>         }
>         super.setFirst(first);
>     }   
> see this threads:
> http://marc.theaimsgroup.com/?l=myfaces-user&m=116211813709147&w=2
> http://marc.theaimsgroup.com/?l=myfaces-user&m=114529361608223&w=2
> Michael

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

        

[jira] Updated: (TOMAHAWK-764) ValueBinding lost for first attribute

Posted by "Michael Heinen (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-764?page=all ]

Michael Heinen updated TOMAHAWK-764:
------------------------------------

    Status: Patch Available  (was: Open)

> ValueBinding lost for first attribute
> -------------------------------------
>
>                 Key: TOMAHAWK-764
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-764
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Extended Datatable
>    Affects Versions: 1.1.4-SNAPSHOT, 1.1.3
>         Environment: myFaces core1.1.4
> tomahawk 1.1.4 Snapshot
>            Reporter: Michael Heinen
>
> There is a major bug using the t:datatable in conjunction with the t:datascroller and a valueBinding for the first attribute.
> The HtmlDataScroller erases this value binding due to the fact, that it calls setFirst with an int in the broadcast method.
> If the page is then reloaded via ajax, then first contains a pagenumber instead of the valuebinding.
> Patch for setFirst:
>     public void setFirst(int first)
>     {
>       ValueBinding vb = getValueBinding("first");
>       if (vb != null)
>       {
>         //do nothing and keep the valueBinding
>         return;
>       }
>       else
>         if (_preservedDataModel != null)
>         {
>             //Also change the currently restored DataModel attribute
>             _preservedDataModel.setFirst(first);
>         }
>         super.setFirst(first);
>     }   
> see this threads:
> http://marc.theaimsgroup.com/?l=myfaces-user&m=116211813709147&w=2
> http://marc.theaimsgroup.com/?l=myfaces-user&m=114529361608223&w=2
> Michael

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

        

[jira] Reopened: (TOMAHAWK-764) ValueBinding lost for first attribute

Posted by "Michael Heinen (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-764?page=all ]

Michael Heinen reopened TOMAHAWK-764:
-------------------------------------

             
Martin,

thanks for your quick responds.
But there is one mistake in your patch. Pls see getFirst in UIData:

public int getFirst()
{
    if (_first != null)
        return _first.intValue();
    ValueBinding vb = getValueBinding("first");
    Number v = vb != null ? (Number) vb.getValue(getFacesContext()) : null;
    return v != null ? v.intValue() : DEFAULT_FIRST;
}

When the first attribute of the datatable has been set ín the datascroller then the valueBinding is not evaluated any more in UIData's getFirst().
So you may not call uiData.setFirst(value) in case of an existing valueBinding in the DataScroller.
In this case the first attribute of UIData should stay null in order to evaluate the valueBinding.

So it must be:

if(uiData.getValueBinding("first")!=null)
{
    ValueBinding vb = uiData.getValueBinding("first");
    vb.setValue(getFacesContext(),new Integer(value));
}
else
{
   uiData.setFirst(value);
}

Regards,
Michael

> ValueBinding lost for first attribute
> -------------------------------------
>
>                 Key: TOMAHAWK-764
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-764
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Extended Datatable
>    Affects Versions: 1.1.4-SNAPSHOT, 1.1.3
>         Environment: myFaces core1.1.4
> tomahawk 1.1.4 Snapshot
>            Reporter: Michael Heinen
>         Assigned To: Martin Marinschek
>             Fix For: 1.1.5-SNAPSHOT
>
>
> There is a major bug using the t:datatable in conjunction with the t:datascroller and a valueBinding for the first attribute.
> The HtmlDataScroller erases this value binding due to the fact, that it calls setFirst with an int in the broadcast method.
> If the page is then reloaded via ajax, then first contains a pagenumber instead of the valuebinding.
> Patch for setFirst:
>     public void setFirst(int first)
>     {
>       ValueBinding vb = getValueBinding("first");
>       if (vb != null)
>       {
>         //do nothing and keep the valueBinding
>         return;
>       }
>       else
>         if (_preservedDataModel != null)
>         {
>             //Also change the currently restored DataModel attribute
>             _preservedDataModel.setFirst(first);
>         }
>         super.setFirst(first);
>     }   
> see this threads:
> http://marc.theaimsgroup.com/?l=myfaces-user&m=116211813709147&w=2
> http://marc.theaimsgroup.com/?l=myfaces-user&m=114529361608223&w=2
> Michael

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

       

[jira] Commented: (TOMAHAWK-764) ValueBinding lost for first attribute

Posted by "Michael Heinen (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-764?page=comments#action_12446350 ] 
            
Michael Heinen commented on TOMAHAWK-764:
-----------------------------------------

I am using a4j and it's working like a charm.

There are some situations where I think I have to bind the first attribute because it has to be updated in the BB. 
I have some ajaxlinks which apply a filter on the datatable or remove a filter. This means that the number of elements in the table is dynamic.  When I add or remove a filter then I have to set the first attribute back to page 0. The problem is now that the datascroller erased this valueBinding before.
(Pls see my first link where I described such a szenario in more detail).

I don't see any other alternatives as a valueBinding. Pls correct me if I'm wrong.

Regards,
Michael

> ValueBinding lost for first attribute
> -------------------------------------
>
>                 Key: TOMAHAWK-764
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-764
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Extended Datatable
>    Affects Versions: 1.1.4-SNAPSHOT, 1.1.3
>         Environment: myFaces core1.1.4
> tomahawk 1.1.4 Snapshot
>            Reporter: Michael Heinen
>
> There is a major bug using the t:datatable in conjunction with the t:datascroller and a valueBinding for the first attribute.
> The HtmlDataScroller erases this value binding due to the fact, that it calls setFirst with an int in the broadcast method.
> If the page is then reloaded via ajax, then first contains a pagenumber instead of the valuebinding.
> Patch for setFirst:
>     public void setFirst(int first)
>     {
>       ValueBinding vb = getValueBinding("first");
>       if (vb != null)
>       {
>         //do nothing and keep the valueBinding
>         return;
>       }
>       else
>         if (_preservedDataModel != null)
>         {
>             //Also change the currently restored DataModel attribute
>             _preservedDataModel.setFirst(first);
>         }
>         super.setFirst(first);
>     }   
> see this threads:
> http://marc.theaimsgroup.com/?l=myfaces-user&m=116211813709147&w=2
> http://marc.theaimsgroup.com/?l=myfaces-user&m=114529361608223&w=2
> Michael

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

        

[jira] Commented: (TOMAHAWK-764) ValueBinding lost for first attribute

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-764?page=comments#action_12446343 ] 
            
Martin Marinschek commented on TOMAHAWK-764:
--------------------------------------------

Your b) suggestion is the only that would work, but JSF never does this - so I'd not be very comfortable with this solution. The only values which ever get updated are those bound to the "value"-attribute of a component.

Why do you bind the first attribute to your backing-beans at all? Why is the data-scroller not allowed to set the first-attribute as it is supposed to do? Why is that not working with AJAX?

Well, in fact, what kind of AJAX-solution are you using? There's been a problem with the PPRpanelGroup I have fixed recently which would have caused the restore-state to get lost on post-back.

As for me, I don't see why the data-scroller should ever loose control over the first-attribute as soon as it has been used the first time (and until then, it doesn't overwrite the first-attribute).

regards,

Martin

> ValueBinding lost for first attribute
> -------------------------------------
>
>                 Key: TOMAHAWK-764
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-764
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Extended Datatable
>    Affects Versions: 1.1.4-SNAPSHOT, 1.1.3
>         Environment: myFaces core1.1.4
> tomahawk 1.1.4 Snapshot
>            Reporter: Michael Heinen
>
> There is a major bug using the t:datatable in conjunction with the t:datascroller and a valueBinding for the first attribute.
> The HtmlDataScroller erases this value binding due to the fact, that it calls setFirst with an int in the broadcast method.
> If the page is then reloaded via ajax, then first contains a pagenumber instead of the valuebinding.
> Patch for setFirst:
>     public void setFirst(int first)
>     {
>       ValueBinding vb = getValueBinding("first");
>       if (vb != null)
>       {
>         //do nothing and keep the valueBinding
>         return;
>       }
>       else
>         if (_preservedDataModel != null)
>         {
>             //Also change the currently restored DataModel attribute
>             _preservedDataModel.setFirst(first);
>         }
>         super.setFirst(first);
>     }   
> see this threads:
> http://marc.theaimsgroup.com/?l=myfaces-user&m=116211813709147&w=2
> http://marc.theaimsgroup.com/?l=myfaces-user&m=114529361608223&w=2
> Michael

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

        

[jira] Commented: (TOMAHAWK-764) ValueBinding lost for first attribute

Posted by "Michael Heinen (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-764?page=comments#action_12446327 ] 
            
Michael Heinen commented on TOMAHAWK-764:
-----------------------------------------

if no valueBinding is used then it works as before.

If a valueBinding is used then there are two alternatives:
a) manage the value of the valueBinding in the BackingBean 
b) update the value of the valueBinding in setFirst:
if (vb != null)
{
    vb.setValue(getFacesContext(), first); // I don't know whether this is allowed. 
   return;
}
Both alternatives are working for me.
The current approach is not useable with partial page refreshs.
Do you see any other alternatives?

Michael

> ValueBinding lost for first attribute
> -------------------------------------
>
>                 Key: TOMAHAWK-764
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-764
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Extended Datatable
>    Affects Versions: 1.1.4-SNAPSHOT, 1.1.3
>         Environment: myFaces core1.1.4
> tomahawk 1.1.4 Snapshot
>            Reporter: Michael Heinen
>
> There is a major bug using the t:datatable in conjunction with the t:datascroller and a valueBinding for the first attribute.
> The HtmlDataScroller erases this value binding due to the fact, that it calls setFirst with an int in the broadcast method.
> If the page is then reloaded via ajax, then first contains a pagenumber instead of the valuebinding.
> Patch for setFirst:
>     public void setFirst(int first)
>     {
>       ValueBinding vb = getValueBinding("first");
>       if (vb != null)
>       {
>         //do nothing and keep the valueBinding
>         return;
>       }
>       else
>         if (_preservedDataModel != null)
>         {
>             //Also change the currently restored DataModel attribute
>             _preservedDataModel.setFirst(first);
>         }
>         super.setFirst(first);
>     }   
> see this threads:
> http://marc.theaimsgroup.com/?l=myfaces-user&m=116211813709147&w=2
> http://marc.theaimsgroup.com/?l=myfaces-user&m=114529361608223&w=2
> Michael

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

        

[jira] Updated: (TOMAHAWK-764) ValueBinding lost for first attribute

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-764?page=all ]

Martin Marinschek updated TOMAHAWK-764:
---------------------------------------

           Status: Resolved  (was: Patch Available)
    Fix Version/s: 1.1.5-SNAPSHOT
       Resolution: Fixed
         Assignee: Martin Marinschek

> ValueBinding lost for first attribute
> -------------------------------------
>
>                 Key: TOMAHAWK-764
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-764
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Extended Datatable
>    Affects Versions: 1.1.4-SNAPSHOT, 1.1.3
>         Environment: myFaces core1.1.4
> tomahawk 1.1.4 Snapshot
>            Reporter: Michael Heinen
>         Assigned To: Martin Marinschek
>             Fix For: 1.1.5-SNAPSHOT
>
>
> There is a major bug using the t:datatable in conjunction with the t:datascroller and a valueBinding for the first attribute.
> The HtmlDataScroller erases this value binding due to the fact, that it calls setFirst with an int in the broadcast method.
> If the page is then reloaded via ajax, then first contains a pagenumber instead of the valuebinding.
> Patch for setFirst:
>     public void setFirst(int first)
>     {
>       ValueBinding vb = getValueBinding("first");
>       if (vb != null)
>       {
>         //do nothing and keep the valueBinding
>         return;
>       }
>       else
>         if (_preservedDataModel != null)
>         {
>             //Also change the currently restored DataModel attribute
>             _preservedDataModel.setFirst(first);
>         }
>         super.setFirst(first);
>     }   
> see this threads:
> http://marc.theaimsgroup.com/?l=myfaces-user&m=116211813709147&w=2
> http://marc.theaimsgroup.com/?l=myfaces-user&m=114529361608223&w=2
> Michael

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

        

[jira] Commented: (TOMAHAWK-764) ValueBinding lost for first attribute

Posted by "Michael Heinen (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-764?page=comments#action_12446352 ] 
            
Michael Heinen commented on TOMAHAWK-764:
-----------------------------------------

I am not sure but what about using immediate =true for the datascroller?
Is this working without a valueBinding ?

Michael

> ValueBinding lost for first attribute
> -------------------------------------
>
>                 Key: TOMAHAWK-764
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-764
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Extended Datatable
>    Affects Versions: 1.1.4-SNAPSHOT, 1.1.3
>         Environment: myFaces core1.1.4
> tomahawk 1.1.4 Snapshot
>            Reporter: Michael Heinen
>
> There is a major bug using the t:datatable in conjunction with the t:datascroller and a valueBinding for the first attribute.
> The HtmlDataScroller erases this value binding due to the fact, that it calls setFirst with an int in the broadcast method.
> If the page is then reloaded via ajax, then first contains a pagenumber instead of the valuebinding.
> Patch for setFirst:
>     public void setFirst(int first)
>     {
>       ValueBinding vb = getValueBinding("first");
>       if (vb != null)
>       {
>         //do nothing and keep the valueBinding
>         return;
>       }
>       else
>         if (_preservedDataModel != null)
>         {
>             //Also change the currently restored DataModel attribute
>             _preservedDataModel.setFirst(first);
>         }
>         super.setFirst(first);
>     }   
> see this threads:
> http://marc.theaimsgroup.com/?l=myfaces-user&m=116211813709147&w=2
> http://marc.theaimsgroup.com/?l=myfaces-user&m=114529361608223&w=2
> Michael

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

        

[jira] Commented: (TOMAHAWK-764) ValueBinding lost for first attribute

Posted by "Martin Marinschek (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-764?page=comments#action_12446357 ] 
            
Martin Marinschek commented on TOMAHAWK-764:
--------------------------------------------

I don't see how immediate=true would change anything here.

Ok, I've gone with your suggestion and I am updating the value-binding - but in the data-scroller, and not in the data-table. This minimizes the impact of the change to where it's relevant. Fix is in head.

    protected void setFirst(UIData uiData, int value) {
        //there might be special cases where the first-property of the data-table
        //is bound to a backing bean. If this happens, the user probably wants
        //the data-scroller to update this backing-bean value - if not, you can always
        //override this method in a subclass.
        if(uiData.getValueBinding("first")!=null)
        {
            ValueBinding vb = uiData.getValueBinding("first");
            vb.setValue(getFacesContext(),new Integer(value));
        }
        uiData.setFirst(value);
    }

regards,

Martin

> ValueBinding lost for first attribute
> -------------------------------------
>
>                 Key: TOMAHAWK-764
>                 URL: http://issues.apache.org/jira/browse/TOMAHAWK-764
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Extended Datatable
>    Affects Versions: 1.1.4-SNAPSHOT, 1.1.3
>         Environment: myFaces core1.1.4
> tomahawk 1.1.4 Snapshot
>            Reporter: Michael Heinen
>             Fix For: 1.1.5-SNAPSHOT
>
>
> There is a major bug using the t:datatable in conjunction with the t:datascroller and a valueBinding for the first attribute.
> The HtmlDataScroller erases this value binding due to the fact, that it calls setFirst with an int in the broadcast method.
> If the page is then reloaded via ajax, then first contains a pagenumber instead of the valuebinding.
> Patch for setFirst:
>     public void setFirst(int first)
>     {
>       ValueBinding vb = getValueBinding("first");
>       if (vb != null)
>       {
>         //do nothing and keep the valueBinding
>         return;
>       }
>       else
>         if (_preservedDataModel != null)
>         {
>             //Also change the currently restored DataModel attribute
>             _preservedDataModel.setFirst(first);
>         }
>         super.setFirst(first);
>     }   
> see this threads:
> http://marc.theaimsgroup.com/?l=myfaces-user&m=116211813709147&w=2
> http://marc.theaimsgroup.com/?l=myfaces-user&m=114529361608223&w=2
> Michael

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