Re: how to format Calendar object inside Grid component ?
thank you that worked... -- View this message in context: http://tapestry.1045711.n5.nabble.com/how-to-format-Calendar-object-inside-Grid-component-tp3211934p3212001.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: how to format Calendar object inside Grid component ?
i even tried with tapestry v 5.0.18. unable to format Calendar. Inside Grid, Date is working properly but i cannot change code as it is used in many other places. i need to find a solution with Calendar object itself -- View this message in context: http://tapestry.1045711.n5.nabble.com/how-to-format-Calendar-object-inside-Grid-component-tp3211934p3211941.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
how to format Calendar object inside Grid component ?
Hello All, I am using Tapestry 5.0.1.5. please don't tell me to change the version as i need to use the same version 5.0.1.5 & calendar object itself. i have a requirement where i am using java's calendar object(java.util.Calendar) to store dateOfBirth. @DataType("dateOfBirth") private Calendar dateOfBirth; in one class i create a calendar object as & set it to celebrity object Calendar cal = Calendar.getInstance(); cal.set(2000, 10, 21);//year , month, date I am using a grid to display all the contents ${celebrity.lastName} Delete i want to know how to format the java's calendar object in tapestry ? i tried to format using 1. "" & 2. "" with xmlns:tx="tapestry-library:tapx" both are giving errors. if i don't format(don't give anything) i am getting the value as "java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Asia/Calcutta",offset=1980,dstSavings=0,useDaylight=false,transitions=6,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2000,MONTH=10,WEEK_OF_YEAR=42,WEEK_OF_MONTH=3,DAY_OF_MONTH=21,DAY_OF_YEAR=287,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=2,AM_PM=1,HOUR=5,HOUR_OF_DAY=17,MINUTE=7,SECOND=47,MILLISECOND=191,ZONE_OFFSET=1980,DST_OFFSET=0]" -- View this message in context: http://tapestry.1045711.n5.nabble.com/how-to-format-Calendar-object-inside-Grid-component-tp3211934p3211934.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Redirect when session is destroyed
Thiago H. de Paula Figueiredo wrote: > > If inside a page, check the page navigation page in the documentation. > I was not referring to redirecting from page. As we know if session is expired "sessionDestroyed" method is called by tapestry. (Please refer the code) http://eubauer.de/kingsware/2010/02/04/track-login-and-logout-of-users-with-tapestry-5/ I was referring to a scenario wherein if session is expired user is automatically redirected to start or index page. So i was asking, how to redirect to start page from "sessionDestroyed" method. Thank you for the links provided, that would be really helpful to me. -- View this message in context: http://tapestry.1045711.n5.nabble.com/how-to-Redirect-in-sessionDestroyed-method-tp2849255p2854394.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Creating Grid component at runtime
As advised in the previous reply, i can create a class which contains all the column & display only those column names which are present in the query. But i think that will be waste of memory since, I have 50 column names from col1,col2,.. col50. Consider the situation where only one column is select by query, the object created will use the storage for all 50 columns where as only 1 is actually useful. so i wanted to know, if i can use beanmodel to add the columns dynamically at runtime. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Creating-Grid-component-at-runtime-tp2847820p2854386.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Creating Grid component at runtime
Hello All, I am new to tapestry & facing lot of problem in understanding internal working of grid. I have a requirement where I need to display certain data from database obtained as result list using grid. 1. I use query to retrieve certain column names of a particular table depending on some criteria & those selected columns are to be displayed, so the number & column names are decided at runtime. 2. I need to Use Grid component. As far as I know each row of grid is stored as objects & grid uses getters to retrieve the values. Ex. Assume a table named TableA consists of Col1, Col2, Col3, Col4, Col5, Col6, Col7, Col8, Col9 and Col10. Using query, I select say 4 columns (Col1, Col5, Col7 and Col8) I came across Tapestry’s Bean Model class which says we can dynamically add new columns. I tried that & was able to add new column but was unable to display any value in that column. 1. Can I add those column names at runtime using BeanModel in the pojo so that grid automatically displays value? 2.If not is there any way to display the values. Please help me in this regard -- View this message in context: http://tapestry.1045711.n5.nabble.com/Creating-Grid-component-at-runtime-tp2847820p2847820.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: SendRedirect is giving NullPointerException
I too have a similar requirement. Since i am new to tapestry, i did not understood the answer. Can you please explain that in detail giving some example. -- View this message in context: http://tapestry.1045711.n5.nabble.com/SendRedirect-is-giving-NullPointerException-tp2843561p2847823.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: SendRedirect is giving NullPointerException
Hi, I found a site for session handling using Tapestry5. http://eubauer.de/kingsware/2010/02/04/track-login-and-logout-of-users-with-tapestry-5/ when ever session is destroyed, sessionDestroyed() method in SessionListener[user-defined] class which is added in services package of tapestry is automatically called. can any one tell me how to redirect the browser to a default page ? if i had response object i could have redirected to some page but that method doesn't contain response object. i have added the code for SessionListener class. public class SessionListener implements HttpSessionListener { public void sessionCreated(HttpSessionEvent se) { // Do nothing } public void sessionDestroyed(HttpSessionEvent se) { System.out.println(" * Session is destroyed * "); HttpSession session = se.getSession(); Principal principal = (Principal) session.getAttribute(AppModule.USER_LOGGED_IN); session.removeAttribute(AppModule.USER_LOGGED_IN); // Do some stuff here... } } -- View this message in context: http://tapestry.1045711.n5.nabble.com/SendRedirect-is-giving-NullPointerException-tp2843561p2849405.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Redirect when session is destroyed
I am new to tapestry so can you please tell me how to use dispatcher using some example?? most importantly, i want to know how to Redirect to some other page!! Kristian Marinkovic wrote: > > provide a Dispatcher that checks whether your AppModule.USER_LOGGED_IN > attribute is available from the current HttpSession; if it is not redirect > the current request to any page > -- View this message in context: http://tapestry.1045711.n5.nabble.com/Redirect-when-session-is-destroyed-tp2849255p2849363.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Redirect when session is destroyed
Hi, I found a site for session handling using Tapestry5. http://eubauer.de/kingsware/2010/02/04/track-login-and-logout-of-users-with-tapestry-5/ when ever session is destroyed, sessionDestroyed() method in SessionListener[user-defined] class which is added in services package of tapestry is automatically called. can any one tell me how to redirect the browser to a default page ? if i had response object i could have redirected to some page but that method doesn't contain response object. i have added the code for SessionListener class. public class SessionListener implements HttpSessionListener { public void sessionCreated(HttpSessionEvent se) { // Do nothing } public void sessionDestroyed(HttpSessionEvent se) { System.out.println(" * Session is destroyed * "); HttpSession session = se.getSession(); Principal principal = (Principal) session.getAttribute(AppModule.USER_LOGGED_IN); session.removeAttribute(AppModule.USER_LOGGED_IN); // Do some stuff here... } } -- View this message in context: http://tapestry.1045711.n5.nabble.com/Redirect-when-session-is-destroyed-tp2849255p2849255.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org