myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sutapa Dey <sutapa...@gmail.com>
Subject Re: Re: Bottom Pagination in Trinidad Table
Date Thu, 27 May 2010 07:19:25 GMT
Hi Wolfgang,

Thanks for the response and this is how I have solved it.
I created 2 UIComponenet datatypes in my backing bean
UIXTable dataTable;
CoreSelectRangeChoiceBar rangeChoice;

and my rangeListener is as below:
public void onRangeChange(RangeChangeEvent event)
    {
        logger.info("I am inside rangeChange event");
        FacesContext fc = FacesContext.getCurrentInstance();
        //If "Show All" navigation option is selected
        if(event.getNewEnd() == dataTable.getRowCount())
        {
            dataTable.setShowAll(true);
            rangeChoice.setShowAll(true);
            logger.info("When Show All");
        }
        else
        {
        //Forcefully setting showAll as false when user selects other
navigation range
          if(dataTable.isShowAll() || rangeChoice.isShowAll())
          {
              dataTable.setShowAll(false);
              rangeChoice.setShowAll(false);
          }
          //Setting the first row as given by the event's new Start
          dataTable.setFirst(event.getNewStart());
          rangeChoice.setFirst(event.getNewStart());
          logger.info("When not Show All");
        }
        dataTable.setRendered(true);
        rangeChoice.setRendered(true);
  }

and my page i updated as

<tr:table id="SearchListData"rows="50" var="resultItem"
binding="#{BackingBean.dataTable}"
partialTriggers="rangeChoice" value="#{BackingBean.searchResults}"
rangeChangeListener="#{BackingBean.onRangeChange}">
..........................
.......................
</tr:table>
<tr:selectRangeChoiceBar id="rangeChoice"
binding="#{BackingBean.rangeChoice}" value="#{BackingBean.searchResults}"
rangeChangeListener="#{BackingBean.onRangeChange}" rows="50"
partialTriggers="SearchListData">
</tr:selectRangeChoiceBar>

And now it works!!! Thanks to all.


On Wed, May 26, 2010 at 1:00 PM, <wolfgang.toepfer@pta.de> wrote:

> Hi,
>
> Should be fairly easy to do, at least the following is what worked for us,
> here in pseudo notation:
>
> <tr:table ..
> rangeChangeListener="#{yourController.yourRangeChangeListener}" .. > ..
> </tr:table>
>
> and in yourController:
>
> public void yourRangeChangeListener(RangeChangeEvent event) {
>  // do something with it
> }
>
> The other issue regarding the connection between both components I suppose
> is to be done with PPR i.e.
> the nav igation would be your PPR source and the tr:table the PPR
> listener. I have not tried it myself though,
> so that's the theory.. ;)
>
> Best wishes,
> Wolfgang.
>
>
>
>
> Sutapa Dey <sutapa.hp@gmail.com>
> 24.05.2010 10:32
> Bitte antworten an
> "MyFaces Discussion" <users@myfaces.apache.org>
>
>
> An
> MyFaces Discussion <users@myfaces.apache.org>
> Kopie
>
> Thema
> Re: Bottom Pagination in Trinidad Table
>
>
>
>
>
>
> Hi All,
>
> Is there any link which has an example how to implement
> rangeChangeListener....
>
> Kindly share with me.
>
> Regards,
> Sutapa
>
> On Mon, May 24, 2010 at 12:03 PM, Sutapa Dey <sutapa.hp@gmail.com> wrote:
>
> > Hi Ricardo,
> >
> > Thanks a lot for the reply. But now the problem I am facing is how to
> use
> > it.
> > I mean I have a tr:table, if i use tr:selectRangeChoiceBar is the
> following
> > way it does not work.
> > <tr:table>
> > </tr:table>
> > <tr:selectRangeChoiceBar></tr:selectRangeChoiceBar>
> > It renders the tr:selectRangeChoiceBar but does not navigate.
> > I think I need to some how connect the tr:selectRangeChoiceBar with
> > tr:table. But am not sure how to do it.
> > Please help.
> >
> > Sutapa
> >
> >
> > On Fri, May 21, 2010 at 10:51 AM, Ricardo Rog
> <ricardo.rog@softproject.de>wrote:
> >
> >> Hi Sutapa,
> >>
> >> try using tr:selectRangeChoiceBar
> >>
> >>
> >>
>
> http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_selectRangeChoiceB
>
> >> ar.html<
>
> http://myfaces.apache.org/trinidad/trinidad-api/tagdoc/tr_selectRangeChoiceB%0Aar.html
> >
> >>
> >> Greetings
> >>
> >>
> >> -----Urspr√ľngliche Nachricht-----
> >> Von: Sutapa Dey [mailto:sutapa.hp@gmail.com]
> >> Gesendet: Freitag, 21. Mai 2010 04:53
> >> An: users@myfaces.apache.org
> >> Betreff: Bottom Pagination in Trinidad Table
> >>
> >> Hi All,
> >>
> >> Is there a way to include the pagination at the bottom of a tr:table in
> >> myfaces trinidad.
> >>
> >> Regards,
> >> Sutapa
> >>
> >>
> >
>
>
>
> PTA Programmier-Technische Arbeiten GmbH
> Seckenheimer Str. 65-67, 68165 Mannheim
> Amtsgericht Mannheim, HRB 1139
> USt-IdNr.: DE 143 839 368
> Geschaeftsfuehrer:
> Dipl.-Ing. Peter Fischer
> Dr. Harald W. Busch
> Dipl.-Kfm. Knut Fischer
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message