Hi , I tried 2 ways & both are landing into exceptions.
1. Making the Persist page scoped by using "client": @Persist(value = "client") @InitialValue("Collections.EMPTY_LIST") public abstract List getUsers(); Its giving me this error : ------------------------------------------------------------------------------------ [ +/- ] Exception: An exception occured encoding the data stream into MIME format: org.sipfoundry.sipxconfig.common.User<https://47.152.232.158:8443/sipxconfig/phone/#> org.apache.hivemind.ApplicationRuntimeException [ +/- ] Exception: org.sipfoundry.sipxconfig.common.User<https://47.152.232.158:8443/sipxconfig/phone/#> java.io.NotSerializableException Stack Trace: - java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1173) --------------------------------------------------------------------------------------------------------------- Is this because I am using 2 annotations at the same time ? 2. Doing a @InjectPage so that the I can reset the users values as we enter the search page. @InjectPage(value = UserSearch.PAGE) public abstract UserSearch getuserSearch(); ......... public IPage addLine(IRequestCycle cycle, Integer phoneId) { AddPhoneUser page = (AddPhoneUser) cycle.getPage(AddPhoneUser.PAGE); page.setReturnToEditPhone(true); page.setPhoneId(phoneId); UserSearch userSearch = getuserSearch(); // I had to do this to setUsers to before entering the userSearch.setUsers(Collections.EMPTY_LIST); // AddPhoneUser page. return page; // returning AddPhoneUser but not userSearch Is this OK? } I am getting this error: --------------------------------------------------------------------------------------------------------------- [ +/- ] Exception: Exception invoking listener method addLine of component phone/EditPhone: Page 'user/UserSearch' not found in application namespace.<https://47.152.232.158:8443/sipxconfig/phone/EditPhone,addLine.sdirect?sp=3#> org.apache.tapestry.BindingException binding: org.apache.tapestry.binding.listenermethodbind...@18f307[template parameter listener, component=phone/EditPhone, methodName=addLine, location=context:/WEB-INF/phone/EditPhone.html, line 11] component: $editphone...@3c1[phone/EditPhone] location: context:/WEB-INF/phone/EditPhone.html, line 11 6 7 <div id="settings-content"> 8 <div jwcid="@common/QuickLinks"> 9 <ul> 10 <li> 11 <a id="AddLine" jwcid="addl...@directlink" listener="listener:addLine" 12 parameters="ognl:phone.id"> 13 <span key="add.line">Add Line</span> 14 </a> 15 </li> 16 </ul> [ +/- ] Exception: Page 'user/UserSearch' not found in application namespace.<https://47.152.232.158:8443/sipxconfig/phone/EditPhone,addLine.sdirect?sp=3#> org.apache.tapestry.PageNotFoundException pageName: --------------------------------------------------------------------------------------------------------------- Will it be a problem If the page I return from the listener & the page I inject (& use) in listener is different ? Please excuse me if I am asking simple questions. Thanks for your time, Seshu On Thu, Oct 1, 2009 at 9:09 PM, Andreas Andreou <andy...@di.uoa.gr> wrote: > There are a few ways around this... one is to clear the list on your own > when > the page is visited in the normal way - in pageBeginRender... > > Another is to create and use a new PersistenceStrategy.. if you search the > wiki > (or google for "PersistenceStrategy tapestry wiki") you'll find some > implementations, > i.e. http://wiki.apache.org/tapestry/SessionPagePersistence (but > that's currently > inaccessible for me) > > On Thu, Oct 1, 2009 at 6:13 PM, seshu babu <seshum...@gmail.com> wrote: > > 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 > > > > > > -- > 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