tags:

views:

19

answers:

1

How can I access the varStatus variable and the firstRowIndexVar variable programmatically? I couldn't find them in the request parameters. I'd even be happy just to inspect them in the debugger.

Thanks, Eli

A: 

They are not part of the request parameters. They are part of the JSF component tree in the server side. Start with FacesContext#getViewRoot(). To ease debugging, consider binding the component to a backing bean using binding attribute. E.g.

<ice:dataTable binding="#{bean.dataTable}">

with

public class Bean {
    private UIData dataTable;
    // ...
}
BalusC
I tried the binding, but couldn't find the varStatus variable in there. I did see the varStatus="varStatus" property, but I want to see the varStatus's subproperties.
I tried the binding, but couldn't find the varStatus variable in the dataTable or outside of it. I did see the varStatus="varStatus" property, but what I want to see is varStatus's subproperties, like begin, end, index, first, last. ICE states that varStatus is the "Name of a request-scope attribute under which the current indexed state will be exposed." So I looked in the request. I also tried the control-shift-d component tree. Nada... What am I doing wrong? Thanks, Eli
Oh, it's a request attribute? You should then look in request attributes, not in request parameters. From the FacesContext on, they are available by ExternalContext#getRequestMap().
BalusC