You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Volker Weber <v....@inexso.de> on 2011/06/01 09:33:42 UTC

Re: [tobago] rowIndex is less than -1

Hi Michael,

you should not change the value of a component outside of the
InvokeApplicationPhase, or exactly only between end of
UpdateModelValues and begin of RenderResponse!

The valueBinding should not fetch the value from the backend (DB or
whatever). You should hold a copy of your list in the model, and
update the copy, if needed, in InvokeApplication, or in a before
RenderResponse phaseListener.

BTW this is not only in tobago, but general in jsf.

Especially if the getter is cost intensive, like db access, because
the getter of a valueBinding is invoked multiple times during a
request.


Regards,
    Volker

2011/5/31 Michael Kakuschky <ka...@elbe-net.de>:
> Hello
>
> I'm using at many places the tc:sheet component. If the content of the
> underlaying List did changed I got many times the following error message.
> It seems that if the count of records in the underlaying List  is less than
> before, the component comes in trouble. I'm using tobago 1.0.30 with myfaces
> 1.1.8
>
> Is there something I can do to prevent this error? Maybe reinitialize the
> UIData component somehow?
>
> Thanks & best regards Michael
>
> org.apache.myfaces.tobago.component.UIData,Id: _idJsp29]}
>        at
> javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:802)
>        at javax.faces.component.UIData.encodeEnd(UIData.java:609)
>        at
> org.apache.myfaces.tobago.component.UIData.encodeEnd(UIData.java:135)
>        at
> org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:86)
>        at
> org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:83)
>        at
> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.DefaultLayoutRenderer.encodeChildrenOfComponent(DefaultLayoutRenderer.java:47)
>        at
> org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(UILayout.java:70)
>        at
> org.apache.myfaces.tobago.component.UIPanelBase.encodeChildren(UIPanelBase.java:43)
>        at
> org.apache.myfaces.tobago.renderkit.RenderUtil.encode(RenderUtil.java:79)
>        at
> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.GridLayoutRenderer.encodeChildrenOfComponent(GridLayoutRenderer.java:379)
>        at
> org.apache.myfaces.tobago.component.UILayout.encodeChildrenOfComponent(UILayout.java:70)
>        at
> org.apache.myfaces.tobago.component.UIGridLayout.encodeChildrenOfComponent(UIGridLayout.java:276)
>        at
> org.apache.myfaces.tobago.renderkit.RenderUtil.encodeChildren(RenderUtil.java:58)
>        at
> org.apache.myfaces.tobago.renderkit.html.speyside.standard.tag.TabGroupRenderer.encodeContent(TabGroupRenderer.java:73)
>        at
> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TabGroupRenderer.renderTabGroupView(TabGroupRenderer.java:457)
>        at
> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.TabGroupRenderer.encodeEnd(TabGroupRenderer.java:168)
>        at
> javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:799)
>        ... 58 more
> Caused by: java.lang.IllegalArgumentException: rowIndex is less than -1
>        at javax.faces.component.UIData.setRowIndex(UIData.java:239)
>        at
> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.SheetRenderer.renderSheet(SheetRenderer.java:378)
>        at
> org.apache.myfaces.tobago.renderkit.html.scarborough.standard.tag.SheetRenderer.encodeEnd(SheetRenderer.java:156)
>        at
> javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:799)
>        ... 74 more
>
>
>



-- 
inexso - information exchange solutions GmbH
Ofener Str. 30      | 26121 Oldenburg
Tel.: +49 441 219 730 56 |
FAX:  +49 441 219 730 66 | eMail: volker.weber@inexso.de

Firmensitz: Oldenburg | Amtsgericht Oldenburg HRB 205251
Geschäftsführer: Stefan Schulte, Michael Terschüren