Re: Update number of login users in all user's page when new user login
Ok..Thanks for your reply.. igor.vaynberg wrote: > > see HttpSessionListener > > -igor > > On Mon, Jan 12, 2009 at 6:41 PM, Eunice wrote: >> >> >> Hi, >> >> i wanted to have the number of login users to be shown on all user's >> screen. >> This means, once a new user login, the number of login users shows on >> other >> active >> user's screen will be updated. >> >> >> Let say there are 2 sessions is currently log in into my application. >> >> >> session.getSessionId() == [bm1pgdr1y9hf] >> session.getSessionId() == [198y9m0etdvpj] >> >> >> When the first user [bm1pgdr1y9hf] login, i want to update the page to >> show >> 'Logged on users:1' >> in [bm1pgdr1y9hf] 's homepage. >> >> When the second user [198y9m0etdvpj] login, i want to update the page >> to >> show 'Logged on users:2' >> in both [bm1pgdr1y9hf] and [198y9m0etdvpj] 's homepage. >> >> How can I update [bm1pgdr1y9hf] 's homepage after the second user >> [198y9m0etdvpj] login? >> >> >> >> Thanks alot again for your replies >> >> >> >> -- >> View this message in context: >> http://www.nabble.com/Update-number-of-login-users-in-all-user%27s-page-when-new-user-login-tp21428448p21428448.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org >> >> > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/Update-number-of-login-users-in-all-user%27s-page-when-new-user-login-tp21428448p21429864.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Update number of login users in all user's page when new user login
Hi, i wanted to have the number of login users to be shown on all user's screen. This means, once a new user login, the number of login users shows on other active user's screen will be updated. Let say there are 2 sessions is currently log in into my application. session.getSessionId() == [bm1pgdr1y9hf] session.getSessionId() == [198y9m0etdvpj] When the first user [bm1pgdr1y9hf] login, i want to update the page to show 'Logged on users:1' in [bm1pgdr1y9hf] 's homepage. When the second user [198y9m0etdvpj] login, i want to update the page to show 'Logged on users:2' in both [bm1pgdr1y9hf] and [198y9m0etdvpj] 's homepage. How can I update [bm1pgdr1y9hf] 's homepage after the second user [198y9m0etdvpj] login? Thanks alot again for your replies -- View this message in context: http://www.nabble.com/Update-number-of-login-users-in-all-user%27s-page-when-new-user-login-tp21428448p21428448.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Get all sessions
Hi Jonathan and Peter, thanks alot for your reply, i tried to get the sessions by using the IRequestLogger as suggest by Jonathan . It do really helps. IRequestLogger requestLogger = Application.get().getRequestLogger(); SessionData[] sessions= requestLogger.getLiveSessions(); System.out.println("The number of Live Sessions in my application is ["+sessions.length+"]"); Here is my second question, let say there are 2 sessions is currently log in into my application. session.getSessionId() == [bm1pgdr1y9hf] session.getSessionId() == [198y9m0etdvpj] When the first user [bm1pgdr1y9hf] login, i want to update the page to show 'Logged on users:1' in [bm1pgdr1y9hf] 's homepage. When the second user [198y9m0etdvpj] login, i want to update the page to show 'Logged on users:2' in both [bm1pgdr1y9hf] and [198y9m0etdvpj] 's homepage. How can I update [bm1pgdr1y9hf] 's homepage after the second user [198y9m0etdvpj] login? Thanks alot again for your replies Peter Ertl-3 wrote: > > implement javax.servlet.http.HttpSessionListener > > Am 09.01.2009 um 08:07 schrieb Eunice: > >> >> Hi, >> >> Is there any methods or functions in wicket that can give me >> >> numbers of users/sessions that is currently active and viewing/ >> opening a >> page? >> >> I've been googling and read on the API, still cannot get any clues and >> unable to work it out.. >> >> Can i get number of sessions from my application by using >> ISessionStore or >> >> HttpSessions, since the session will be keep in HttpSessions.. >> >> I do really appreciate your reply.. >> >> Eunice >> -- >> View this message in context: >> http://www.nabble.com/Get-all-sessions-tp21367229p21367229.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >> For additional commands, e-mail: users-h...@wicket.apache.org > > > - > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > > -- View this message in context: http://www.nabble.com/Get-all-sessions-users-for-a-web-application-tp21367229p21407641.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Get all sessions
Hi, Is there any methods or functions in wicket that can give me numbers of users/sessions that is currently active and viewing/opening a page? I've been googling and read on the API, still cannot get any clues and unable to work it out.. Can i get number of sessions from my application by using ISessionStore or HttpSessions, since the session will be keep in HttpSessions.. I do really appreciate your reply.. Eunice -- View this message in context: http://www.nabble.com/Get-all-sessions-tp21367229p21367229.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Broken link when trying to navigate to other page with another tab while 1 page is still loading
Thanx Johan for reply, "Cant you do something with a shared resource and then push a bit more data in the url? " After i read your suggestion, i tried to study more into DynamicImageResource, BufferedDynamicImageResource,Image class.. Still, I unable to get what do you mean by "push a bit more data in the url" .. Can you please show me some example on how to amend it? I really did crack my head on that but yet still couldn't get the solution, the image broken link still exist..it is my nightmare.. While searching and trying to get the solution for this, i saw this link: http://cwiki.apache.org/WICKET/how-to-create-dynamic-image-overlays.html This is to create the nodes for a tress, and the nodes will be overlay, do you think this could help? Is there anywhere for me to trace what data is currently been add to Resource? Plz... Eunice Johan Compagner wrote: > > It is the nature of the browser that loads the images of a page after > the page itself is loaded. > > Cant you do something with a shared resource and then push a bit more > data in the url? > > On 1/16/08, Eunice <[EMAIL PROTECTED]> wrote: >> >> Hai, >> >> I am trying to develop an application that going to display several >> charts >> in 1 page. The coding as below: >> >> >> public class JFreeChartImage extends Image { >> >> private int width; >> private int height; >> public JFreeChartImage(String id, JFreeChart chart, int width, >> int >> height){ >> super(id, new Model(chart)); >> >> this.width = width; >> this.height = height; >> } >> >> @Override >> protected Resource getImageResource() { >> >> return new DynamicImageResource(){ >> @Override >> protected byte[] getImageData() { >> >> JFreeChart chart = >> (JFreeChart)getModelObject(); >> >> return >> toImageData(chart.createBufferedImage(width, >> height)); >> } >> >> @Override >> protected void setHeaders(WebResponse response) { >> >> if (isCacheable()) { >> super.setHeaders(response); >> } else { >> response.setHeader("Pragma", "no-cache"); >> response.setHeader("Cache-Control", >> "no-cache"); >> response.setDateHeader("Expires", 0); >> >> } >> } >> }; >> >> } >> >> } >> >> >> while this i am loading Page A , i failed to load Page B from my >> application >> in different tab , where Page B is also consist of different charts, it >> shows page expired or sometimes show broken link icon. >> >> For Page A, coding for Page A will be exeuted, then will get the >> JFreeChartImage class to invoke the getImageResource() method but not the >> getImageData(). --> Lead to broken link >> >> For Page B, Coding for page B will be executed, then will get the >> JFreeChartImage class to invoke the getImageResource()and finally the >> getImageData(). >> >> Is it because the chart for Page A in getImageResource() that loaded >> earlier >> been override by Charts from Page B, if yes how can I fix this in order >> to >> show the charts for both page? >> >> Is this the nature of getImageData that only will in invoke after loading >> all other pages? >> Is anyone face this issue before? Pls help.. >> >> >> Thanx alot.. >> >> -- >> View this message in context: >> http://www.nabble.com/Broken-link-when-trying-to-navigate-to-other-page-with-another-tab-while-1-page-is-still-loading-tp14876728p14876728.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> - >> 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/Broken-link-when-trying-to-navigate-to-other-page-with-another-tab-while-1-page-is-still-loading-tp14876728p14967110.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Broken link when trying to navigate to other page with another tab while 1 page is still loading
Hai, I am trying to develop an application that going to display several charts in 1 page. The coding as below: public class JFreeChartImage extends Image { private int width; private int height; public JFreeChartImage(String id, JFreeChart chart, int width, int height){ super(id, new Model(chart)); this.width = width; this.height = height; } @Override protected Resource getImageResource() { return new DynamicImageResource(){ @Override protected byte[] getImageData() { JFreeChart chart = (JFreeChart)getModelObject(); return toImageData(chart.createBufferedImage(width, height)); } @Override protected void setHeaders(WebResponse response) { if (isCacheable()) { super.setHeaders(response); } else { response.setHeader("Pragma", "no-cache"); response.setHeader("Cache-Control", "no-cache"); response.setDateHeader("Expires", 0); } } }; } } while this i am loading Page A , i failed to load Page B from my application in different tab , where Page B is also consist of different charts, it shows page expired or sometimes show broken link icon. For Page A, coding for Page A will be exeuted, then will get the JFreeChartImage class to invoke the getImageResource() method but not the getImageData(). --> Lead to broken link For Page B, Coding for page B will be executed, then will get the JFreeChartImage class to invoke the getImageResource()and finally the getImageData(). Is it because the chart for Page A in getImageResource() that loaded earlier been override by Charts from Page B, if yes how can I fix this in order to show the charts for both page? Is this the nature of getImageData that only will in invoke after loading all other pages? Is anyone face this issue before? Pls help.. Thanx alot.. -- View this message in context: http://www.nabble.com/Broken-link-when-trying-to-navigate-to-other-page-with-another-tab-while-1-page-is-still-loading-tp14876728p14876728.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]