RE: format float/double in dataview

2010-02-26 Thread Andreas Lüdtke
Riyad,

my code is as follows:

  @Override
  public void populateItem(Item> item, java.lang.String
componentId, IModel rowModel)
  {
item.add(new AttributeAppender("align", true, Model.of("right"), ";"));
super.populateItem(item, componentId, rowModel);
  } 

This way, the cell is right aligned.

Andreas

> -Original Message-
> From: Riyad Kalla [mailto:rka...@gmail.com] 
> Sent: Friday, February 26, 2010 3:06 PM
> To: users@wicket.apache.org
> Subject: Re: format float/double in dataview
> 
> new SimpleAttributeModifier("text-align", "right") on the Label?
> 
> On Thu, Feb 25, 2010 at 4:39 AM, James Carman
> wrote:
> 
> > I would think that you'd add either a style or class 
> attribute to the
> > cell, perhaps?
> >
> > On Thu, Feb 25, 2010 at 6:02 AM, Andreas Lüdtke 
> 
> > wrote:
> > > James,
> > >
> > > thanks a lot for the code snippet. My numbers are now perfectly
> > formatted. Do
> > > you know how to right align the column? Normally, I would 
> do this in the
> > > markup but I don't see a possibility where I can modify 
> this in the code.
> > >
> > > Thanks again
> > >
> > > Andreas
> > >
> > >> -Original Message-
> > >> From: James Carman [mailto:jcar...@carmanconsulting.com]
> > >> Sent: Wednesday, February 24, 2010 8:35 PM
> > >> To: users@wicket.apache.org
> > >> Subject: Re: format float/double in dataview
> > >>
> > >> public class MessageFormatColumn extends PropertyColumn
> > >> {
> > >> private final String pattern;
> > >>
> > >> public MessageFormatColumn(IModel 
> displayModel, String
> > >> propertyExpression, String pattern)
> > >> {
> > >> super(displayModel, propertyExpression);
> > >> this.pattern = pattern;
> > >> }
> > >>
> > >> public MessageFormatColumn(IModel 
> displayModel, String
> > >> sortProperty, String propertyExpression, String pattern)
> > >>     {
> > >> super(displayModel, sortProperty, propertyExpression);
> > >> this.pattern = pattern;
> > >> }
> > >>
> > >> @Override
> > >> protected IModel createLabelModel(IModel itemModel)
> > >> {
> > >> IModel superModel = super.createLabelModel(itemModel);
> > >> return new Model(MessageFormat.format(pattern,
> > >> superModel.getObject()));
> > >> }
> > >> }
> > >>
> > >>
> > >> On Wed, Feb 24, 2010 at 1:43 PM, Andreas Lüdtke
> > >>  wrote:
> > >> > I'm displaying doubles in an AjaxFallbackDefaultDataTable.
> > >> Is it possible to
> > >> > format them i.e. with a precision of 2 digits and 
> right aligned?
> > >> >
> > >> > Currently I don't see a possibility to do this.
> > >> >
> > >> > Thanks
> > >> >
> > >> >Andreas
> > >> >
> > >> >
> > >> >
> > >> 
> -
> > >> > 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
> > >>
> > >>
> > >
> > >
> > > 
> -
> > > 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
> >
> >
> 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: format float/double in dataview

2010-02-25 Thread Andreas Lüdtke
James,

thanks a lot for the code snippet. My numbers are now perfectly formatted. Do
you know how to right align the column? Normally, I would do this in the
markup but I don't see a possibility where I can modify this in the code.

Thanks again

Andreas 

> -Original Message-
> From: James Carman [mailto:jcar...@carmanconsulting.com] 
> Sent: Wednesday, February 24, 2010 8:35 PM
> To: users@wicket.apache.org
> Subject: Re: format float/double in dataview
> 
> public class MessageFormatColumn extends PropertyColumn
> {
> private final String pattern;
> 
> public MessageFormatColumn(IModel displayModel, String
> propertyExpression, String pattern)
> {
> super(displayModel, propertyExpression);
> this.pattern = pattern;
> }
> 
> public MessageFormatColumn(IModel displayModel, String
> sortProperty, String propertyExpression, String pattern)
> {
> super(displayModel, sortProperty, propertyExpression);
> this.pattern = pattern;
> }
> 
> @Override
> protected IModel createLabelModel(IModel itemModel)
> {
> IModel superModel = super.createLabelModel(itemModel);
> return new Model(MessageFormat.format(pattern,
> superModel.getObject()));
> }
> }
> 
> 
> On Wed, Feb 24, 2010 at 1:43 PM, Andreas Lüdtke 
>  wrote:
> > I'm displaying doubles in an AjaxFallbackDefaultDataTable. 
> Is it possible to
> > format them i.e. with a precision of 2 digits and right aligned?
> >
> > Currently I don't see a possibility to do this.
> >
> > Thanks
> >
> >        Andreas
> >
> >
> > 
> -
> > 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
> 
> 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



format float/double in dataview

2010-02-24 Thread Andreas Lüdtke
I'm displaying doubles in an AjaxFallbackDefaultDataTable. Is it possible to
format them i.e. with a precision of 2 digits and right aligned?

Currently I don't see a possibility to do this.

Thanks

Andreas


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: best way to detect session termination

2010-02-18 Thread Andreas Lüdtke
Ilja,

thanks for your reply. If I create a service class like the one below, my
_userDao object is always null. This _userDao works perfectly in other parts
of my app. Do I need to inject the dao in a special way? I think the
integration into spring is the problem, because I don't know where to place
the corresponding part in the config/xml files. As I said, my knowledge of
spring is limited.

My class looks like this:

@Service
@Transactional
public class SessionDestroyedService
{
  @ Autowired
  private UserDao _userDao;

  public void forceLogout(String sessionId)
  {
if (_userDao == null)
  System.out.println("SessionDestroyedService.forceLogout(): _userDao is
NULL");
else
{
  System.out.println("SessionDestroyedService.forceLogout(): _userDao is
OK");
  User user = _userDao.getBySessionId(sessionId);
  if (user != null)
  {
  // do the work here...
  }
}
  }
} 

Andreas


> -Original Message-
> From: Ilja Pavkovic [mailto:ilja.pavko...@binaere-bauten.de] 
> Sent: Wednesday, February 17, 2010 5:38 PM
> To: users@wicket.apache.org
> Subject: Re: best way to detect session termination
> 
> Hi,
> 
> create a service class marked with Annotation @Transactional 
> and manage it 
> with spring. Calls to this function will have get a session 
> from the spring 
> context. 
> 
> Spring will open a session before calling any function on 
> this service and 
> close the session afterwards. 
> 
> @Service
> @Transactional
> public class MyService {
>   @Autowired 
>   private MyDao dao;
> 
>   public destroySession(String sessionId) {
>   myDao.deleteMySessionById(sessionId);
>   }
> }
> 
> Best Regards,
>   Ilja Pavkovic
> 
> Am Mittwoch, 17. Februar 2010 13:24:11 schrieb Andreas Lüdtke:
> > Vineet,
> > 
> > I'm now storing the session id in the user record. But now 
> I have another
> > problem, because hibernate tells me now in sessionDestroy():
> > 
> > org.hibernate.HibernateException: No Hibernate Session 
> bound to thread, and
> > configuration does not allow creation of non-transactional one here
> > 
> > I'm using spring to inject my dao. I also tried to use the dao in my
> > HttpSessionListener which is configured in web.xml, but 
> that prevents my
> > app from being started by Tomcat.
> > Next I did was to create a manual created hibernate 
> session, but that
> > raised other problems like a missing hibernate.hbm.xml file 
> and I don't
> > want to configure that manually...
> > 
> > Does somebody see another way to access my user data, or am I doing
> > something stupid?
> > 
> > Andreas
> > 
> > > -Original Message-
> > > From: vineet semwal [mailto:vineetsemwal1...@gmail.com]
> > > Sent: Tuesday, February 16, 2010 2:15 PM
> > > To: users@wicket.apache.org; sam.lued...@t-online.de
> > > Subject: Re: best way to detect session termination
> > > 
> > > can't you simply do that in
> > > webapplication.sessiondestroy(String sessionid),
> > > 
> > >  you can store the sessionid when user logs in and on 
> sessiondestroyed
> > > 
> > > ,search the user by this sessionid ,
> > > and change whatever in user object and then persist it..
> > > 
> > > On Tue, Feb 16, 2010 at 6:23 PM, Andreas Lüdtke
> > > 
> > > wrote:
> > > > I studied the classes HttpSessionBindingListener and
> > > > AbstractHttpSessionStore
> > > > as you noted, but I think I'll still have no link between
> > > 
> > > the SessionId
> > > 
> > > > from
> > > > the HTTPSession and my own Session. Maybe I'm missing
> > > 
> > > something or "I don't
> > > 
> > > > see the wood among all the trees" as we say in Germany...
> > > > 
> > > > Andreas
> > > > 
> > > > > -Original Message-
> > > > > From: Eelco Hillenius [mailto:eelco.hillen...@gmail.com]
> > > > > Sent: Monday, February 15, 2010 7:08 PM
> > > > > To: sam.lued...@t-online.de
> > > > > Cc: users@wicket.apache.org
> > > > > Subject: Re: best way to detect session termination
> > > > > 
> > > > > You could use a HttpSessionBindingListener like Wicket
> > > 
> > > does internally
> > > 
> > > > > (see AbstractHttpSessionStore). Or as a hack store
> > > 
> > > references t

RE: best way to detect session termination

2010-02-17 Thread Andreas Lüdtke
Vineet,

thanks for the snippet. When I try your code, I get again an error message
saying:

org.hibernate.HibernateException: No Hibernate Session bound to thread, and
configuration does not allow creation of non-transactional one here

So, how can I bind the hibernate session to my thread? Or do I need to change
the configuration?

Andreas 

> -Original Message-
> From: vineet semwal [mailto:vineetsemwal1...@gmail.com] 
> Sent: Wednesday, February 17, 2010 5:02 PM
> To: users@wicket.apache.org; sam.lued...@t-online.de
> Subject: Re: best way to detect session termination
> 
> a small example,
> WebApplicationContextUtils.getRequiredWebApplicationContext(ge
> tServletContext()).getBean("name")
> 
> On Wed, Feb 17, 2010 at 8:50 PM, vineet semwal
> wrote:
> 
> >
> > quick solution to do by retrieving the bean from spring 
> applicationcontext
> > in your webapplication,
> > it will work but i am not sure how good the solution is .
> >
> >
> >
> > On Wed, Feb 17, 2010 at 5:54 PM, Andreas Lüdtke 
> wrote:
> >
> >> Vineet,
> >>
> >> I'm now storing the session id in the user record. But now 
> I have another
> >> problem, because hibernate tells me now in sessionDestroy():
> >>
> >> org.hibernate.HibernateException: No Hibernate Session 
> bound to thread,
> >> and
> >> configuration does not allow creation of non-transactional one here
> >>
> >> I'm using spring to inject my dao. I also tried to use the 
> dao in my
> >> HttpSessionListener which is configured in web.xml, but 
> that prevents my
> >> app
> >> from being started by Tomcat.
> >> Next I did was to create a manual created hibernate 
> session, but that
> >> raised
> >> other problems like a missing hibernate.hbm.xml file and I 
> don't want to
> >> configure that manually...
> >>
> >> Does somebody see another way to access my user data, or am I doing
> >> something
> >> stupid?
> >>
> >> Andreas
> >>
> >>
> >> > -Original Message-
> >> > From: vineet semwal [mailto:vineetsemwal1...@gmail.com]
> >> > Sent: Tuesday, February 16, 2010 2:15 PM
> >> > To: users@wicket.apache.org; sam.lued...@t-online.de
> >> > Subject: Re: best way to detect session termination
> >> >
> >> > can't you simply do that in
> >> > webapplication.sessiondestroy(String sessionid),
> >> >  you can store the sessionid when user logs in and on 
> sessiondestroyed
> >> > ,search the user by this sessionid ,
> >> > and change whatever in user object and then persist it..
> >> >
> >> > On Tue, Feb 16, 2010 at 6:23 PM, Andreas Lüdtke
> >> > wrote:
> >> >
> >> > > I studied the classes HttpSessionBindingListener and
> >> > > AbstractHttpSessionStore
> >> > > as you noted, but I think I'll still have no link between
> >> > the SessionId
> >> > > from
> >> > > the HTTPSession and my own Session. Maybe I'm missing
> >> > something or "I don't
> >> > > see the wood among all the trees" as we say in Germany...
> >> > >
> >> > > Andreas
> >> > >
> >> > > > -----Original Message-
> >> > > > From: Eelco Hillenius [mailto:eelco.hillen...@gmail.com]
> >> > > > Sent: Monday, February 15, 2010 7:08 PM
> >> > > > To: sam.lued...@t-online.de
> >> > > > Cc: users@wicket.apache.org
> >> > > > Subject: Re: best way to detect session termination
> >> > > >
> >> > > > You could use a HttpSessionBindingListener like Wicket
> >> > does internally
> >> > > > (see AbstractHttpSessionStore). Or as a hack store
> >> > references to the
> >> > > > session objects in the session listener. That's the 
> easy fix, but
> >> > > > doesn't scale if you need session replication (unless
> >> > maybe you use
> >> > > > e.g. Terracotta).
> >> > > >
> >> > > > Eelco
> >> > > >
> >> > > > On Sun, Feb 14, 2010 at 4:36 AM, Andreas Lüdtke
> >> > > >  wrote:
> >> > > > > Hi Eelco,
> >> > > > >
> >> > > > > thanks for the hint. Now I can detect the end of a session.

RE: best way to detect session termination

2010-02-17 Thread Andreas Lüdtke
Vineet,

could you please give me a hint or a code snippet how to access that
interface? I'm a spring beginner and a little bit lost at the moment.
As I said, in my app the dao is injected and when the session is destroyed,
the link to hibernate is lost.

Andreas

> -Original Message-
> From: vineet semwal [mailto:vineetsemwal1...@gmail.com] 
> Sent: Wednesday, February 17, 2010 4:20 PM
> To: users@wicket.apache.org; sam.lued...@t-online.de
> Subject: Re: best way to detect session termination
> 
> quick solution to do by retrieving the bean from spring 
> applicationcontext
> in your webapplication,
> it will work but i am not sure how good the solution is .
> 
> 
> On Wed, Feb 17, 2010 at 5:54 PM, Andreas Lüdtke 
> wrote:
> 
> > Vineet,
> >
> > I'm now storing the session id in the user record. But now 
> I have another
> > problem, because hibernate tells me now in sessionDestroy():
> >
> > org.hibernate.HibernateException: No Hibernate Session 
> bound to thread, and
> > configuration does not allow creation of non-transactional one here
> >
> > I'm using spring to inject my dao. I also tried to use the dao in my
> > HttpSessionListener which is configured in web.xml, but 
> that prevents my
> > app
> > from being started by Tomcat.
> > Next I did was to create a manual created hibernate 
> session, but that
> > raised
> > other problems like a missing hibernate.hbm.xml file and I 
> don't want to
> > configure that manually...
> >
> > Does somebody see another way to access my user data, or am I doing
> > something
> > stupid?
> >
> > Andreas
> >
> >
> > > -Original Message-
> > > From: vineet semwal [mailto:vineetsemwal1...@gmail.com]
> > > Sent: Tuesday, February 16, 2010 2:15 PM
> > > To: users@wicket.apache.org; sam.lued...@t-online.de
> > > Subject: Re: best way to detect session termination
> > >
> > > can't you simply do that in
> > > webapplication.sessiondestroy(String sessionid),
> > >  you can store the sessionid when user logs in and on 
> sessiondestroyed
> > > ,search the user by this sessionid ,
> > > and change whatever in user object and then persist it..
> > >
> > > On Tue, Feb 16, 2010 at 6:23 PM, Andreas Lüdtke
> > > wrote:
> > >
> > > > I studied the classes HttpSessionBindingListener and
> > > > AbstractHttpSessionStore
> > > > as you noted, but I think I'll still have no link between
> > > the SessionId
> > > > from
> > > > the HTTPSession and my own Session. Maybe I'm missing
> > > something or "I don't
> > > > see the wood among all the trees" as we say in Germany...
> > > >
> > > > Andreas
> > > >
> > > > > -Original Message-
> > > > > From: Eelco Hillenius [mailto:eelco.hillen...@gmail.com]
> > > > > Sent: Monday, February 15, 2010 7:08 PM
> > > > > To: sam.lued...@t-online.de
> > > > > Cc: users@wicket.apache.org
> > > > > Subject: Re: best way to detect session termination
> > > > >
> > > > > You could use a HttpSessionBindingListener like Wicket
> > > does internally
> > > > > (see AbstractHttpSessionStore). Or as a hack store
> > > references to the
> > > > > session objects in the session listener. That's the 
> easy fix, but
> > > > > doesn't scale if you need session replication (unless
> > > maybe you use
> > > > > e.g. Terracotta).
> > > > >
> > > > > Eelco
> > > > >
> > > > > On Sun, Feb 14, 2010 at 4:36 AM, Andreas Lüdtke
> > > > >  wrote:
> > > > > > Hi Eelco,
> > > > > >
> > > > > > thanks for the hint. Now I can detect the end of a session.
> > > > > Unfortunately I
> > > > > > can't access my own wicket session in that
> > > > > sessionDestroyed() method in order
> > > > > > to get the info about the connected user. I've got ther
> > > > > error message
> > > > > > "java.lang.IllegalStateException: you can only locate or
> > > > > create sessions in
> > > > > > the context of a request cycle".
> > > > > >
> > > > > > Do you know how I can

RE: best way to detect session termination

2010-02-17 Thread Andreas Lüdtke
Vineet,

I'm now storing the session id in the user record. But now I have another
problem, because hibernate tells me now in sessionDestroy():

org.hibernate.HibernateException: No Hibernate Session bound to thread, and
configuration does not allow creation of non-transactional one here

I'm using spring to inject my dao. I also tried to use the dao in my
HttpSessionListener which is configured in web.xml, but that prevents my app
from being started by Tomcat.
Next I did was to create a manual created hibernate session, but that raised
other problems like a missing hibernate.hbm.xml file and I don't want to
configure that manually...

Does somebody see another way to access my user data, or am I doing something
stupid?

Andreas


> -Original Message-
> From: vineet semwal [mailto:vineetsemwal1...@gmail.com] 
> Sent: Tuesday, February 16, 2010 2:15 PM
> To: users@wicket.apache.org; sam.lued...@t-online.de
> Subject: Re: best way to detect session termination
> 
> can't you simply do that in 
> webapplication.sessiondestroy(String sessionid),
>  you can store the sessionid when user logs in and on sessiondestroyed
> ,search the user by this sessionid ,
> and change whatever in user object and then persist it..
> 
> On Tue, Feb 16, 2010 at 6:23 PM, Andreas Lüdtke 
> wrote:
> 
> > I studied the classes HttpSessionBindingListener and
> > AbstractHttpSessionStore
> > as you noted, but I think I'll still have no link between 
> the SessionId
> > from
> > the HTTPSession and my own Session. Maybe I'm missing 
> something or "I don't
> > see the wood among all the trees" as we say in Germany...
> >
> > Andreas
> >
> > > -Original Message-
> > > From: Eelco Hillenius [mailto:eelco.hillen...@gmail.com]
> > > Sent: Monday, February 15, 2010 7:08 PM
> > > To: sam.lued...@t-online.de
> > > Cc: users@wicket.apache.org
> > > Subject: Re: best way to detect session termination
> > >
> > > You could use a HttpSessionBindingListener like Wicket 
> does internally
> > > (see AbstractHttpSessionStore). Or as a hack store 
> references to the
> > > session objects in the session listener. That's the easy fix, but
> > > doesn't scale if you need session replication (unless 
> maybe you use
> > > e.g. Terracotta).
> > >
> > > Eelco
> > >
> > > On Sun, Feb 14, 2010 at 4:36 AM, Andreas Lüdtke
> > >  wrote:
> > > > Hi Eelco,
> > > >
> > > > thanks for the hint. Now I can detect the end of a session.
> > > Unfortunately I
> > > > can't access my own wicket session in that
> > > sessionDestroyed() method in order
> > > > to get the info about the connected user. I've got ther
> > > error message
> > > > "java.lang.IllegalStateException: you can only locate or
> > > create sessions in
> > > > the context of a request cycle".
> > > >
> > > > Do you know how I can achieve this?
> > > >
> > > > Andreas
> > > >
> > > >> -Original Message-
> > > >> From: Eelco Hillenius [mailto:eelco.hillen...@gmail.com]
> > > >> Sent: Saturday, February 13, 2010 7:02 PM
> > > >> To: users@wicket.apache.org; sam.lued...@t-online.de
> > > >> Subject: Re: best way to detect session termination
> > > >>
> > > >> 
> http://www.xyzws.com/Servletfaq/when-do-i-use-httpsessionlistener/7
> > > >>
> > > >> Eelco
> > > >>
> > > >> On Sat, Feb 13, 2010 at 8:38 AM, Andreas Lüdtke
> > > >>  wrote:
> > > >> > I would like to detect the termination of the 
> session to set the
> > > >> > "lastAccesTime" in the user profile. This should also
> > > >> happen if the session
> > > >> > times out.
> > > >> >
> > > >> > I read in archive about a HttpSessionListener that should
> > > >> do the trick.
> > > >> > Unfortunately I can't find a place to install it.
> > > >> >
> > > >> > Thanks
> > > >> >
> > > >> > Andreas
> > > >> >
> > > >> >
> > > >> >
> > > >>
> > > 
> -
> > > >> > 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
> > >
> > >
> >
> >
> > 
> -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> 
> 
> -- 
> regards,
> Vineet Semwal
> 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: best way to detect session termination

2010-02-16 Thread Andreas Lüdtke
I studied the classes HttpSessionBindingListener and AbstractHttpSessionStore
as you noted, but I think I'll still have no link between the SessionId from
the HTTPSession and my own Session. Maybe I'm missing something or "I don't
see the wood among all the trees" as we say in Germany...

Andreas

> -Original Message-
> From: Eelco Hillenius [mailto:eelco.hillen...@gmail.com] 
> Sent: Monday, February 15, 2010 7:08 PM
> To: sam.lued...@t-online.de
> Cc: users@wicket.apache.org
> Subject: Re: best way to detect session termination
> 
> You could use a HttpSessionBindingListener like Wicket does internally
> (see AbstractHttpSessionStore). Or as a hack store references to the
> session objects in the session listener. That's the easy fix, but
> doesn't scale if you need session replication (unless maybe you use
> e.g. Terracotta).
> 
> Eelco
> 
> On Sun, Feb 14, 2010 at 4:36 AM, Andreas Lüdtke 
>  wrote:
> > Hi Eelco,
> >
> > thanks for the hint. Now I can detect the end of a session. 
> Unfortunately I
> > can't access my own wicket session in that 
> sessionDestroyed() method in order
> > to get the info about the connected user. I've got ther 
> error message
> > "java.lang.IllegalStateException: you can only locate or 
> create sessions in
> > the context of a request cycle".
> >
> > Do you know how I can achieve this?
> >
> > Andreas
> >
> >> -Original Message-
> >> From: Eelco Hillenius [mailto:eelco.hillen...@gmail.com]
> >> Sent: Saturday, February 13, 2010 7:02 PM
> >> To: users@wicket.apache.org; sam.lued...@t-online.de
> >> Subject: Re: best way to detect session termination
> >>
> >> http://www.xyzws.com/Servletfaq/when-do-i-use-httpsessionlistener/7
> >>
> >> Eelco
> >>
> >> On Sat, Feb 13, 2010 at 8:38 AM, Andreas Lüdtke
> >>  wrote:
> >> > I would like to detect the termination of the session to set the
> >> > "lastAccesTime" in the user profile. This should also
> >> happen if the session
> >> > times out.
> >> >
> >> > I read in archive about a HttpSessionListener that should
> >> do the trick.
> >> > Unfortunately I can't find a place to install it.
> >> >
> >> > Thanks
> >> >
> >> > Andreas
> >> >
> >> >
> >> >
> >> 
> -
> >> > 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
> 
> 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: setPageExpiredErrorPage only for certain pages?

2010-02-15 Thread Andreas Lüdtke
Peter,

I implemented my own RequestCycle and that did the trick.

Thanks

Andreas 

> -Original Message-
> From: Major Péter [mailto:majorpe...@sch.bme.hu] 
> Sent: Sunday, February 14, 2010 2:00 PM
> To: users@wicket.apache.org
> Subject: Re: setPageExpiredErrorPage only for certain pages?
> 
> My guess would be to override RequestCycle#onRuntimeException and do
> your logic there if the exception is PageExpiredException.
> 
> Regards,
> Peter
> 
> 2010-02-14 13:54 keltezéssel, Andreas Lüdtke írta:
> > In my WebApplication class I use setPageExpiredErrorPage(). 
> So far, so good.
> > But this happens also for the main/home page that everybody 
> can access. I
> > would like to redirect only the pages where a user has to 
> login, not for the
> > home page. If the homepage expires, a simple redirect to a 
> new session with
> > that page should be made.
> > 
> > Is this possible with wicket?
> > 
> > Andreas
> 
> -
> 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



RE: setPageExpiredErrorPage only for certain pages?

2010-02-15 Thread Andreas Lüdtke
Martijn,

the page I'm talking about is already "bookmarked" but the problem arises
when the user submits new data to that page and the list on that page should
be updated.

Andreas

> -Original Message-
> From: Martijn Dashorst [mailto:martijn.dasho...@gmail.com] 
> Sent: Sunday, February 14, 2010 5:05 PM
> To: users@wicket.apache.org
> Subject: Re: setPageExpiredErrorPage only for certain pages?
> 
> How would you know which page was requested when the session has
> expired? The whole reason for the PageExpiredException is that wicket
> doesn't know which page was requested. Use bookmarkablepagelinks for
> links you don't want to expire.
> 
> Martijn
> 
> 2010/2/14 Major Péter :
> > My guess would be to override RequestCycle#onRuntimeException and do
> > your logic there if the exception is PageExpiredException.
> >
> > Regards,
> > Peter
> >
> > 2010-02-14 13:54 keltezéssel, Andreas Lüdtke írta:
> >> In my WebApplication class I use 
> setPageExpiredErrorPage(). So far, so good.
> >> But this happens also for the main/home page that 
> everybody can access. I
> >> would like to redirect only the pages where a user has to 
> login, not for the
> >> home page. If the homepage expires, a simple redirect to a 
> new session with
> >> that page should be made.
> >>
> >> Is this possible with wicket?
> >>
> >> Andreas
> >
> > 
> -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> 
> 
> 
> -- 
> Become a Wicket expert, learn from the best: http://wicketinaction.com
> Apache Wicket 1.4 increases type safety for web applications
> Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4
> 
> -
> 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



setPageExpiredErrorPage only for certain pages?

2010-02-14 Thread Andreas Lüdtke
In my WebApplication class I use setPageExpiredErrorPage(). So far, so good.
But this happens also for the main/home page that everybody can access. I
would like to redirect only the pages where a user has to login, not for the
home page. If the homepage expires, a simple redirect to a new session with
that page should be made.

Is this possible with wicket?

Andreas


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: best way to detect session termination

2010-02-14 Thread Andreas Lüdtke
Hi Eelco,

thanks for the hint. Now I can detect the end of a session. Unfortunately I
can't access my own wicket session in that sessionDestroyed() method in order
to get the info about the connected user. I've got ther error message
"java.lang.IllegalStateException: you can only locate or create sessions in
the context of a request cycle".

Do you know how I can achieve this?

Andreas

> -Original Message-
> From: Eelco Hillenius [mailto:eelco.hillen...@gmail.com] 
> Sent: Saturday, February 13, 2010 7:02 PM
> To: users@wicket.apache.org; sam.lued...@t-online.de
> Subject: Re: best way to detect session termination
> 
> http://www.xyzws.com/Servletfaq/when-do-i-use-httpsessionlistener/7
> 
> Eelco
> 
> On Sat, Feb 13, 2010 at 8:38 AM, Andreas Lüdtke 
>  wrote:
> > I would like to detect the termination of the session to set the
> > "lastAccesTime" in the user profile. This should also 
> happen if the session
> > times out.
> >
> > I read in archive about a HttpSessionListener that should 
> do the trick.
> > Unfortunately I can't find a place to install it.
> >
> > Thanks
> >
> > Andreas
> >
> >
> > 
> -
> > 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



best way to detect session termination

2010-02-13 Thread Andreas Lüdtke
I would like to detect the termination of the session to set the
"lastAccesTime" in the user profile. This should also happen if the session
times out.

I read in archive about a HttpSessionListener that should do the trick.
Unfortunately I can't find a place to install it.

Thanks

Andreas


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: AbstractAjaxTimerBehavior#onTimer() doesn't work in deployment mode

2010-02-12 Thread Andreas Lüdtke
Igor,

I made a quickstart and found that it's not a wicket issue but a tomcat
issue. I installed tomcat 6.0.24 and configured it in Netbeans and now it
works as expected.

Thanks

Andreas

> -Original Message-
> From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
> Sent: Tuesday, February 09, 2010 5:19 PM
> To: users@wicket.apache.org; sam.lued...@t-online.de
> Subject: Re: AbstractAjaxTimerBehavior#onTimer() doesn't work 
> in deployment mode
> 
> feel free to open a jira issue attaching a quickstart that reproduces
> the problem.
> 
> -igor
> 
> On Tue, Feb 9, 2010 at 12:37 AM, Andreas Lüdtke 
>  wrote:
> > Can someone please confirm if this is a bug? If yes, I will 
> create a JIRA
> > issue if I'm allowed to do that.
> >
> > Thanks
> >
> > Andreas
> >
> >> -Original Message-
> >> From: Andreas Lüdtke [mailto:sam.lued...@t-online.de]
> >> Sent: Saturday, February 06, 2010 7:43 PM
> >> To: users@wicket.apache.org
> >> Subject: AbstractAjaxTimerBehavior#onTimer() doesn't work in
> >> deployment mode
> >>
> >> Hi,
> >>
> >> I'm using wicket 1.4.6 and saw that the onTimer method of an
> >> AbstractAjaxTimerBehavior object isn't called, when I switch
> >> vom development
> >> mode to deployment mode. This happens also with wicket 1.4.5.
> >>
> >> Is there something I need to do to get it working in 
> deployment mode?
> >>
> >> In addition, after calling AbstractAjaxTimerBehavior.stop()
> >> the onTimer
> >> method is still called (of course only in development mode). ;-)
> >>
> >> If someone finds the time to fix this, I would be glad if
> >> this person could
> >> implement a restart() method to start the timer after it has
> >> been stopped.
> >>
> >> Andreas
> >
> >
> > 
> -
> > 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



RE: AbstractAjaxTimerBehavior#onTimer() doesn't work in deployment mode

2010-02-09 Thread Andreas Lüdtke
Can someone please confirm if this is a bug? If yes, I will create a JIRA
issue if I'm allowed to do that.

Thanks

Andreas

> -Original Message-
> From: Andreas Lüdtke [mailto:sam.lued...@t-online.de] 
> Sent: Saturday, February 06, 2010 7:43 PM
> To: users@wicket.apache.org
> Subject: AbstractAjaxTimerBehavior#onTimer() doesn't work in 
> deployment mode
> 
> Hi,
> 
> I'm using wicket 1.4.6 and saw that the onTimer method of an
> AbstractAjaxTimerBehavior object isn't called, when I switch 
> vom development
> mode to deployment mode. This happens also with wicket 1.4.5.
> 
> Is there something I need to do to get it working in deployment mode?
> 
> In addition, after calling AbstractAjaxTimerBehavior.stop() 
> the onTimer
> method is still called (of course only in development mode). ;-) 
> 
> If someone finds the time to fix this, I would be glad if 
> this person could
> implement a restart() method to start the timer after it has 
> been stopped.
> 
> Andreas


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



best practice for a simple menu

2010-02-07 Thread Andreas Lüdtke
I'm relatively new to wicket and I want to build a menu in my webapp that
looks similar to the menu of xing (start search messages...).
My existing webapp has an abstract base page with a header panel and a footer
panel. Inbetween is the body for the "real" pages. This works so far, but I
have problems with the realization of the menu that should reside in a
separate navigation panel.
First I tried the TabPanel example (which worked) but that is only switching
between Panels instead of switching between Pages, which I need to make these
pages bookmarkable. 

So if someone would be so kind and share his/her expertise, I would be really
glad. All the examples I found didn't helped me.

Thanks in advance

Andreas


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



AbstractAjaxTimerBehavior#onTimer() doesn't work in deployment mode

2010-02-06 Thread Andreas Lüdtke
Hi,

I'm using wicket 1.4.6 and saw that the onTimer method of an
AbstractAjaxTimerBehavior object isn't called, when I switch vom development
mode to deployment mode. This happens also with wicket 1.4.5.

Is there something I need to do to get it working in deployment mode?

In addition, after calling AbstractAjaxTimerBehavior.stop() the onTimer
method is still called (of course only in development mode). ;-) 

If someone finds the time to fix this, I would be glad if this person could
implement a restart() method to start the timer after it has been stopped.

Andreas


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



PagingNavigator css tags

2010-02-04 Thread Andreas Lüdtke
Hi,

I've just started with css and I would like to know the tag names of the
paging navigator. I had a look in the wicket source code, but my css file
doesn't work. I mean the area in the upper right corner like

<<  <  1  2  3  4  5  >  >>

I don't like the italic font-weight. Any help is much appreciated.

Andreas


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: AjaxFallbackDefaultDataTable and delete via ModalWindow

2010-02-02 Thread Andreas Lüdtke
Riyad,

I saw the stop() method and that would help if I only delete one row. But
what should I do when the second row on that page is deleted? There is no
restart() or start() method in the timer. Maybe I'm not aware of a method to
re-enable/re-start the timer.

Ok Riyad, what is smarter than the AjaxFallbackDefaultDataTable in your
opinion ;-)

Andreas

> -Original Message-
> From: Riyad Kalla [mailto:rka...@gmail.com] 
> Sent: Monday, February 01, 2010 4:40 PM
> To: users@wicket.apache.org; sam.lued...@t-online.de
> Subject: Re: AjaxFallbackDefaultDataTable and delete via ModalWindow
> 
> Andreas,
> 
> I'm glad you nailed down what was going on -- that being 
> said, can you just issue a .stop() on the timer on the first 
> callback? So you get your 1 update, then the timer gets 
> killed off and you are good to go?
> 
> Don't know that much about the Ajax Data Table, otherwise I 
> would recommend something way smarter :)
> 
> -R
> 
> 
> On Sat, Jan 30, 2010 at 2:11 AM, Andreas Lüdtke 
>  wrote:
> 
> 
>   Riyad,
>   
>   it's not a dumb question. I asked that already myself 
> and checked via the
>   debugger that the object is really deleted. But you've 
> put me on the right
>   track: I placed a link where I do a
>   AjaxFallbackDefaultDataTable.modelChanged(); and that 
> did the job. Now I've
>   added an AbstractAjaxTimerBehavior with a duration of 1 
> second and that is
>   updating the table after one second.
>   
>   Now I'm curious: do I generate too much Ajax traffic if 
> that timer is running
>   every second? I only need it to run once after I 
> changed the model...
>   
>   Thanks
>   
>   Andreas
>   
> 
>   > -Original Message-
>   > From: Riyad Kalla [mailto:rka...@gmail.com]
>   > Sent: Friday, January 29, 2010 8:35 PM
>   > To: users@wicket.apache.org; sam.lued...@t-online.de
>   > Subject: Re: AjaxFallbackDefaultDataTable and delete 
> via ModalWindow
>   >
>   > Andreas,
>   >
>   > This might be a dumb question, but are you sure at the point
>   > that the page
>   > reloads and re-renders, the object *has* been erased from the
>   > database or
>   > cache you are utilizing? For example, right after you delete,
>   > if you put in
>   > some silly/junk code to immediately re-query for that object,
>   > it comes back
>   > null right?
>   >
>   > I'm sure this is an Ajax/model issue, but 1 time it took me 2
>   > days trying to
>   > figure out why something "Wasn't deleting" just to find out
>   > it was, but my
>   > cache was deferring the operation to a few seconds later. So
>   > I figured I'd
>   > throw that out there just incase.
>   >
>   > -R
>   >
>   > On Fri, Jan 29, 2010 at 10:23 AM, Andreas Lüdtke
>   > wrote:
>   >
>   > > Hi,
>   > >
>   > > I have an AjaxFallbackDefaultDataTable on a page and when I
>   > delete a row of
>   > > the displayed data, I can't get the DataTable to 
> reload and show the
>   > > reduced
>   > > list. I tried already the following:
>   > >
>   > > - delete the object (row) in the database
>   > > - reload the ISortableDataProvider class I'm using <-- this
>   > is actually not
>   > > needed, because the object is removed
>   > > - AjaxFallbackDefaultDataTable.modelChanged()
>   > >
>   > > If I refresh the browser window I see that one object is
>   > missing in the
>   > > list,
>   > > but this way I lose the sorting the user has done.
>   > >
>   > > Am I missing something? How do I bring the
>   > AjaxFallbackDefaultDataTable to
>   > > reflect the changes?
>   > >
>   > > Andreas
>   > >
>   > >
>   > >
>   > 
> -
>   > > 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
>   
>   
> 
> 
> 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: AjaxFallbackDefaultDataTable and delete via ModalWindow

2010-01-30 Thread Andreas Lüdtke
Riyad,

it's not a dumb question. I asked that already myself and checked via the
debugger that the object is really deleted. But you've put me on the right
track: I placed a link where I do a
AjaxFallbackDefaultDataTable.modelChanged(); and that did the job. Now I've
added an AbstractAjaxTimerBehavior with a duration of 1 second and that is
updating the table after one second.

Now I'm curious: do I generate too much Ajax traffic if that timer is running
every second? I only need it to run once after I changed the model...

Thanks

Andreas

> -Original Message-
> From: Riyad Kalla [mailto:rka...@gmail.com] 
> Sent: Friday, January 29, 2010 8:35 PM
> To: users@wicket.apache.org; sam.lued...@t-online.de
> Subject: Re: AjaxFallbackDefaultDataTable and delete via ModalWindow
> 
> Andreas,
> 
> This might be a dumb question, but are you sure at the point 
> that the page
> reloads and re-renders, the object *has* been erased from the 
> database or
> cache you are utilizing? For example, right after you delete, 
> if you put in
> some silly/junk code to immediately re-query for that object, 
> it comes back
> null right?
> 
> I'm sure this is an Ajax/model issue, but 1 time it took me 2 
> days trying to
> figure out why something "Wasn't deleting" just to find out 
> it was, but my
> cache was deferring the operation to a few seconds later. So 
> I figured I'd
> throw that out there just incase.
> 
> -R
> 
> On Fri, Jan 29, 2010 at 10:23 AM, Andreas Lüdtke 
> wrote:
> 
> > Hi,
> >
> > I have an AjaxFallbackDefaultDataTable on a page and when I 
> delete a row of
> > the displayed data, I can't get the DataTable to reload and show the
> > reduced
> > list. I tried already the following:
> >
> > - delete the object (row) in the database
> > - reload the ISortableDataProvider class I'm using <-- this 
> is actually not
> > needed, because the object is removed
> > - AjaxFallbackDefaultDataTable.modelChanged()
> >
> > If I refresh the browser window I see that one object is 
> missing in the
> > list,
> > but this way I lose the sorting the user has done.
> >
> > Am I missing something? How do I bring the 
> AjaxFallbackDefaultDataTable to
> > reflect the changes?
> >
> > Andreas
> >
> >
> > 
> -
> > 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



AjaxFallbackDefaultDataTable and delete via ModalWindow

2010-01-29 Thread Andreas Lüdtke
Hi,

I have an AjaxFallbackDefaultDataTable on a page and when I delete a row of
the displayed data, I can't get the DataTable to reload and show the reduced
list. I tried already the following:

- delete the object (row) in the database 
- reload the ISortableDataProvider class I'm using <-- this is actually not
needed, because the object is removed
- AjaxFallbackDefaultDataTable.modelChanged()

If I refresh the browser window I see that one object is missing in the list,
but this way I lose the sorting the user has done.

Am I missing something? How do I bring the AjaxFallbackDefaultDataTable to
reflect the changes?

Andreas


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: wicket bench in eclipse

2010-01-21 Thread Andreas Lüdtke
Hi Jeroen,

I can open the parent pom and build/test the whole thing. Is that what you're
looking for?

The project explorer lists under "Modules" all the sub projects... 

Andreas 

> -Original Message-
> From: Jeroen Steenbeeke [mailto:j.steenbeeke...@gmail.com] 
> Sent: Thursday, January 21, 2010 5:56 PM
> To: users@wicket.apache.org
> Subject: Re: wicket bench in eclipse
> 
> Does it support parent POMs yet? This was an issue I had back when I
> used Netbeans and had to work with a multi-module project.
> 
> 2010/1/21 Andreas Lüdtke :
> > Hi Lionel,
> >
> > since you don't write what exactly doesn't work, I can only 
> guess: is the
> > M2_REPO variable beeing defined/set in eclipse?
> >
> > This was my main problem when I used eclipse. You should 
> give NetBeans a try.
> > Just open the pom file and everything is fine and working.
> >
> > Andreas
> >
> >
> >> -Original Message-
> >> From: Lionel Port [mailto:lio...@portconnection.com]
> >> Sent: Thursday, January 21, 2010 4:48 AM
> >> To: users@wicket.apache.org
> >> Subject: wicket bench in eclipse
> >>
> >> Hi Guys,
> >>
> >> Not strictly a wicket question, I know. Does anyone have 
> wicket bench
> >> working in Galileo or recent version of eclipse or know of a good
> >> plugin I should be using?. My project has a maven 
> structure, not sure
> >> if thats why it doesn't work.
> >>
> >>
> >> regards,
> >> Lionel
> Jeroen Steenbeeke
> www.fortuityframework.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



RE: wicket bench in eclipse

2010-01-21 Thread Andreas Lüdtke
Hi Lionel,

since you don't write what exactly doesn't work, I can only guess: is the
M2_REPO variable beeing defined/set in eclipse?

This was my main problem when I used eclipse. You should give NetBeans a try.
Just open the pom file and everything is fine and working.

Andreas


> -Original Message-
> From: Lionel Port [mailto:lio...@portconnection.com] 
> Sent: Thursday, January 21, 2010 4:48 AM
> To: users@wicket.apache.org
> Subject: wicket bench in eclipse
> 
> Hi Guys,
> 
> Not strictly a wicket question, I know. Does anyone have wicket bench
> working in Galileo or recent version of eclipse or know of a good
> plugin I should be using?. My project has a maven structure, not sure
> if thats why it doesn't work.
> 
> 
> regards,
> Lionel


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org