daniel ccss wrote:
> 
> On 7/9/07, daniel ccss <[EMAIL PROTECTED]> wrote:
>> IT WORKS!!!!
> 
Congratulation !

daniel ccss wrote:
> 
>> I have to debug to see the correct id of the datatable, and I found that
>> was: _id0:data:8 whyyyy?? Obviously I don“t get the dropScroller to work
>> because I sent the true Id of the DataTable: data
> 
Daniel, I have no ideas why do you get this IDs. It seems to be the ID of
some child element - not of the table itself. Anyway, you cad put this debug
statements to track exactly what happening.

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); //set datatable to FIRST
page
            }else if (null == component){
              _log.error("no dataTable fount!");
            } else {
              _log.error("Found component with id
"+component.getClientId()+" is not an instance of UIData");
            }
}
Pay attention to this FALSE param. It controls HOW the ID should be matched
- exact or against endsWith(). So, if you supply "data", it will search in
tree for ":data". 


daniel ccss wrote:
> 
>> 1- How I can access the PagedList properties from my bean, to do what you
>> said about the _invalidated to true after a delete/add/edit action
> 
Once again...
1. Define the method public void Invalidate(){ this._invalidated=true;} i
your PagedList class.
2. Declare a bean's member, i.e.
private PagedList myList = new PagedList(?);
3. After modification of list/DB/whatever just call in your bean
this.myList.Invalidate();

If you have not implemented the internal storage like me, you have to supply
the total record count each time the fetching take place. I relay on the
list itself, because it hase all IDs in array and already 'knows', own size
- you have to perform "select count(*)..." after each DB modification (at
least delete/insert) and put this count back to PagedList (as property of
returning DataPage istance). It means, you have to modify the code to store
this returned value, because I have no such code ;)
The only task to accomplish then is to ensure, that the page will be
refetched next time -> _invalidated flag.


daniel ccss wrote:
> 
>> 3- Can you send me your ajax jar, It seems that now the ajax data table
>> is
>> only in rich faces?? Which jar to use.
> 
Daniel, I use the regular t:dataTable. The rest does a4j which you can
download directly from JBoss site. It's not an replacement component library
- just an additional one.

regards,
paul
-- 
View this message in context: 
http://www.nabble.com/Tomahawk%2BDataScroller%2BWorkingWithLargeTables-tf4016097.html#a11512522
Sent from the MyFaces - Users mailing list archive at Nabble.com.

Reply via email to