I've had also some duplicated mails but no one lost... okay, doesn't matter. If you mean the order in thread... I've just answered to another post from Vladimir, but it was for all.

I've forgot to warn you about this bug (with no refresh on datamodel changes). Yes, it is a bug, but this time not in Scroller :) The only known workaround is to reset datamodel manually in code, where you make changes. You have to call ((UIData) component).setFirst()in your backing bean to let the scroller know about it.

i.e.:

private void dropScroller(String dataTableId) {

            _log.info("dropScroller called");

            FacesContext context = FacesContext.getCurrentInstance();

            UIComponent component = findComponent(context.getViewRoot(), ":"

                        + dataTableId, context, false);

            if (component instanceof UIData)

                  ((UIData) component).setFirst(0);

}

 

private UIComponent findComponent(UIComponent component, String id,

                  FacesContext context, boolean exactMatch) {

            String componentId = component.getClientId(context);

            if (exactMatch) {

                  if (componentId.equals(id))

                        return component;

            } else {

                  if (componentId.endsWith(id)){

                        _log.debug("Requested UIC " + id + " returning:" + component.getClientId(context));

                        return component;

                  }

            }

 

            Iterator kids = component.getChildren().iterator();

            while (kids.hasNext()) {

                  UIComponent kid = (UIComponent) kids.next();

                  UIComponent found = findComponent(kid, id, context, exactMatch);

                  if (found != null)

                        return found;

            }

            return null;

}


daniel ccss schrieb:
Strange, I think I lose some mails... Paul can you answer this last email that I send, not sure if you already answered it, but something strange happen, thanks, sorry :-(

Thanks for your answers, yes actually when I implemented your filter the call to the DB reduce to 2 :), and then Vladimir says that with the backing_bean in session all works fine, and yes, all works fine :), the only problem is that when I implemented the add, delete, and the edit actions the data in the data scroller is not update until I click on any page link of the table (1,2,3). I think that this happen because of the filter (if) that you did (great) so what I need now is a way to do the fetch no matter what after and add/delete/edit action is made. So I was thinking in add another condition to the if(.... || (doNomatherWhat) ...doFech). What I dont know is where define this variable, and where to assign it the value to true after the add/delete/edit method was called. Can you help me on this?

I think Vladimir write ideas about this I'm going to read then, and I will wait for yours too thank you and thanks Vladimir!!!

Reply via email to