Thanks ! Andreas It works after I moved setUsers() in renderComponent to @InitialValue annotation like this @Persist @InitialValue("Collections.EMPTY_LIST" but table contents are getting displayed even without pressing search button for the second time when I came back to the this page which has got this table. So Basically the data persistence should be lost once I move out of the page which has the table component. For that I changed @Persist to @Persist("page") but it doesn't look like page scope is present. I am getting this error
[ +/- ] Exception: Exception invoking listener method search of component phone/AddPhoneUser/searchForm: Error at Annotation @org.apache.tapestry.annotations.Persist(value=page) of public abstract java.util.List org.sipfoundry.sipxconfig.site.user.UserSearch.getUsers(): Unknown property persistence strategy 'page'.<https://scs2.asiapac.nortel.com:8443/sipxconfig/phone/AddPhoneUser,selectUserForm.sdirect#> How to go about this ? Thanks, Seshu The On Thu, Oct 1, 2009 at 7:29 PM, Andreas Andreou <andy...@di.uoa.gr> wrote: > why do you need to call setUsers() inside > renderComponent(IMarkupWriter writer, IRequestCycle cycle) ? > > Since the value is now persisted, you won't need to call the setter. > > Is the source available online? > > On Thu, Oct 1, 2009 at 3:31 PM, seshu babu <seshum...@gmail.com> wrote: > > Activation context is only present in Tapestry 5 I think. I am using > > Tapestry 4. > > > > So I tried persisting getUsers() method but I am getting this error. Am I > > missing something? > > > ----------------------------------------------------------------------------------------------------------- > > @Persist > > public abstract List getUsers(); > > > ----------------------------------------------------------------------------------------------------------- > > [ +/- ] Exception: Error: Change to persistent property users of > > phone/AddPhoneUser/searchForm has been ignored. Persistent properties may > > only be changed prior to the rendering of the response page. > > org.apache.hivemind.ApplicationRuntimeException > > Stack Trace: > > > > * > > > org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java:39) > > * org.apache.hivemind.impl.ErrorLogImpl.error(ErrorLogImpl.java:40) > > * > > > org.apache.tapestry.record.PageRecorderImpl.observeChange(PageRecorderImpl.java:101) > > * org.apache.tapestry.Tapestry.fireObservedChange(Tapestry.java:677) > > * $UserSearch_83.setUsers($UserSearch_83.java) > > * > > > org.sipfoundry.sipxconfig.site.user.UserSearch.renderComponent(UserSearch.java:90) > > * > > org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:724) > > * > > > org.apache.tapestry.services.impl.DefaultResponseBuilder.render(DefaultResponseBuilder.java:187) > > * > > > org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:538) > > * > > org.apache.tapestry.form.FormSupportImpl.render(FormSupportImpl.java:503) > > * org.apache.tapestry.form.Form.renderComponent(Form.java:217) > > > ----------------------------------------------------------------------------------------------------- > > > > Thanks, > > Seshu > > > > On Wed, Sep 30, 2009 at 8:43 PM, Norman Franke <nor...@myasd.com> wrote: > > > >> I've had that happen. Query parameters either weren't @Persist-ed or > >> otherwise not part of the activation context, so when clicking the sort > >> links, it forgot what it was querying. Which does bring up an > interesting > >> point: allowing a different activation context for tables to keep the > >> persisted data to a minimum, since there are limits to the amount of > data > >> that an activation context can hold due to URL limits. > >> > >> Norman Franke > >> Answering Service for Directors, Inc. > >> www.myasd.com > >> > >> > >> > >> > >> On Sep 30, 2009, at 7:00 AM, Andreas Andreou wrote: > >> > >> You understand correctly that the rows are fetched from getUsers > >>> method for the first > >>> time - BUT when clicking on the columns it will NOT sort the rows based > on > >>> earlier fetched rows... > >>> > >>> It needs to call getUsers again (and then do the sorting) - is there > >>> any logic in that > >>> method that makes it return empty list? Perhaps you need to persist > >>> something in > >>> the session to make the subsequent getUsers() calls work correctly. > >>> > >>> On Wed, Sep 30, 2009 at 9:14 AM, seshu babu <seshum...@gmail.com> > wrote: > >>> > >>>> Hi, > >>>> > >>>> I am newly learning tapestry. > >>>> > >>>> The Rendered rows vanish if I click on the columns (for sorting of > >>>> rows).here is the .page file > >>>> > >>>> > -------------------------------------------------------------------------------------------------------------- > >>>> > >>>> - P R O P E R T I E S > >>>> --> > >>>> <property name="selections" /> > >>>> <property name="currentUser" /> > >>>> <inject property="coreContext" object="spring:coreContext"/> > >>>> <!-- > >>>> - C O M P O N E N T S > >>>> --> > >>>> <component id="userTable" type="common/Table"> > >>>> <binding name="source" value="users"/> > >>>> <binding name="columns" value="literal:* > >>>> userName,lastName,firstName,aliases:aliasesString"/> > >>>> <binding name="initialSortColumn" value="literal:lastName"/> > >>>> <binding name="row" value="currentUser"/> > >>>> <binding name="selections" value="selections"/> > >>>> </component> > >>>> > >>>> > -------------------------------------------------------------------------------------------------------------- > >>>> > >>>> I understand that the rows are fetched from getUsers method for the > first > >>>> time & further clicking on the columns it will sort the rows based on > >>>> earlier fetched rows. > >>>> What's causing these rows to get lost once feteched into table? > >>>> > >>>> I use tapesty 4.1. In the above page common/Table is custom table > >>>> component > >>>> of type contrib:TableView. > >>>> > >>>> Thanks for your help, > >>>> Seshu > >>>> > >>>> > >>> > >>> > >>> -- > >>> Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr > >>> Tapestry / Tacos developer > >>> Open Source / JEE Consulting > >>> > >>> --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > >>> For additional commands, e-mail: users-h...@tapestry.apache.org > >>> > >>> > >> > > > > > > -- > > Regards, > > Seshu > > > > > > -- > Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr > Tapestry / Tacos developer > Open Source / JEE Consulting > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Regards, Seshu