[T4] log4j issue
Hi, i tried to configure log4j to give me debug messagess of my application only The same configuration works fine outside of tapestry: however in t4 i receive all the debug messages from hibernate, tapestry etc, even if they are set to error. If i set the priority to error for the root, i don't see any message (except errors) even for my application. When i set it to debug, all the hibernate etc message come up. Any idea what am i doing wrong? Attached the log4j.xml in use: http://jakarta.apache.org/log4j/"; debug="false"> -- View this message in context: http://www.nabble.com/-T4--log4j-issue-tf4354455.html#a12407927 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T4.1]Returning a list to a page
And you are right, actually i cant make it working. It seems that IPage is not serializable, so i cant use the @Persist("client") The problem using a string is that, when i return the string from my onOk listener, the calling page A is activated, but after the "return" statement it is too late to set the property we are talking about. What am i missing? Paolo p.s.: thanks for your patience... Ulrich Stärk wrote: > > Where's the problem to do the same thing with the name of the calling > page? Store the name in a string property of page B before activating > it... > > Uli > > Paolo Scopa schrieb: >> No prob. >> As i said to uli, i might call B from different pages, not only A. >> Maybe i should use a common interface for those pages. >> Ill try and let you know >> Paolo >> >> >> Patrick Klein wrote: >>> Hello Paolo, >>> >>> mea culpa, you are correct abot that :) >>> replace IPage with the A's class (implementing IPage) and cast the >>> result of cycle.getPage(...) accordingly >>> >>> Regards, >>> Patrick >>>> Thanks Patrick, >>>> this helps, except that the IPage does not expose the setList method, >>>> so >>>> i >>>> don't think it would work the >>>> page.setList(composedList); >>>> maybe not even compile. >>>> Paolo >>>> >>>> >>>> Patrick Klein wrote: >>>> >>>>> Hello Paolo, >>>>> >>>>> page a should hold an (persist) abstract getter and setter for the >>>>> list, >>>>> page b hold a persist abstract getter and setter for the name of the >>>>> calling page which is set when page b is accessed and maybe reset if >>>>> needed in the button's listener. >>>>> When you are done with compiling your list on page be and the button >>>>> is >>>>> pressed, do something like the following in the button's listener: >>>>> >>>>> (page b) >>>>> public void buttonListener(IRequestCycle cycle) { >>>>> [...] >>>>> IPage page = cycle.getPage(getPageNameOfA()); >>>>> page.setList(composedList); >>>>> [...] >>>>> cycle.activate(page); >>>>> } >>>>> >>>>> Regards, >>>>> Patrick >>>>> >>>>>> Hi all, >>>>>> got a bit blocked here: i need to return a value to the invoking >>>>>> page. >>>>>> Page A calls page B - >>>>>> in Page B I select a list of item from a longer list >>>>>> when I press OK on page B, the browser returns to page A where the >>>>>> list >>>>>> is >>>>>> set according to the selection made. >>>>>> I can set the returning page but cant find a way to set there the >>>>>> value >>>>>> to >>>>>> return. >>>>>> >>>>>> I tried different ways but cant find a solution. >>>>>> Any help ? >>>>>> >>>>>> Paolo >>>>>> >>>>>> >>>>>> >>>>> - >>>>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>>>> For additional commands, e-mail: [EMAIL PROTECTED] >>>>> >>>>> >>>>> >>>>> >>>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-T4.1-Returning-a-list-to-a-page-tf4242051.html#a12072218 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T4.1]Returning a list to a page
No prob. As i said to uli, i might call B from different pages, not only A. Maybe i should use a common interface for those pages. Ill try and let you know Paolo Patrick Klein wrote: > > Hello Paolo, > > mea culpa, you are correct abot that :) > replace IPage with the A's class (implementing IPage) and cast the > result of cycle.getPage(...) accordingly > > Regards, > Patrick >> Thanks Patrick, >> this helps, except that the IPage does not expose the setList method, so >> i >> don't think it would work the >> page.setList(composedList); >> maybe not even compile. >> Paolo >> >> >> Patrick Klein wrote: >> >>> Hello Paolo, >>> >>> page a should hold an (persist) abstract getter and setter for the list, >>> page b hold a persist abstract getter and setter for the name of the >>> calling page which is set when page b is accessed and maybe reset if >>> needed in the button's listener. >>> When you are done with compiling your list on page be and the button is >>> pressed, do something like the following in the button's listener: >>> >>> (page b) >>> public void buttonListener(IRequestCycle cycle) { >>> [...] >>> IPage page = cycle.getPage(getPageNameOfA()); >>> page.setList(composedList); >>> [...] >>> cycle.activate(page); >>> } >>> >>> Regards, >>> Patrick >>> Hi all, got a bit blocked here: i need to return a value to the invoking page. Page A calls page B - in Page B I select a list of item from a longer list when I press OK on page B, the browser returns to page A where the list is set according to the selection made. I can set the returning page but cant find a way to set there the value to return. I tried different ways but cant find a solution. Any help ? Paolo >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >>> >> >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-T4.1-Returning-a-list-to-a-page-tf4242051.html#a12071552 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T4.1]Returning a list to a page
Thanks Uli, only problem is that i was planning to call page B from different pages, so i dont know which one to inject. Maybe will try the PropertyUtils.write, even if it seems to be a little unsafe (does not assure that the property exists in page A when compile). Paolo Ulrich Stärk wrote: > > You'll have a property for the list in page A and an abstract setter for > this property. So now in > page B just inject page A using the @InjectPage annotation, call the > setter for this list and return > the page object in your listener method. > Or use the PropertyUtils.write(pageObject, "propertyName", valueObject) > method in the > org.apache.hivemind.util package. > > Uli > > Paolo Scopa schrieb: >> Hi all, >> got a bit blocked here: i need to return a value to the invoking page. >> Page A calls page B - >> in Page B I select a list of item from a longer list >> when I press OK on page B, the browser returns to page A where the list >> is >> set according to the selection made. >> I can set the returning page but cant find a way to set there the value >> to >> return. >> >> I tried different ways but cant find a solution. >> Any help ? >> >> Paolo >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-T4.1-Returning-a-list-to-a-page-tf4242051.html#a12071279 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T4.1]Returning a list to a page
Thanks Patrick, this helps, except that the IPage does not expose the setList method, so i don't think it would work the page.setList(composedList); maybe not even compile. Paolo Patrick Klein wrote: > > Hello Paolo, > > page a should hold an (persist) abstract getter and setter for the list, > page b hold a persist abstract getter and setter for the name of the > calling page which is set when page b is accessed and maybe reset if > needed in the button's listener. > When you are done with compiling your list on page be and the button is > pressed, do something like the following in the button's listener: > > (page b) > public void buttonListener(IRequestCycle cycle) { > [...] > IPage page = cycle.getPage(getPageNameOfA()); > page.setList(composedList); > [...] > cycle.activate(page); > } > > Regards, > Patrick >> Hi all, >> got a bit blocked here: i need to return a value to the invoking page. >> Page A calls page B - >> in Page B I select a list of item from a longer list >> when I press OK on page B, the browser returns to page A where the list >> is >> set according to the selection made. >> I can set the returning page but cant find a way to set there the value >> to >> return. >> >> I tried different ways but cant find a solution. >> Any help ? >> >> Paolo >> >> > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/-T4.1-Returning-a-list-to-a-page-tf4242051.html#a12071237 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T4.1]Returning a list to a page
Hi all, got a bit blocked here: i need to return a value to the invoking page. Page A calls page B - in Page B I select a list of item from a longer list when I press OK on page B, the browser returns to page A where the list is set according to the selection made. I can set the returning page but cant find a way to set there the value to return. I tried different ways but cant find a solution. Any help ? Paolo -- View this message in context: http://www.nabble.com/-T4.1-Returning-a-list-to-a-page-tf4242051.html#a12070675 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 4.1.1 Session issue
Ok, I eventually did it. I mached your solution with the post in http://www.nabble.com/How-to-inject-ASO-in-service--tf1518378.html#a4141166 and it works fine Thanks a lot Paolo Paolo Scopa wrote: > > Thanks for replying, > I tried my best to understand what i should do, but im afraid i cant > follow you. > I never used ApplicationStateManager directly and i dont know where to > find an example. > Also i don't know where the lines you posted should be added. > > What i started from is something like > > > > > > > > I can access this via getSessionInfo inside a page, as i said: but not in > another class. > > Do you mean that i should create a new service that returns this object? > > Paolo > > > Igor Drobiazko wrote: >> >> Hi, >> >> you can inject the ApplicationStateManager in your DAO and access your >> ASO >> by using it. >> >> http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/engine/state/ApplicationStateManager.html >> http://tapestry.apache.org/tapestry4.1/tapestry-framework/hivedoc/service/tapestry.state.ApplicationStateManager.html >> >> Just add a field and the following line into your service construction: >> >> > service-id="tapestry.state. >> ApplicationStateManager"/> >> >> >> On 7/5/07, Paolo Scopa <[EMAIL PROTECTED]> wrote: >>> >>> >>> Hi experts, >>> I have a bit of troule storing/retrieving info in the session. >>> >>> I followed the eshop example, adding a contribution in hivemind module >>> to >>> store the user name in the session. >>> I want my dao to store this information every time that an object is >>> updated >>> in the database (the user who last changed the object). >>> >>> However I can't find a way to access the session from my dao, because to >>> use >>> @injectState I must make my dao abstract (and obviously it cant be). >>> So it looks like I can access the session info only from a BasePage, >>> which >>> is actually abstract. >>> >>> My question is: do I really have to retrieve that information in the >>> Page >>> and pass it around to the service, then to the dao to store it? Is there >>> no >>> way to access it directly from the dao? >>> The main reason is that i wanted to include to a BaseDao class, so all >>> my >>> daos will do the same thing while saving. >>> >>> Any ideas? >>> Thanks >>> Paolo >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/4.1.1-Session-issue-tf4028256.html#a11442438 >>> Sent from the Tapestry - User mailing list archive at Nabble.com. >>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >> >> > > -- View this message in context: http://www.nabble.com/4.1.1-Session-issue-tf4028256.html#a11446920 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: 4.1.1 Session issue
Thanks for replying, I tried my best to understand what i should do, but im afraid i cant follow you. I never used ApplicationStateManager directly and i dont know where to find an example. Also i don't know where the lines you posted should be added. What i started from is something like I can access this via getSessionInfo inside a page, as i said: but not in another class. Do you mean that i should create a new service that returns this object? Paolo Igor Drobiazko wrote: > > Hi, > > you can inject the ApplicationStateManager in your DAO and access your ASO > by using it. > > http://tapestry.apache.org/tapestry4.1/apidocs/org/apache/tapestry/engine/state/ApplicationStateManager.html > http://tapestry.apache.org/tapestry4.1/tapestry-framework/hivedoc/service/tapestry.state.ApplicationStateManager.html > > Just add a field and the following line into your service construction: > > service-id="tapestry.state. > ApplicationStateManager"/> > > > On 7/5/07, Paolo Scopa <[EMAIL PROTECTED]> wrote: >> >> >> Hi experts, >> I have a bit of troule storing/retrieving info in the session. >> >> I followed the eshop example, adding a contribution in hivemind module to >> store the user name in the session. >> I want my dao to store this information every time that an object is >> updated >> in the database (the user who last changed the object). >> >> However I can't find a way to access the session from my dao, because to >> use >> @injectState I must make my dao abstract (and obviously it cant be). >> So it looks like I can access the session info only from a BasePage, >> which >> is actually abstract. >> >> My question is: do I really have to retrieve that information in the Page >> and pass it around to the service, then to the dao to store it? Is there >> no >> way to access it directly from the dao? >> The main reason is that i wanted to include to a BaseDao class, so all my >> daos will do the same thing while saving. >> >> Any ideas? >> Thanks >> Paolo >> >> -- >> View this message in context: >> http://www.nabble.com/4.1.1-Session-issue-tf4028256.html#a11442438 >> Sent from the Tapestry - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > -- View this message in context: http://www.nabble.com/4.1.1-Session-issue-tf4028256.html#a11446435 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
4.1.1 Session issue
Hi experts, I have a bit of troule storing/retrieving info in the session. I followed the eshop example, adding a contribution in hivemind module to store the user name in the session. I want my dao to store this information every time that an object is updated in the database (the user who last changed the object). However I can't find a way to access the session from my dao, because to use @injectState I must make my dao abstract (and obviously it cant be). So it looks like I can access the session info only from a BasePage, which is actually abstract. My question is: do I really have to retrieve that information in the Page and pass it around to the service, then to the dao to store it? Is there no way to access it directly from the dao? The main reason is that i wanted to include to a BaseDao class, so all my daos will do the same thing while saving. Any ideas? Thanks Paolo -- View this message in context: http://www.nabble.com/4.1.1-Session-issue-tf4028256.html#a11442438 Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]