RE: Send Page Parameter to Login Page after Calling Logoff Method

2009-06-16 Thread glooorrryyy

Thanks for your reply trames!

I've debugged my code and found the solution for my problem :-D
FYI, I'm using PageLink(id, responsePage) component for the Logout process.
When initialize this pagelink component, the response page are created.
This is the real problem for me, since the code below would be executed too.

((WaspSession)Session.get()).logoff(new LoginContext());
   
PageParameters parameters = new PageParameters();
parameters.put("myParameter", myParameter);
setResponsePage(LoginPage.class, parameters);


So, all I need is to move the code to onClick() method of PageLink
component.

Thanks in advance,
Glo
-- 
View this message in context: 
http://www.nabble.com/Send-Page-Parameter-to-Login-Page-after-Calling-Logoff-Method-tp24049854p24066615.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: status of the PageMap

2009-06-16 Thread Joe Fawzy
Hi So this is the current status, what about future plans?,
How can i provide my own custom implementation?
thanks
Joe

On Tue, Jun 16, 2009 at 9:19 PM, Johan Compagner wrote:

> in 1.4 it is still an part of wicket.
>
> But it is not that needed anymore as before but that is sinse 1.3 when we
> started saving to disk.
>
> johan
>
>
>
> On Tue, Jun 16, 2009 at 20:03, Joe Fawzy  wrote:
>
> > Hi alli was wondering , what is the status of the pageMap?
> > i saw in the wiki some articles talking about it will be deprecated, so
> is
> > that true? i can see it in the 1.4 docs, is that for backward
> compatability
> > or it still a essential part of the platform?
> > How can i plug my own custom subclass of PageMap and make the framework
> use
> > it instead of the stock ones
> > thanks
> > Joe
> >
>


Re: Re: Re: Re: DAO not getting injected, using springbean

2009-06-16 Thread Bruce McGuire

Hi Vasu.

Thanks for the info. Now I get it, and have successfully wired my demo 
app so that it does the job.


Although I did notice that along with the context:component-scan I did 
need to define the beans that I was going to autowire. How did you get 
around this?


   
   class="com.coastware.vProbe.model.dao.hibernate.UserDAOHibernate" />


Other than that, this is a very much reduced context file.

Now I need to duplicate this in my real application.

Thanks for everyone's help.

Bruce McGuire.

Vasu Srinivasan wrote:

Using annotations, I have only one line in the spring's
applicationContext.xml --



Services are tagged with @Service, Daos are tagged with
@Component("xxxDaoImpl"), Wicket web pages have @SpringBean
(name="")

Within the ServiceImpl, the Daos are tagged with @Autowired.

No other xml config, setter, getter for daos etc.

Works like a charm.

2009/6/16 James Carman 

  

You are correct.  You should only use @SpringBean in your wicket-related
code (components/pages).  Let Spring wire the rest together, however you
want to configure it to do that (with annotations or xml).  You can use
@Autowired to inject your DAOs into your Services.  You just have to make
sure you set up your Spring context so that it takes care of that.

On Tue, Jun 16, 2009 at 4:36 PM, Bruce McGuire 
wrote:



Hello James.

So I have completely missed the point of the Repository, Service and
SpringBean annotations?  I was under the impression that the idea was to
avoid using a lot of xml in my context files.

If I am understanding correctly, what you and Martijn are saying is the
following:
Tag the dao and service classes with Repository and Service, and in
  

wicket


code, tag any use of them with SpringBean. However, in the service
  

classes,


use the normal xml injection method and get/set to get the dao into the
service class.

Is this a correct interpretation?

Thanks,

Bruce.

James Carman wrote:

  

You shouldn't use @SpringBean in your spring-managed beans, only in
your Wicket code.  You don't want view-specific code in your "domain"
code.

On Tue, Jun 16, 2009 at 4:17 PM, Bruce McGuire 
wrote:




Hi Martijn.

Thanks for the quick response.

Are you saying that the dao and the service should have the
InjectorHolder code, rather than the @Repository and @Service tags?

Bruce.

Martijn Dashorst wrote:


  

@SpringBean only works with Components. For all other uses you should
either call InjectorHolder.getInjector().inject(this) in your
constructor or use Salve.

Martijn

On Tue, Jun 16, 2009 at 9:26 PM, Bruce McGuire
wrote:





Hello.

I have created a new small project to try to figure out how to use
  

the


SpringBean, Service, and Repository annotations with Wicket, Spring,
Hibernate, Maven and Eclipse.

However, I am getting an error with a user DAO that I have created.

I have a service that is using the dao tagged as @Service, I have the
DAO in
the service tagged with @SpringBean, and the DAO code itself is
  

tagged


with
@Repository.  The service that is using the DAO is getting found
correctly.

When I have the InjectorHolder code in the dao constructor, I get an
error
that says 'InjectorHolder has not been assigned an injector'

When I comment out the InjectorHolder line in the dao constructor,
  

the


DAO
is null, and getUserDAO throws an exception.

Since I am not certain that I can attach files, I will insert the
relevant
code and exceptions into this email.

Any pointers you can give would be greatly appreciated.

Thanks very very much,

Bruce.

UserServiceImpl
> @Service("UserService")
public class UserServiceImpl implements UserService
{
 @SpringBean
 UserDAO userDAO ;

 private UserDAO getUserDAO()
 {
if (null =erDAO)
{
throw new RuntimeException("userDAO is null") ;
}

return(userDAO) ;
 }

 @Override
 public List getUsers()
 {
return (getUserDAO().findAll());
 }
>
UserDAOHibernate
> @Repository("UserDAO")
public class UserDAOHibernate extends GenericDAOHibernate  

String>


implements UserDAO
{
 private static Log log =Factory.getLog("UserDAOHibernate");

 public UserDAOHibernate()
 {
InjectorHolder.getInjector().inject(this);
 }

...
>
HomePage
> public class HomePage extends WebPage
{
 @SpringBean
 private UserService userService ;

 public HomePage(final PageParameters parameters)
 {
super (parameters) ;

List userList =rService.getUsers() ;

RepeatingView rv = RepeatingView("Users") ;
for(User user: userList)
{
Label userName = Label("username", user.getUsername()) ;
rv.add(userName) ;
}

this.add(rv) ;
 }
}
>
CoastwareApplication
> public class CoastwareApplication extends
WebApplication
{
 private ApplicationContext ctx;

 @SpringBean
 pri

Re: Re: Re: DAO not getting injected, using springbean

2009-06-16 Thread Vasu Srinivasan
Using annotations, I have only one line in the spring's
applicationContext.xml --



Services are tagged with @Service, Daos are tagged with
@Component("xxxDaoImpl"), Wicket web pages have @SpringBean
(name="")

Within the ServiceImpl, the Daos are tagged with @Autowired.

No other xml config, setter, getter for daos etc.

Works like a charm.

2009/6/16 James Carman 

> You are correct.  You should only use @SpringBean in your wicket-related
> code (components/pages).  Let Spring wire the rest together, however you
> want to configure it to do that (with annotations or xml).  You can use
> @Autowired to inject your DAOs into your Services.  You just have to make
> sure you set up your Spring context so that it takes care of that.
>
> On Tue, Jun 16, 2009 at 4:36 PM, Bruce McGuire 
> wrote:
>
> > Hello James.
> >
> > So I have completely missed the point of the Repository, Service and
> > SpringBean annotations?  I was under the impression that the idea was to
> > avoid using a lot of xml in my context files.
> >
> > If I am understanding correctly, what you and Martijn are saying is the
> > following:
> > Tag the dao and service classes with Repository and Service, and in
> wicket
> > code, tag any use of them with SpringBean. However, in the service
> classes,
> > use the normal xml injection method and get/set to get the dao into the
> > service class.
> >
> > Is this a correct interpretation?
> >
> > Thanks,
> >
> > Bruce.
> >
> > James Carman wrote:
> >
> >> You shouldn't use @SpringBean in your spring-managed beans, only in
> >> your Wicket code.  You don't want view-specific code in your "domain"
> >> code.
> >>
> >> On Tue, Jun 16, 2009 at 4:17 PM, Bruce McGuire 
> >> wrote:
> >>
> >>
> >>> Hi Martijn.
> >>>
> >>> Thanks for the quick response.
> >>>
> >>> Are you saying that the dao and the service should have the
> >>> InjectorHolder code, rather than the @Repository and @Service tags?
> >>>
> >>> Bruce.
> >>>
> >>> Martijn Dashorst wrote:
> >>>
> >>>
>  @SpringBean only works with Components. For all other uses you should
>  either call InjectorHolder.getInjector().inject(this) in your
>  constructor or use Salve.
> 
>  Martijn
> 
>  On Tue, Jun 16, 2009 at 9:26 PM, Bruce McGuire
>  wrote:
> 
> 
> 
> > Hello.
> >
> > I have created a new small project to try to figure out how to use
> the
> > SpringBean, Service, and Repository annotations with Wicket, Spring,
> > Hibernate, Maven and Eclipse.
> >
> > However, I am getting an error with a user DAO that I have created.
> >
> > I have a service that is using the dao tagged as @Service, I have the
> > DAO in
> > the service tagged with @SpringBean, and the DAO code itself is
> tagged
> > with
> > @Repository.  The service that is using the DAO is getting found
> > correctly.
> >
> > When I have the InjectorHolder code in the dao constructor, I get an
> > error
> > that says 'InjectorHolder has not been assigned an injector'
> >
> > When I comment out the InjectorHolder line in the dao constructor,
> the
> > DAO
> > is null, and getUserDAO throws an exception.
> >
> > Since I am not certain that I can attach files, I will insert the
> > relevant
> > code and exceptions into this email.
> >
> > Any pointers you can give would be greatly appreciated.
> >
> > Thanks very very much,
> >
> > Bruce.
> >
> > UserServiceImpl
> > > @Service("UserService")
> > public class UserServiceImpl implements UserService
> > {
> >  @SpringBean
> >  UserDAO userDAO ;
> >
> >  private UserDAO getUserDAO()
> >  {
> > if (null =erDAO)
> > {
> > throw new RuntimeException("userDAO is null") ;
> > }
> >
> > return(userDAO) ;
> >  }
> >
> >  @Override
> >  public List getUsers()
> >  {
> > return (getUserDAO().findAll());
> >  }
> > >
> > UserDAOHibernate
> > > @Repository("UserDAO")
> > public class UserDAOHibernate extends GenericDAOHibernate String>
> > implements UserDAO
> > {
> >  private static Log log =Factory.getLog("UserDAOHibernate");
> >
> >  public UserDAOHibernate()
> >  {
> > InjectorHolder.getInjector().inject(this);
> >  }
> >
> > ...
> > >
> > HomePage
> > > public class HomePage extends WebPage
> > {
> >  @SpringBean
> >  private UserService userService ;
> >
> >  public HomePage(final PageParameters parameters)
> >  {
> > super (parameters) ;
> >
> > List userList =rService.getUsers() ;
> >
> > RepeatingView rv = RepeatingView("Users") ;
> > for(User user: userList)
> > {
> > Label userName = Label("username", user.getUs

Re: Re: Re: DAO not getting injected, using springbean

2009-06-16 Thread James Carman
You are correct.  You should only use @SpringBean in your wicket-related
code (components/pages).  Let Spring wire the rest together, however you
want to configure it to do that (with annotations or xml).  You can use
@Autowired to inject your DAOs into your Services.  You just have to make
sure you set up your Spring context so that it takes care of that.

On Tue, Jun 16, 2009 at 4:36 PM, Bruce McGuire  wrote:

> Hello James.
>
> So I have completely missed the point of the Repository, Service and
> SpringBean annotations?  I was under the impression that the idea was to
> avoid using a lot of xml in my context files.
>
> If I am understanding correctly, what you and Martijn are saying is the
> following:
> Tag the dao and service classes with Repository and Service, and in wicket
> code, tag any use of them with SpringBean. However, in the service classes,
> use the normal xml injection method and get/set to get the dao into the
> service class.
>
> Is this a correct interpretation?
>
> Thanks,
>
> Bruce.
>
> James Carman wrote:
>
>> You shouldn't use @SpringBean in your spring-managed beans, only in
>> your Wicket code.  You don't want view-specific code in your "domain"
>> code.
>>
>> On Tue, Jun 16, 2009 at 4:17 PM, Bruce McGuire 
>> wrote:
>>
>>
>>> Hi Martijn.
>>>
>>> Thanks for the quick response.
>>>
>>> Are you saying that the dao and the service should have the
>>> InjectorHolder code, rather than the @Repository and @Service tags?
>>>
>>> Bruce.
>>>
>>> Martijn Dashorst wrote:
>>>
>>>
 @SpringBean only works with Components. For all other uses you should
 either call InjectorHolder.getInjector().inject(this) in your
 constructor or use Salve.

 Martijn

 On Tue, Jun 16, 2009 at 9:26 PM, Bruce McGuire
 wrote:



> Hello.
>
> I have created a new small project to try to figure out how to use the
> SpringBean, Service, and Repository annotations with Wicket, Spring,
> Hibernate, Maven and Eclipse.
>
> However, I am getting an error with a user DAO that I have created.
>
> I have a service that is using the dao tagged as @Service, I have the
> DAO in
> the service tagged with @SpringBean, and the DAO code itself is tagged
> with
> @Repository.  The service that is using the DAO is getting found
> correctly.
>
> When I have the InjectorHolder code in the dao constructor, I get an
> error
> that says 'InjectorHolder has not been assigned an injector'
>
> When I comment out the InjectorHolder line in the dao constructor, the
> DAO
> is null, and getUserDAO throws an exception.
>
> Since I am not certain that I can attach files, I will insert the
> relevant
> code and exceptions into this email.
>
> Any pointers you can give would be greatly appreciated.
>
> Thanks very very much,
>
> Bruce.
>
> UserServiceImpl
> > @Service("UserService")
> public class UserServiceImpl implements UserService
> {
>  @SpringBean
>  UserDAO userDAO ;
>
>  private UserDAO getUserDAO()
>  {
> if (null =erDAO)
> {
> throw new RuntimeException("userDAO is null") ;
> }
>
> return(userDAO) ;
>  }
>
>  @Override
>  public List getUsers()
>  {
> return (getUserDAO().findAll());
>  }
> >
> UserDAOHibernate
> > @Repository("UserDAO")
> public class UserDAOHibernate extends GenericDAOHibernate
> implements UserDAO
> {
>  private static Log log =Factory.getLog("UserDAOHibernate");
>
>  public UserDAOHibernate()
>  {
> InjectorHolder.getInjector().inject(this);
>  }
>
> ...
> >
> HomePage
> > public class HomePage extends WebPage
> {
>  @SpringBean
>  private UserService userService ;
>
>  public HomePage(final PageParameters parameters)
>  {
> super (parameters) ;
>
> List userList =rService.getUsers() ;
>
> RepeatingView rv = RepeatingView("Users") ;
> for(User user: userList)
> {
> Label userName = Label("username", user.getUsername()) ;
> rv.add(userName) ;
> }
>
> this.add(rv) ;
>  }
> }
> >
> CoastwareApplication
> > public class CoastwareApplication extends
> WebApplication
> {
>  private ApplicationContext ctx;
>
>  @SpringBean
>  private UserService userService ;
>
>  protected static Log log =Factory.getLog(CoastwareApplication.class) ;
>
>  private static ISpringContextLocator CTX_LOCATOR =
> ISpringContextLocator()
>  {
> public ApplicationContext getSpringContext()
> {
> return(CoastwareApplication.get().ctx) ;
>   

Re: Re: Re: DAO not getting injected, using springbean

2009-06-16 Thread Bruce McGuire

Hello James.

So I have completely missed the point of the Repository, Service and 
SpringBean annotations?  I was under the impression that the idea was to 
avoid using a lot of xml in my context files.


If I am understanding correctly, what you and Martijn are saying is the 
following:
Tag the dao and service classes with Repository and Service, and in 
wicket code, tag any use of them with SpringBean. However, in the 
service classes, use the normal xml injection method and get/set to get 
the dao into the service class.


Is this a correct interpretation?

Thanks,

Bruce.

James Carman wrote:

You shouldn't use @SpringBean in your spring-managed beans, only in
your Wicket code.  You don't want view-specific code in your "domain"
code.

On Tue, Jun 16, 2009 at 4:17 PM, Bruce McGuire  wrote:
  

Hi Martijn.

Thanks for the quick response.

Are you saying that the dao and the service should have the InjectorHolder 
code, rather than the @Repository and @Service tags?

Bruce.

Martijn Dashorst wrote:


@SpringBean only works with Components. For all other uses you should
either call InjectorHolder.getInjector().inject(this) in your
constructor or use Salve.

Martijn

On Tue, Jun 16, 2009 at 9:26 PM, Bruce McGuire wrote:

  

Hello.

I have created a new small project to try to figure out how to use the
SpringBean, Service, and Repository annotations with Wicket, Spring,
Hibernate, Maven and Eclipse.

However, I am getting an error with a user DAO that I have created.

I have a service that is using the dao tagged as @Service, I have the DAO in
the service tagged with @SpringBean, and the DAO code itself is tagged with
@Repository.  The service that is using the DAO is getting found correctly.

When I have the InjectorHolder code in the dao constructor, I get an error
that says 'InjectorHolder has not been assigned an injector'

When I comment out the InjectorHolder line in the dao constructor, the DAO
is null, and getUserDAO throws an exception.

Since I am not certain that I can attach files, I will insert the relevant
code and exceptions into this email.

Any pointers you can give would be greatly appreciated.

Thanks very very much,

Bruce.

UserServiceImpl
> @Service("UserService")
public class UserServiceImpl implements UserService
{
 @SpringBean
 UserDAO userDAO ;

 private UserDAO getUserDAO()
 {
 if (null =erDAO)
 {
 throw new RuntimeException("userDAO is null") ;
 }

 return(userDAO) ;
 }

 @Override
 public List getUsers()
 {
 return (getUserDAO().findAll());
 }
>
UserDAOHibernate
> @Repository("UserDAO")
public class UserDAOHibernate extends GenericDAOHibernate
implements UserDAO
{
 private static Log log =Factory.getLog("UserDAOHibernate");

 public UserDAOHibernate()
 {
 InjectorHolder.getInjector().inject(this);
 }

...
>
HomePage
> public class HomePage extends WebPage
{
 @SpringBean
 private UserService userService ;

 public HomePage(final PageParameters parameters)
 {
 super (parameters) ;

 List userList =rService.getUsers() ;

 RepeatingView rv = RepeatingView("Users") ;
 for(User user: userList)
 {
 Label userName = Label("username", user.getUsername()) ;
 rv.add(userName) ;
 }

 this.add(rv) ;
 }
}
>
CoastwareApplication
> public class CoastwareApplication extends WebApplication
{
 private ApplicationContext ctx;

 @SpringBean
 private UserService userService ;

 protected static Log log =Factory.getLog(CoastwareApplication.class) ;

 private static ISpringContextLocator CTX_LOCATOR =
ISpringContextLocator()
 {
 public ApplicationContext getSpringContext()
 {
 return(CoastwareApplication.get().ctx) ;
 }
 } ;

 public CoastwareApplication()
 {
 }

 public void init()
 {
 ctx = ClassPathXmlApplicationContext("appContext.xml") ;

 addComponentInstantiationListener(new SpringComponentInjector(this));

 super.init() ;
 }

 @Override
 public Session newSession(Request request, Response response)
 {
 return (new WebSession(request)) ;
 }

 public static CoastwareApplication get()
 {
 return ((CoastwareApplication) Application.get()) ;
 }

 private  T createProxy(Class clazz)
 {
 return ((T) LazyInitProxyFactory.createProxy(clazz, new
SpringBeanLocator(clazz, CTX_LOCATOR))) ;
 }

 public Class getHomePage()
 {
 return HomePage.class;
 }

 public UserService getUserService()
 {
 if (null =erService)
 {
 userService =ateProxy(UserService.class) ;
 }
 return userService;
 }
}
>

Web.xml
>   vProbe

 
 contextConfigLocation
 classpath:appContext.xml
 

 
 configuration
 development
 

 
 
 org.springframework.web.context.ContextLoaderListener
 
 

 
 wicketFilter

 org.apache.wicket.protocol.http.WicketFilter
 
 appli

Re: conditional redirect page

2009-06-16 Thread Igor Vaynberg
no, it is not about optimization. we need to unroll the actual call
stack to erase state and start executing again from a clean slate.

-igor

On Tue, Jun 16, 2009 at 1:29 PM, Martin
Makundi wrote:
>> when java will have a different way to unroll the stack we will switch.
>
> Ok so this is an optimization decision that purges something... good
> to know. Totally new to me.
>
> **
> Martin
>
>>
>> -igor
>>
>> On Tue, Jun 16, 2009 at 12:57 PM, Martin
>> Makundi wrote:
 just a RestartResponseException will do
>>>
>>> I've always believed that building flow logic using exceptions is
>>> malpractice
>>>
>>> **
>>> Martin
>>>

>>>
>>> -
>>> 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: Login page crashes if old bookmark

2009-06-16 Thread Igor Vaynberg
i have no idea. use something like liveheaders to make sure you are
consistently getting the same session id.

there is more info in HttpsRequestCycleProcessor javadoc.

-igor

On Tue, Jun 16, 2009 at 1:27 PM, Martin
Makundi wrote:
>> this has nothing to do with how many servers you are running
>
> Does it matter that Apache handles the https and proxies it as plain
> http to jetty?
>
> **
> Martin
>
>>
>> -igor
>>
>> On Tue, Jun 16, 2009 at 12:56 PM, Martin
>> Makundi wrote:
 as far as wicket is concerned it does the best it can. when the
 session is gone we have no state information at all and the only thing
 we can do is display the page expired page. what exactly is
 "unprofessional" about this.
>>>
>>> Well.. this crash :) It is not very 'graceful', maybe better wording
>>> than professionality
>>>
 btw, is your login page https? this may be caused by the fact that you
 will have two different session ids: one secure and one not secure.
>>>
>>> This is actually true... however I have a single jetty listening to
>>> :8080 so I would presume it sees a single session.
>>>
>>> **
>>> Martin
>>>
 On Tue, Jun 16, 2009 at 12:21 PM, Martin
 Makundi wrote:
> I have a feeling this has something to do with the littlebit
> 'unprofessional' way of wicket's dealing with session expiration on
> stateful pages. Wicket sort of deals with session expiration like if
> it was a fatal state.. while it is just daily bloody normal ;)
> Anyways... I will look into this, it's bugged me for 1 year now and I
> have managed to override it but not solve it.
>
> **
> Martin
>
> 2009/6/16 Igor Vaynberg :
>> so the curiosity is why is wicket trying to submit the loginform to
>> the mainpage? i dont think i have seen anything like this before. if
>> you can find a way to reproduce it we will be happy to fix it.
>>
>> -igor
>>
>> On Tue, Jun 16, 2009 at 11:54 AM, Martin
>> Makundi wrote:
>>> No. MainPage is the page the user has probably bookmarked or 
>>> something.. it
>>> is the page after successful login.
>>> **
>>> Martin
>>>
>>> 2009/6/16 Igor Vaynberg 
>>>
 is your LoginPage the com.domain.view.application.MainPage ?

 -igor

 On Tue, Jun 16, 2009 at 9:54 AM, Martin
 Makundi wrote:
 > I am not actually sure how to repeat this bug, this is what I see on
 > the production log.
 >
 > **
 > Martin
 >
 > 2009/6/16 Igor Vaynberg :
 >> IFormSubmitListener? so this happens when you submit the login page?
 >>
 >> -igor
 >>
 >> On Tue, Jun 16, 2009 at 9:30 AM, Martin
 >> Makundi wrote:
  IIRC, for this purpose I had written a separate expired page but 
  I had
  thrown a new restartresponseexception(LoginPage.class) which was
 working
  fine with wicket 1.3.4.
 >>>
 >>> So is there a bug with the pageparameters for a stateful page? They
 >>> should be thrown away when pageExpired occurs (this happens
 >>> automatically with restartresponseexception?)?
 >>>
 >>> Here is some more of the stack:
 >
 > -
 > 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


>>>
>>> -
>>> 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: conditional redirect page

2009-06-16 Thread Martin Makundi
> when java will have a different way to unroll the stack we will switch.

Ok so this is an optimization decision that purges something... good
to know. Totally new to me.

**
Martin

>
> -igor
>
> On Tue, Jun 16, 2009 at 12:57 PM, Martin
> Makundi wrote:
>>> just a RestartResponseException will do
>>
>> I've always believed that building flow logic using exceptions is
>> malpractice
>>
>> **
>> Martin
>>
>>>
>>
>> -
>> 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: Login page crashes if old bookmark

2009-06-16 Thread Martin Makundi
> this has nothing to do with how many servers you are running

Does it matter that Apache handles the https and proxies it as plain
http to jetty?

**
Martin

>
> -igor
>
> On Tue, Jun 16, 2009 at 12:56 PM, Martin
> Makundi wrote:
>>> as far as wicket is concerned it does the best it can. when the
>>> session is gone we have no state information at all and the only thing
>>> we can do is display the page expired page. what exactly is
>>> "unprofessional" about this.
>>
>> Well.. this crash :) It is not very 'graceful', maybe better wording
>> than professionality
>>
>>> btw, is your login page https? this may be caused by the fact that you
>>> will have two different session ids: one secure and one not secure.
>>
>> This is actually true... however I have a single jetty listening to
>> :8080 so I would presume it sees a single session.
>>
>> **
>> Martin
>>
>>> On Tue, Jun 16, 2009 at 12:21 PM, Martin
>>> Makundi wrote:
 I have a feeling this has something to do with the littlebit
 'unprofessional' way of wicket's dealing with session expiration on
 stateful pages. Wicket sort of deals with session expiration like if
 it was a fatal state.. while it is just daily bloody normal ;)
 Anyways... I will look into this, it's bugged me for 1 year now and I
 have managed to override it but not solve it.

 **
 Martin

 2009/6/16 Igor Vaynberg :
> so the curiosity is why is wicket trying to submit the loginform to
> the mainpage? i dont think i have seen anything like this before. if
> you can find a way to reproduce it we will be happy to fix it.
>
> -igor
>
> On Tue, Jun 16, 2009 at 11:54 AM, Martin
> Makundi wrote:
>> No. MainPage is the page the user has probably bookmarked or something.. 
>> it
>> is the page after successful login.
>> **
>> Martin
>>
>> 2009/6/16 Igor Vaynberg 
>>
>>> is your LoginPage the com.domain.view.application.MainPage ?
>>>
>>> -igor
>>>
>>> On Tue, Jun 16, 2009 at 9:54 AM, Martin
>>> Makundi wrote:
>>> > I am not actually sure how to repeat this bug, this is what I see on
>>> > the production log.
>>> >
>>> > **
>>> > Martin
>>> >
>>> > 2009/6/16 Igor Vaynberg :
>>> >> IFormSubmitListener? so this happens when you submit the login page?
>>> >>
>>> >> -igor
>>> >>
>>> >> On Tue, Jun 16, 2009 at 9:30 AM, Martin
>>> >> Makundi wrote:
>>>  IIRC, for this purpose I had written a separate expired page but I 
>>>  had
>>>  thrown a new restartresponseexception(LoginPage.class) which was
>>> working
>>>  fine with wicket 1.3.4.
>>> >>>
>>> >>> So is there a bug with the pageparameters for a stateful page? They
>>> >>> should be thrown away when pageExpired occurs (this happens
>>> >>> automatically with restartresponseexception?)?
>>> >>>
>>> >>> Here is some more of the stack:
>>> >
>>> > -
>>> > 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
>>>
>>>
>>
>> -
>> 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: Re: DAO not getting injected, using springbean

2009-06-16 Thread James Carman
You shouldn't use @SpringBean in your spring-managed beans, only in
your Wicket code.  You don't want view-specific code in your "domain"
code.

On Tue, Jun 16, 2009 at 4:17 PM, Bruce McGuire  wrote:
>
> Hi Martijn.
>
> Thanks for the quick response.
>
> Are you saying that the dao and the service should have the InjectorHolder 
> code, rather than the @Repository and @Service tags?
>
> Bruce.
>
> Martijn Dashorst wrote:
>>
>> @SpringBean only works with Components. For all other uses you should
>> either call InjectorHolder.getInjector().inject(this) in your
>> constructor or use Salve.
>>
>> Martijn
>>
>> On Tue, Jun 16, 2009 at 9:26 PM, Bruce McGuire wrote:
>>
>>>
>>> Hello.
>>>
>>> I have created a new small project to try to figure out how to use the
>>> SpringBean, Service, and Repository annotations with Wicket, Spring,
>>> Hibernate, Maven and Eclipse.
>>>
>>> However, I am getting an error with a user DAO that I have created.
>>>
>>> I have a service that is using the dao tagged as @Service, I have the DAO in
>>> the service tagged with @SpringBean, and the DAO code itself is tagged with
>>> @Repository.  The service that is using the DAO is getting found correctly.
>>>
>>> When I have the InjectorHolder code in the dao constructor, I get an error
>>> that says 'InjectorHolder has not been assigned an injector'
>>>
>>> When I comment out the InjectorHolder line in the dao constructor, the DAO
>>> is null, and getUserDAO throws an exception.
>>>
>>> Since I am not certain that I can attach files, I will insert the relevant
>>> code and exceptions into this email.
>>>
>>> Any pointers you can give would be greatly appreciated.
>>>
>>> Thanks very very much,
>>>
>>> Bruce.
>>>
>>> UserServiceImpl
>>> ==> @Service("UserService")
>>> public class UserServiceImpl implements UserService
>>> {
>>> �...@springbean
>>>  UserDAO userDAO ;
>>>
>>>  private UserDAO getUserDAO()
>>>  {
>>>      if (null =userDAO)
>>>      {
>>>          throw new RuntimeException("userDAO is null") ;
>>>      }
>>>
>>>      return(userDAO) ;
>>>  }
>>>
>>> �...@override
>>>  public List getUsers()
>>>  {
>>>      return (getUserDAO().findAll());
>>>  }
>>> ==>
>>> UserDAOHibernate
>>> ==> @Repository("UserDAO")
>>> public class UserDAOHibernate extends GenericDAOHibernate
>>> implements UserDAO
>>> {
>>>  private static Log log =ogFactory.getLog("UserDAOHibernate");
>>>
>>>  public UserDAOHibernate()
>>>  {
>>>      InjectorHolder.getInjector().inject(this);
>>>  }
>>>
>>> ...
>>> ==>
>>> HomePage
>>> ==> public class HomePage extends WebPage
>>> {
>>> �...@springbean
>>>  private UserService userService ;
>>>
>>>  public HomePage(final PageParameters parameters)
>>>  {
>>>      super (parameters) ;
>>>
>>>      List userList =serService.getUsers() ;
>>>
>>>      RepeatingView rv =ew RepeatingView("Users") ;
>>>      for(User user: userList)
>>>      {
>>>          Label userName =ew Label("username", user.getUsername()) ;
>>>          rv.add(userName) ;
>>>      }
>>>
>>>      this.add(rv) ;
>>>  }
>>> }
>>> ==>
>>> CoastwareApplication
>>> ==> public class CoastwareApplication extends 
>>> WebApplication
>>> {
>>>  private ApplicationContext ctx;
>>>
>>> �...@springbean
>>>  private UserService userService ;
>>>
>>>  protected static Log log =ogFactory.getLog(CoastwareApplication.class) ;
>>>
>>>  private static ISpringContextLocator CTX_LOCATOR =ew
>>> ISpringContextLocator()
>>>  {
>>>      public ApplicationContext getSpringContext()
>>>      {
>>>          return(CoastwareApplication.get().ctx) ;
>>>      }
>>>  } ;
>>>
>>>  public CoastwareApplication()
>>>  {
>>>  }
>>>
>>>  public void init()
>>>  {
>>>      ctx =ew ClassPathXmlApplicationContext("appContext.xml") ;
>>>
>>>      addComponentInstantiationListener(new SpringComponentInjector(this));
>>>
>>>      super.init() ;
>>>  }
>>>
>>> �...@override
>>>  public Session newSession(Request request, Response response)
>>>  {
>>>      return (new WebSession(request)) ;
>>>  }
>>>
>>>  public static CoastwareApplication get()
>>>  {
>>>      return ((CoastwareApplication) Application.get()) ;
>>>  }
>>>
>>>  private  T createProxy(Class clazz)
>>>  {
>>>      return ((T) LazyInitProxyFactory.createProxy(clazz, new
>>> SpringBeanLocator(clazz, CTX_LOCATOR))) ;
>>>  }
>>>
>>>  public Class getHomePage()
>>>  {
>>>      return HomePage.class;
>>>  }
>>>
>>>  public UserService getUserService()
>>>  {
>>>      if (null =userService)
>>>      {
>>>          userService =reateProxy(UserService.class) ;
>>>      }
>>>      return userService;
>>>  }
>>> }
>>> ==>
>>>
>>> Web.xml
>>> ==>   vProbe
>>>
>>>  
>>>      contextConfigLocation
>>>      classpath:appContext.xml
>>>  
>>>
>>>  
>>>      configuration
>>>      development
>>>  
>>>
>>>  
>>>      
>>>          org.springframework.web.context.Co

Re: Re: DAO not getting injected, using springbean

2009-06-16 Thread Bruce McGuire

Hi Martijn.

Thanks for the quick response.

Are you saying that the dao and the service should have the 
InjectorHolder code, rather than the @Repository and @Service tags?


Bruce.

Martijn Dashorst wrote:

@SpringBean only works with Components. For all other uses you should
either call InjectorHolder.getInjector().inject(this) in your
constructor or use Salve.

Martijn

On Tue, Jun 16, 2009 at 9:26 PM, Bruce McGuire wrote:
  

Hello.

I have created a new small project to try to figure out how to use the
SpringBean, Service, and Repository annotations with Wicket, Spring,
Hibernate, Maven and Eclipse.

However, I am getting an error with a user DAO that I have created.

I have a service that is using the dao tagged as @Service, I have the DAO in
the service tagged with @SpringBean, and the DAO code itself is tagged with
@Repository.  The service that is using the DAO is getting found correctly.

When I have the InjectorHolder code in the dao constructor, I get an error
that says 'InjectorHolder has not been assigned an injector'

When I comment out the InjectorHolder line in the dao constructor, the DAO
is null, and getUserDAO throws an exception.

Since I am not certain that I can attach files, I will insert the relevant
code and exceptions into this email.

Any pointers you can give would be greatly appreciated.

Thanks very very much,

Bruce.

UserServiceImpl
==> @Service("UserService")
public class UserServiceImpl implements UserService
{
  @SpringBean
  UserDAO userDAO ;

  private UserDAO getUserDAO()
  {
  if (null =userDAO)
  {
  throw new RuntimeException("userDAO is null") ;
  }

  return(userDAO) ;
  }

  @Override
  public List getUsers()
  {
  return (getUserDAO().findAll());
  }
==>
UserDAOHibernate
==> @Repository("UserDAO")
public class UserDAOHibernate extends GenericDAOHibernate
implements UserDAO
{
  private static Log log =ogFactory.getLog("UserDAOHibernate");

  public UserDAOHibernate()
  {
  InjectorHolder.getInjector().inject(this);
  }

...
==>
HomePage
==> public class HomePage extends WebPage
{
  @SpringBean
  private UserService userService ;

  public HomePage(final PageParameters parameters)
  {
  super (parameters) ;

  List userList =serService.getUsers() ;

  RepeatingView rv =ew RepeatingView("Users") ;
  for(User user: userList)
  {
  Label userName =ew Label("username", user.getUsername()) ;
  rv.add(userName) ;
  }

  this.add(rv) ;
  }
}
==>
CoastwareApplication
==> public class CoastwareApplication extends WebApplication
{
  private ApplicationContext ctx;

  @SpringBean
  private UserService userService ;

  protected static Log log =ogFactory.getLog(CoastwareApplication.class) ;

  private static ISpringContextLocator CTX_LOCATOR =ew
ISpringContextLocator()
  {
  public ApplicationContext getSpringContext()
  {
  return(CoastwareApplication.get().ctx) ;
  }
  } ;

  public CoastwareApplication()
  {
  }

  public void init()
  {
  ctx =ew ClassPathXmlApplicationContext("appContext.xml") ;

  addComponentInstantiationListener(new SpringComponentInjector(this));

  super.init() ;
  }

  @Override
  public Session newSession(Request request, Response response)
  {
  return (new WebSession(request)) ;
  }

  public static CoastwareApplication get()
  {
  return ((CoastwareApplication) Application.get()) ;
  }

  private  T createProxy(Class clazz)
  {
  return ((T) LazyInitProxyFactory.createProxy(clazz, new
SpringBeanLocator(clazz, CTX_LOCATOR))) ;
  }

  public Class getHomePage()
  {
  return HomePage.class;
  }

  public UserService getUserService()
  {
  if (null =userService)
  {
  userService =reateProxy(UserService.class) ;
  }
  return userService;
  }
}
==>

Web.xml
==>   vProbe

  
  contextConfigLocation
  classpath:appContext.xml
  

  
  configuration
  development
  

  
  
  org.springframework.web.context.ContextLoaderListener
  
  

  
  wicketFilter

 org.apache.wicket.protocol.http.WicketFilter
  
  applicationClassName

com.coastware.vProbe.CoastwareApplication
   
  

  
  opensessioninview

org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
  

  
  wicketFilter
  /*
  

  
  opensessioninview
  /*
  
==>
appContext.xml
==> 
http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
  http://www.springframework.org/schema/aop
  http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
  http://www.springframework.org/schema/tx
  http://www.springframework.org/schema/tx/spring-tx-2.5.xsd
  http://www.springframework.or

Re: conditional redirect page

2009-06-16 Thread Igor Vaynberg
a) its not as guaranteed as using an exception - you may forget to
call return, etc, etc.
b) it pollutes the pagemap because the instance of the page that has
the navigation logic is stored in the pagemap needlessly - excepton
doesnt have this sideffect because the object is destroyed.

-igor

2009/6/16 Major Péter :
> Still... What if I'm using
>
> setResponsPage(Page1.class);
> return;
>
> combo???
>
> Peter
>
> 2009-06-16 22:08 keltezéssel, James Carman írta:
>>
>> The response page is already being rendered.  That's why it's being
>> instantiated.
>>
>> On Tue, Jun 16, 2009 at 4:07 PM, Martin Makundi
>>   wrote:
>>>
>>> I use setResponsePage.
>>>
>>> If there was no other way, I would do RFE ;)
>>>
>>> **
>>> Martin
>>>
>>> 2009/6/16 Jeremy Thomerson:

 suggest a better way

 --
 Jeremy Thomerson
 http://www.wickettraining.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
>>
>>
>
> -
> 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: conditional redirect page

2009-06-16 Thread Major Péter

Still... What if I'm using

setResponsPage(Page1.class);
return;

combo???

Peter

2009-06-16 22:08 keltezéssel, James Carman írta:

The response page is already being rendered.  That's why it's being
instantiated.

On Tue, Jun 16, 2009 at 4:07 PM, Martin Makundi
  wrote:

I use setResponsePage.

If there was no other way, I would do RFE ;)

**
Martin

2009/6/16 Jeremy Thomerson:

suggest a better way

--
Jeremy Thomerson
http://www.wickettraining.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




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



Re: conditional redirect page

2009-06-16 Thread Igor Vaynberg
when java will have a different way to unroll the stack we will switch.

-igor

On Tue, Jun 16, 2009 at 12:57 PM, Martin
Makundi wrote:
>> just a RestartResponseException will do
>
> I've always believed that building flow logic using exceptions is
> malpractice
>
> **
> Martin
>
>>
>
> -
> 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: Login page crashes if old bookmark

2009-06-16 Thread Igor Vaynberg
this has nothing to do with how many servers you are running

most containers will create a new sessionid for https requests and
mark that cookie as secure - so it cannot be hijacked.

so your app sees one session for http urls and another for https urls
- all without the application actually knowing anything about it.

a possible solution can be to force session creation on first access
to http url. there was another thread about this very recently, you
might want to search for it.

-igor

On Tue, Jun 16, 2009 at 12:56 PM, Martin
Makundi wrote:
>> as far as wicket is concerned it does the best it can. when the
>> session is gone we have no state information at all and the only thing
>> we can do is display the page expired page. what exactly is
>> "unprofessional" about this.
>
> Well.. this crash :) It is not very 'graceful', maybe better wording
> than professionality
>
>> btw, is your login page https? this may be caused by the fact that you
>> will have two different session ids: one secure and one not secure.
>
> This is actually true... however I have a single jetty listening to
> :8080 so I would presume it sees a single session.
>
> **
> Martin
>
>> On Tue, Jun 16, 2009 at 12:21 PM, Martin
>> Makundi wrote:
>>> I have a feeling this has something to do with the littlebit
>>> 'unprofessional' way of wicket's dealing with session expiration on
>>> stateful pages. Wicket sort of deals with session expiration like if
>>> it was a fatal state.. while it is just daily bloody normal ;)
>>> Anyways... I will look into this, it's bugged me for 1 year now and I
>>> have managed to override it but not solve it.
>>>
>>> **
>>> Martin
>>>
>>> 2009/6/16 Igor Vaynberg :
 so the curiosity is why is wicket trying to submit the loginform to
 the mainpage? i dont think i have seen anything like this before. if
 you can find a way to reproduce it we will be happy to fix it.

 -igor

 On Tue, Jun 16, 2009 at 11:54 AM, Martin
 Makundi wrote:
> No. MainPage is the page the user has probably bookmarked or something.. 
> it
> is the page after successful login.
> **
> Martin
>
> 2009/6/16 Igor Vaynberg 
>
>> is your LoginPage the com.domain.view.application.MainPage ?
>>
>> -igor
>>
>> On Tue, Jun 16, 2009 at 9:54 AM, Martin
>> Makundi wrote:
>> > I am not actually sure how to repeat this bug, this is what I see on
>> > the production log.
>> >
>> > **
>> > Martin
>> >
>> > 2009/6/16 Igor Vaynberg :
>> >> IFormSubmitListener? so this happens when you submit the login page?
>> >>
>> >> -igor
>> >>
>> >> On Tue, Jun 16, 2009 at 9:30 AM, Martin
>> >> Makundi wrote:
>>  IIRC, for this purpose I had written a separate expired page but I 
>>  had
>>  thrown a new restartresponseexception(LoginPage.class) which was
>> working
>>  fine with wicket 1.3.4.
>> >>>
>> >>> So is there a bug with the pageparameters for a stateful page? They
>> >>> should be thrown away when pageExpired occurs (this happens
>> >>> automatically with restartresponseexception?)?
>> >>>
>> >>> Here is some more of the stack:
>> >
>> > -
>> > 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
>>
>>
>
> -
> 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: conditional redirect page

2009-06-16 Thread James Carman
The response page is already being rendered.  That's why it's being
instantiated.

On Tue, Jun 16, 2009 at 4:07 PM, Martin Makundi
 wrote:
>
> I use setResponsePage.
>
> If there was no other way, I would do RFE ;)
>
> **
> Martin
>
> 2009/6/16 Jeremy Thomerson :
> > suggest a better way
> >
> > --
> > Jeremy Thomerson
> > http://www.wickettraining.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: conditional redirect page

2009-06-16 Thread Martin Makundi
I use setResponsePage.

If there was no other way, I would do RFE ;)

**
Martin

2009/6/16 Jeremy Thomerson :
> suggest a better way
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>

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



Re: conditional redirect page

2009-06-16 Thread Jeremy Thomerson
suggest a better way

--
Jeremy Thomerson
http://www.wickettraining.com




On Tue, Jun 16, 2009 at 2:57 PM, Martin
Makundi wrote:
>> just a RestartResponseException will do
>
> I've always believed that building flow logic using exceptions is
> malpractice
>
> **
> Martin
>
>>
>
> -
> 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: conditional redirect page

2009-06-16 Thread Martin Makundi
> just a RestartResponseException will do

I've always believed that building flow logic using exceptions is
malpractice

**
Martin

>

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



Re: Login page crashes if old bookmark

2009-06-16 Thread Martin Makundi
> as far as wicket is concerned it does the best it can. when the
> session is gone we have no state information at all and the only thing
> we can do is display the page expired page. what exactly is
> "unprofessional" about this.

Well.. this crash :) It is not very 'graceful', maybe better wording
than professionality

> btw, is your login page https? this may be caused by the fact that you
> will have two different session ids: one secure and one not secure.

This is actually true... however I have a single jetty listening to
:8080 so I would presume it sees a single session.

**
Martin

> On Tue, Jun 16, 2009 at 12:21 PM, Martin
> Makundi wrote:
>> I have a feeling this has something to do with the littlebit
>> 'unprofessional' way of wicket's dealing with session expiration on
>> stateful pages. Wicket sort of deals with session expiration like if
>> it was a fatal state.. while it is just daily bloody normal ;)
>> Anyways... I will look into this, it's bugged me for 1 year now and I
>> have managed to override it but not solve it.
>>
>> **
>> Martin
>>
>> 2009/6/16 Igor Vaynberg :
>>> so the curiosity is why is wicket trying to submit the loginform to
>>> the mainpage? i dont think i have seen anything like this before. if
>>> you can find a way to reproduce it we will be happy to fix it.
>>>
>>> -igor
>>>
>>> On Tue, Jun 16, 2009 at 11:54 AM, Martin
>>> Makundi wrote:
 No. MainPage is the page the user has probably bookmarked or something.. it
 is the page after successful login.
 **
 Martin

 2009/6/16 Igor Vaynberg 

> is your LoginPage the com.domain.view.application.MainPage ?
>
> -igor
>
> On Tue, Jun 16, 2009 at 9:54 AM, Martin
> Makundi wrote:
> > I am not actually sure how to repeat this bug, this is what I see on
> > the production log.
> >
> > **
> > Martin
> >
> > 2009/6/16 Igor Vaynberg :
> >> IFormSubmitListener? so this happens when you submit the login page?
> >>
> >> -igor
> >>
> >> On Tue, Jun 16, 2009 at 9:30 AM, Martin
> >> Makundi wrote:
>  IIRC, for this purpose I had written a separate expired page but I 
>  had
>  thrown a new restartresponseexception(LoginPage.class) which was
> working
>  fine with wicket 1.3.4.
> >>>
> >>> So is there a bug with the pageparameters for a stateful page? They
> >>> should be thrown away when pageExpired occurs (this happens
> >>> automatically with restartresponseexception?)?
> >>>
> >>> Here is some more of the stack:
> >
> > -
> > 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
>
>

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



Re: conditional redirect page

2009-06-16 Thread Igor Vaynberg
just a RestartResponseException will do

-igor

On Tue, Jun 16, 2009 at 12:34 PM, Jeremy
Thomerson wrote:
> public class MyPage extends Page {
>
> public MyPage() {
> if (condition1) {
> throw new RestartResponseAtInterceptPage(Page1.class);
> } else if (condition2)
> throw new RestartResponseAtInterceptPage(Page2.class);
> }
>
> throw new RestartResponseAtInterceptPage(Home.class);
>
> }
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>
> On Tue, Jun 16, 2009 at 2:29 PM, tubin gen wrote:
>> I want to use redirect page to redirect , In my case depending on a
>> condition I should redirect to different pages , if condition is true then
>> opage1 if false page 2 can I implement this using redirect page ?  If not
>> whats the other alternative ?
>>
>
> -
> 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: conditional redirect page

2009-06-16 Thread Major Péter

And what's the deal with

if (condition1) {
setResponsePage(Page1.class);
} else {
setResponsePage(Page2.class);
}
return;

??
Is RestartResponseAtInterceptPage better somehow?
Thanks

Peter

2009-06-16 21:34 keltezéssel, Jeremy Thomerson írta:

public class MyPage extends Page {

public MyPage() {
if (condition1) {
throw new RestartResponseAtInterceptPage(Page1.class);
} else if (condition2)
throw new RestartResponseAtInterceptPage(Page2.class);
}

throw new RestartResponseAtInterceptPage(Home.class);

}

--
Jeremy Thomerson
http://www.wickettraining.com




On Tue, Jun 16, 2009 at 2:29 PM, tubin gen  wrote:

I want to use redirect page to redirect , In my case depending on a
condition I should redirect to different pages , if condition is true then
opage1 if false page 2 can I implement this using redirect page ?  If not
whats the other alternative ?



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



Re: Login page crashes if old bookmark

2009-06-16 Thread Igor Vaynberg
as far as wicket is concerned it does the best it can. when the
session is gone we have no state information at all and the only thing
we can do is display the page expired page. what exactly is
"unprofessional" about this.


btw, is your login page https? this may be caused by the fact that you
will have two different session ids: one secure and one not secure.

-igor

On Tue, Jun 16, 2009 at 12:21 PM, Martin
Makundi wrote:
> I have a feeling this has something to do with the littlebit
> 'unprofessional' way of wicket's dealing with session expiration on
> stateful pages. Wicket sort of deals with session expiration like if
> it was a fatal state.. while it is just daily bloody normal ;)
> Anyways... I will look into this, it's bugged me for 1 year now and I
> have managed to override it but not solve it.
>
> **
> Martin
>
> 2009/6/16 Igor Vaynberg :
>> so the curiosity is why is wicket trying to submit the loginform to
>> the mainpage? i dont think i have seen anything like this before. if
>> you can find a way to reproduce it we will be happy to fix it.
>>
>> -igor
>>
>> On Tue, Jun 16, 2009 at 11:54 AM, Martin
>> Makundi wrote:
>>> No. MainPage is the page the user has probably bookmarked or something.. it
>>> is the page after successful login.
>>> **
>>> Martin
>>>
>>> 2009/6/16 Igor Vaynberg 
>>>
 is your LoginPage the com.domain.view.application.MainPage ?

 -igor

 On Tue, Jun 16, 2009 at 9:54 AM, Martin
 Makundi wrote:
 > I am not actually sure how to repeat this bug, this is what I see on
 > the production log.
 >
 > **
 > Martin
 >
 > 2009/6/16 Igor Vaynberg :
 >> IFormSubmitListener? so this happens when you submit the login page?
 >>
 >> -igor
 >>
 >> On Tue, Jun 16, 2009 at 9:30 AM, Martin
 >> Makundi wrote:
  IIRC, for this purpose I had written a separate expired page but I had
  thrown a new restartresponseexception(LoginPage.class) which was
 working
  fine with wicket 1.3.4.
 >>>
 >>> So is there a bug with the pageparameters for a stateful page? They
 >>> should be thrown away when pageExpired occurs (this happens
 >>> automatically with restartresponseexception?)?
 >>>
 >>> Here is some more of the stack:
 >
 > -
 > 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: DAO not getting injected, using springbean

2009-06-16 Thread Martijn Dashorst
However, you should let spring handle that one, as it is already a
spring managed bean.

Martijn

On Tue, Jun 16, 2009 at 9:34 PM, Martijn
Dashorst wrote:
> @SpringBean only works with Components. For all other uses you should
> either call InjectorHolder.getInjector().inject(this) in your
> constructor or use Salve.
>
> Martijn
>
> On Tue, Jun 16, 2009 at 9:26 PM, Bruce McGuire wrote:
>> Hello.
>>
>> I have created a new small project to try to figure out how to use the
>> SpringBean, Service, and Repository annotations with Wicket, Spring,
>> Hibernate, Maven and Eclipse.
>>
>> However, I am getting an error with a user DAO that I have created.
>>
>> I have a service that is using the dao tagged as @Service, I have the DAO in
>> the service tagged with @SpringBean, and the DAO code itself is tagged with
>> @Repository.  The service that is using the DAO is getting found correctly.
>>
>> When I have the InjectorHolder code in the dao constructor, I get an error
>> that says 'InjectorHolder has not been assigned an injector'
>>
>> When I comment out the InjectorHolder line in the dao constructor, the DAO
>> is null, and getUserDAO throws an exception.
>>
>> Since I am not certain that I can attach files, I will insert the relevant
>> code and exceptions into this email.
>>
>> Any pointers you can give would be greatly appreciated.
>>
>> Thanks very very much,
>>
>> Bruce.
>>
>> UserServiceImpl
>> =
>> @Service("UserService")
>> public class UserServiceImpl implements UserService
>> {
>>   @SpringBean
>>   UserDAO userDAO ;
>>
>>   private UserDAO getUserDAO()
>>   {
>>       if (null == userDAO)
>>       {
>>           throw new RuntimeException("userDAO is null") ;
>>       }
>>
>>       return(userDAO) ;
>>   }
>>
>>   @Override
>>   public List getUsers()
>>   {
>>       return (getUserDAO().findAll());
>>   }
>> =
>>
>> UserDAOHibernate
>> =
>> @Repository("UserDAO")
>> public class UserDAOHibernate extends GenericDAOHibernate
>> implements UserDAO
>> {
>>   private static Log log = LogFactory.getLog("UserDAOHibernate");
>>
>>   public UserDAOHibernate()
>>   {
>>       InjectorHolder.getInjector().inject(this);
>>   }
>>
>> ...
>> =
>>
>> HomePage
>> =
>> public class HomePage extends WebPage
>> {
>>   @SpringBean
>>   private UserService userService ;
>>
>>   public HomePage(final PageParameters parameters)
>>   {
>>       super (parameters) ;
>>
>>       List userList = userService.getUsers() ;
>>
>>       RepeatingView rv = new RepeatingView("Users") ;
>>       for(User user: userList)
>>       {
>>           Label userName = new Label("username", user.getUsername()) ;
>>           rv.add(userName) ;
>>       }
>>
>>       this.add(rv) ;
>>   }
>> }
>> =
>>
>> CoastwareApplication
>> =
>> public class CoastwareApplication extends WebApplication
>> {
>>   private ApplicationContext ctx;
>>
>>   @SpringBean
>>   private UserService userService ;
>>
>>   protected static Log log = LogFactory.getLog(CoastwareApplication.class) ;
>>
>>   private static ISpringContextLocator CTX_LOCATOR = new
>> ISpringContextLocator()
>>   {
>>       public ApplicationContext getSpringContext()
>>       {
>>           return(CoastwareApplication.get().ctx) ;
>>       }
>>   } ;
>>
>>   public CoastwareApplication()
>>   {
>>   }
>>
>>   public void init()
>>   {
>>       ctx = new ClassPathXmlApplicationContext("appContext.xml") ;
>>
>>       addComponentInstantiationListener(new SpringComponentInjector(this));
>>
>>       super.init() ;
>>   }
>>
>>   @Override
>>   public Session newSession(Request request, Response response)
>>   {
>>       return (new WebSession(request)) ;
>>   }
>>
>>   public static CoastwareApplication get()
>>   {
>>       return ((CoastwareApplication) Application.get()) ;
>>   }
>>
>>   private  T createProxy(Class clazz)
>>   {
>>       return ((T) LazyInitProxyFactory.createProxy(clazz, new
>> SpringBeanLocator(clazz, CTX_LOCATOR))) ;
>>   }
>>
>>   public Class getHomePage()
>>   {
>>       return HomePage.class;
>>   }
>>
>>   public UserService getUserService()
>>   {
>>       if (null == userService)
>>       {
>>           userService = createProxy(UserService.class) ;
>>       }
>>       return userService;
>>   }
>> }
>> =
>>
>>
>> Web.xml
>> =
>>   vProbe
>>
>>   
>>       contextConfigLocation
>>       classpath:appContext.xml
>>   
>>
>>   
>>       configuration
>>       development
>>   
>>
>>   
>>       
>>           org.springframework.web.context.ContextLoaderListener
>>       
>>   
>>
>>   
>>       wicketFilter
>>
>>  org.apache.wicket.protocol.http.WicketFilter
>>       
>>           applicationClassName
>>
>> com.coastware.vProbe.CoastwareApplication
>>        
>>   
>>
>>   
>>       opensessioninview
>>
>> org.springframework.orm.hibernate3.support.OpenSes

Re: DAO not getting injected, using springbean

2009-06-16 Thread Martijn Dashorst
@SpringBean only works with Components. For all other uses you should
either call InjectorHolder.getInjector().inject(this) in your
constructor or use Salve.

Martijn

On Tue, Jun 16, 2009 at 9:26 PM, Bruce McGuire wrote:
> Hello.
>
> I have created a new small project to try to figure out how to use the
> SpringBean, Service, and Repository annotations with Wicket, Spring,
> Hibernate, Maven and Eclipse.
>
> However, I am getting an error with a user DAO that I have created.
>
> I have a service that is using the dao tagged as @Service, I have the DAO in
> the service tagged with @SpringBean, and the DAO code itself is tagged with
> @Repository.  The service that is using the DAO is getting found correctly.
>
> When I have the InjectorHolder code in the dao constructor, I get an error
> that says 'InjectorHolder has not been assigned an injector'
>
> When I comment out the InjectorHolder line in the dao constructor, the DAO
> is null, and getUserDAO throws an exception.
>
> Since I am not certain that I can attach files, I will insert the relevant
> code and exceptions into this email.
>
> Any pointers you can give would be greatly appreciated.
>
> Thanks very very much,
>
> Bruce.
>
> UserServiceImpl
> =
> @Service("UserService")
> public class UserServiceImpl implements UserService
> {
>   @SpringBean
>   UserDAO userDAO ;
>
>   private UserDAO getUserDAO()
>   {
>       if (null == userDAO)
>       {
>           throw new RuntimeException("userDAO is null") ;
>       }
>
>       return(userDAO) ;
>   }
>
>   @Override
>   public List getUsers()
>   {
>       return (getUserDAO().findAll());
>   }
> =
>
> UserDAOHibernate
> =
> @Repository("UserDAO")
> public class UserDAOHibernate extends GenericDAOHibernate
> implements UserDAO
> {
>   private static Log log = LogFactory.getLog("UserDAOHibernate");
>
>   public UserDAOHibernate()
>   {
>       InjectorHolder.getInjector().inject(this);
>   }
>
> ...
> =
>
> HomePage
> =
> public class HomePage extends WebPage
> {
>   @SpringBean
>   private UserService userService ;
>
>   public HomePage(final PageParameters parameters)
>   {
>       super (parameters) ;
>
>       List userList = userService.getUsers() ;
>
>       RepeatingView rv = new RepeatingView("Users") ;
>       for(User user: userList)
>       {
>           Label userName = new Label("username", user.getUsername()) ;
>           rv.add(userName) ;
>       }
>
>       this.add(rv) ;
>   }
> }
> =
>
> CoastwareApplication
> =
> public class CoastwareApplication extends WebApplication
> {
>   private ApplicationContext ctx;
>
>   @SpringBean
>   private UserService userService ;
>
>   protected static Log log = LogFactory.getLog(CoastwareApplication.class) ;
>
>   private static ISpringContextLocator CTX_LOCATOR = new
> ISpringContextLocator()
>   {
>       public ApplicationContext getSpringContext()
>       {
>           return(CoastwareApplication.get().ctx) ;
>       }
>   } ;
>
>   public CoastwareApplication()
>   {
>   }
>
>   public void init()
>   {
>       ctx = new ClassPathXmlApplicationContext("appContext.xml") ;
>
>       addComponentInstantiationListener(new SpringComponentInjector(this));
>
>       super.init() ;
>   }
>
>   @Override
>   public Session newSession(Request request, Response response)
>   {
>       return (new WebSession(request)) ;
>   }
>
>   public static CoastwareApplication get()
>   {
>       return ((CoastwareApplication) Application.get()) ;
>   }
>
>   private  T createProxy(Class clazz)
>   {
>       return ((T) LazyInitProxyFactory.createProxy(clazz, new
> SpringBeanLocator(clazz, CTX_LOCATOR))) ;
>   }
>
>   public Class getHomePage()
>   {
>       return HomePage.class;
>   }
>
>   public UserService getUserService()
>   {
>       if (null == userService)
>       {
>           userService = createProxy(UserService.class) ;
>       }
>       return userService;
>   }
> }
> =
>
>
> Web.xml
> =
>   vProbe
>
>   
>       contextConfigLocation
>       classpath:appContext.xml
>   
>
>   
>       configuration
>       development
>   
>
>   
>       
>           org.springframework.web.context.ContextLoaderListener
>       
>   
>
>   
>       wicketFilter
>
>  org.apache.wicket.protocol.http.WicketFilter
>       
>           applicationClassName
>
> com.coastware.vProbe.CoastwareApplication
>        
>   
>
>   
>       opensessioninview
>
> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
>   
>
>   
>       wicketFilter
>       /*
>   
>
>   
>       opensessioninview
>       /*
>   
> =
>
> appContext.xml
> =
> 
>    default-autowire="autodetect"
>   xmlns="http://www.springframework.org/schema/beans";
>   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>   xmlns:aop="htt

Re: conditional redirect page

2009-06-16 Thread Jeremy Thomerson
public class MyPage extends Page {

public MyPage() {
if (condition1) {
throw new RestartResponseAtInterceptPage(Page1.class);
} else if (condition2)
throw new RestartResponseAtInterceptPage(Page2.class);
}

throw new RestartResponseAtInterceptPage(Home.class);

}

--
Jeremy Thomerson
http://www.wickettraining.com




On Tue, Jun 16, 2009 at 2:29 PM, tubin gen wrote:
> I want to use redirect page to redirect , In my case depending on a
> condition I should redirect to different pages , if condition is true then
> opage1 if false page 2 can I implement this using redirect page ?  If not
> whats the other alternative ?
>

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



conditional redirect page

2009-06-16 Thread tubin gen
I want to use redirect page to redirect , In my case depending on a
condition I should redirect to different pages , if condition is true then
opage1 if false page 2 can I implement this using redirect page ?  If not
whats the other alternative ?


DAO not getting injected, using springbean

2009-06-16 Thread Bruce McGuire

Hello.

I have created a new small project to try to figure out how to use the 
SpringBean, Service, and Repository annotations with Wicket, Spring, 
Hibernate, Maven and Eclipse.


However, I am getting an error with a user DAO that I have created.

I have a service that is using the dao tagged as @Service, I have the 
DAO in the service tagged with @SpringBean, and the DAO code itself is 
tagged with @Repository.  The service that is using the DAO is getting 
found correctly.


When I have the InjectorHolder code in the dao constructor, I get an 
error that says 'InjectorHolder has not been assigned an injector'


When I comment out the InjectorHolder line in the dao constructor, the 
DAO is null, and getUserDAO throws an exception.


Since I am not certain that I can attach files, I will insert the 
relevant code and exceptions into this email.


Any pointers you can give would be greatly appreciated.

Thanks very very much,

Bruce.

UserServiceImpl
=
@Service("UserService")
public class UserServiceImpl implements UserService
{
   @SpringBean
   UserDAO userDAO ;

   private UserDAO getUserDAO()
   {
   if (null == userDAO)
   {
   throw new RuntimeException("userDAO is null") ;
   }

   return(userDAO) ;
   }

   @Override
   public List getUsers()
   {
   return (getUserDAO().findAll());
   }
=

UserDAOHibernate
=
@Repository("UserDAO")
public class UserDAOHibernate extends GenericDAOHibernate 
implements UserDAO

{
   private static Log log = LogFactory.getLog("UserDAOHibernate");

   public UserDAOHibernate()
   {
   InjectorHolder.getInjector().inject(this);
   }

...
=

HomePage
=
public class HomePage extends WebPage
{
   @SpringBean
   private UserService userService ;

   public HomePage(final PageParameters parameters)
   {
   super (parameters) ;

   List userList = userService.getUsers() ;

   RepeatingView rv = new RepeatingView("Users") ;
   for(User user: userList)
   {
   Label userName = new Label("username", user.getUsername()) ;
   rv.add(userName) ;
   }

   this.add(rv) ;
   }
}
=

CoastwareApplication
=
public class CoastwareApplication extends WebApplication
{
   private ApplicationContext ctx;

   @SpringBean
   private UserService userService ;

   protected static Log log = 
LogFactory.getLog(CoastwareApplication.class) ;


   private static ISpringContextLocator CTX_LOCATOR = new 
ISpringContextLocator()

   {
   public ApplicationContext getSpringContext()
   {
   return(CoastwareApplication.get().ctx) ;
   }
   } ;

   public CoastwareApplication()
   {
   }

   public void init()
   {
   ctx = new ClassPathXmlApplicationContext("appContext.xml") ;

   addComponentInstantiationListener(new 
SpringComponentInjector(this));


   super.init() ;
   }

   @Override
   public Session newSession(Request request, Response response)
   {
   return (new WebSession(request)) ;
   }

   public static CoastwareApplication get()
   {
   return ((CoastwareApplication) Application.get()) ;
   }

   private  T createProxy(Class clazz)
   {
   return ((T) LazyInitProxyFactory.createProxy(clazz, new 
SpringBeanLocator(clazz, CTX_LOCATOR))) ;

   }

   public Class getHomePage()
   {
   return HomePage.class;
   }

   public UserService getUserService()
   {
   if (null == userService)
   {
   userService = createProxy(UserService.class) ;
   }
   return userService;
   }
}
=


Web.xml
=
   vProbe

   
   contextConfigLocation
   classpath:appContext.xml
   

   
   configuration
   development
   

   
   
   org.springframework.web.context.ContextLoaderListener
   
   

   
   wicketFilter

org.apache.wicket.protocol.http.WicketFilter

   
   applicationClassName
   
com.coastware.vProbe.CoastwareApplication


   

   
   opensessioninview
   
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter

   

   
   wicketFilter
   /*
   

   
   opensessioninview
   /*
   
=

appContext.xml
=

http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xmlns:aop="http://www.springframework.org/schema/aop";
   xmlns:tx="http://www.springframework.org/schema/tx";
   xmlns:context="http://www.springframework.org/schema/context";
   xsi:schemaLocation="
   http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
   http://www.springframework.org/schema/aop
   http://www.springframework.org/schema/aop/spring-aop-2.5.xsd
   http://www.springframework.org/schema/tx
   h

Re: Wicket-like JavaScript Components

2009-06-16 Thread Dane Laverty
I'm currently the only Java programmer on staff, and I'm already maintaining
two Wicket applications, so my boss is concerned that if I start a third
project in Java that no one else will be able to maintain it. It's a
reasonable concern, but kind of too bad nonetheless. I'm using JQuery as my
main JS resource for the application. All of the business logic is managed
through Ajax calls.

On Tue, Jun 16, 2009 at 12:05 PM, Jeremy Thomerson <
jer...@wickettraining.com> wrote:

> Yeah - but I would guess that it wouldn't fit "where I'm limited to
> using only JavaScript"
>
> Out of curiosity - what do you mean "where I'm limited to using only
> JavaScript"?  I mean, can you use HTML?  What does this "app" do -
> obviously not much if it's "only JS".  What does it tie in with to do
> business logic, etc?  Were these requirements written by a PHB?
>
> --
> Jeremy Thomerson
> http://www.wickettraining.com
>
>
>
>
> On Tue, Jun 16, 2009 at 11:56 AM, Nicolas
> Melendez wrote:
> > GWT is a good framework.You can code in java and then it is translated to
> > javascript.
> > NM
> >
> > On Tue, Jun 16, 2009 at 4:05 PM, nino martinez wael <
> > nino.martinez.w...@gmail.com> wrote:
> >
> >> You can also have a look at wicketstuff and see what integrations
> >> already exists :)
> >>
> >> 2009/6/15 Dane Laverty :
> >> > I'm working on a small project where I'm limited to using only
> >> JavaScript. I
> >> > love the Wicket programming model, especially reusable components. Is
> >> anyone
> >> > aware of a JavaScript framework or JavaScript techniques that would
> allow
> >> me
> >> > to approximate Wicket components?
> >> >
> >>
> >> -
> >> 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: Login page crashes if old bookmark

2009-06-16 Thread Martin Makundi
I have a feeling this has something to do with the littlebit
'unprofessional' way of wicket's dealing with session expiration on
stateful pages. Wicket sort of deals with session expiration like if
it was a fatal state.. while it is just daily bloody normal ;)
Anyways... I will look into this, it's bugged me for 1 year now and I
have managed to override it but not solve it.

**
Martin

2009/6/16 Igor Vaynberg :
> so the curiosity is why is wicket trying to submit the loginform to
> the mainpage? i dont think i have seen anything like this before. if
> you can find a way to reproduce it we will be happy to fix it.
>
> -igor
>
> On Tue, Jun 16, 2009 at 11:54 AM, Martin
> Makundi wrote:
>> No. MainPage is the page the user has probably bookmarked or something.. it
>> is the page after successful login.
>> **
>> Martin
>>
>> 2009/6/16 Igor Vaynberg 
>>
>>> is your LoginPage the com.domain.view.application.MainPage ?
>>>
>>> -igor
>>>
>>> On Tue, Jun 16, 2009 at 9:54 AM, Martin
>>> Makundi wrote:
>>> > I am not actually sure how to repeat this bug, this is what I see on
>>> > the production log.
>>> >
>>> > **
>>> > Martin
>>> >
>>> > 2009/6/16 Igor Vaynberg :
>>> >> IFormSubmitListener? so this happens when you submit the login page?
>>> >>
>>> >> -igor
>>> >>
>>> >> On Tue, Jun 16, 2009 at 9:30 AM, Martin
>>> >> Makundi wrote:
>>>  IIRC, for this purpose I had written a separate expired page but I had
>>>  thrown a new restartresponseexception(LoginPage.class) which was
>>> working
>>>  fine with wicket 1.3.4.
>>> >>>
>>> >>> So is there a bug with the pageparameters for a stateful page? They
>>> >>> should be thrown away when pageExpired occurs (this happens
>>> >>> automatically with restartresponseexception?)?
>>> >>>
>>> >>> Here is some more of the stack:
>>> >
>>> > -
>>> > 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: Wicket-like JavaScript Components

2009-06-16 Thread Jeremy Thomerson
Yeah - but I would guess that it wouldn't fit "where I'm limited to
using only JavaScript"

Out of curiosity - what do you mean "where I'm limited to using only
JavaScript"?  I mean, can you use HTML?  What does this "app" do -
obviously not much if it's "only JS".  What does it tie in with to do
business logic, etc?  Were these requirements written by a PHB?

--
Jeremy Thomerson
http://www.wickettraining.com




On Tue, Jun 16, 2009 at 11:56 AM, Nicolas
Melendez wrote:
> GWT is a good framework.You can code in java and then it is translated to
> javascript.
> NM
>
> On Tue, Jun 16, 2009 at 4:05 PM, nino martinez wael <
> nino.martinez.w...@gmail.com> wrote:
>
>> You can also have a look at wicketstuff and see what integrations
>> already exists :)
>>
>> 2009/6/15 Dane Laverty :
>> > I'm working on a small project where I'm limited to using only
>> JavaScript. I
>> > love the Wicket programming model, especially reusable components. Is
>> anyone
>> > aware of a JavaScript framework or JavaScript techniques that would allow
>> me
>> > to approximate Wicket components?
>> >
>>
>> -
>> 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: Login page crashes if old bookmark

2009-06-16 Thread Igor Vaynberg
so the curiosity is why is wicket trying to submit the loginform to
the mainpage? i dont think i have seen anything like this before. if
you can find a way to reproduce it we will be happy to fix it.

-igor

On Tue, Jun 16, 2009 at 11:54 AM, Martin
Makundi wrote:
> No. MainPage is the page the user has probably bookmarked or something.. it
> is the page after successful login.
> **
> Martin
>
> 2009/6/16 Igor Vaynberg 
>
>> is your LoginPage the com.domain.view.application.MainPage ?
>>
>> -igor
>>
>> On Tue, Jun 16, 2009 at 9:54 AM, Martin
>> Makundi wrote:
>> > I am not actually sure how to repeat this bug, this is what I see on
>> > the production log.
>> >
>> > **
>> > Martin
>> >
>> > 2009/6/16 Igor Vaynberg :
>> >> IFormSubmitListener? so this happens when you submit the login page?
>> >>
>> >> -igor
>> >>
>> >> On Tue, Jun 16, 2009 at 9:30 AM, Martin
>> >> Makundi wrote:
>>  IIRC, for this purpose I had written a separate expired page but I had
>>  thrown a new restartresponseexception(LoginPage.class) which was
>> working
>>  fine with wicket 1.3.4.
>> >>>
>> >>> So is there a bug with the pageparameters for a stateful page? They
>> >>> should be thrown away when pageExpired occurs (this happens
>> >>> automatically with restartresponseexception?)?
>> >>>
>> >>> Here is some more of the stack:
>> >
>> > -
>> > 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: Login page crashes if old bookmark

2009-06-16 Thread Martin Makundi
No. MainPage is the page the user has probably bookmarked or something.. it
is the page after successful login.
**
Martin

2009/6/16 Igor Vaynberg 

> is your LoginPage the com.domain.view.application.MainPage ?
>
> -igor
>
> On Tue, Jun 16, 2009 at 9:54 AM, Martin
> Makundi wrote:
> > I am not actually sure how to repeat this bug, this is what I see on
> > the production log.
> >
> > **
> > Martin
> >
> > 2009/6/16 Igor Vaynberg :
> >> IFormSubmitListener? so this happens when you submit the login page?
> >>
> >> -igor
> >>
> >> On Tue, Jun 16, 2009 at 9:30 AM, Martin
> >> Makundi wrote:
>  IIRC, for this purpose I had written a separate expired page but I had
>  thrown a new restartresponseexception(LoginPage.class) which was
> working
>  fine with wicket 1.3.4.
> >>>
> >>> So is there a bug with the pageparameters for a stateful page? They
> >>> should be thrown away when pageExpired occurs (this happens
> >>> automatically with restartresponseexception?)?
> >>>
> >>> Here is some more of the stack:
> >
> > -
> > 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: status of the PageMap

2009-06-16 Thread Johan Compagner
in 1.4 it is still an part of wicket.

But it is not that needed anymore as before but that is sinse 1.3 when we
started saving to disk.

johan



On Tue, Jun 16, 2009 at 20:03, Joe Fawzy  wrote:

> Hi alli was wondering , what is the status of the pageMap?
> i saw in the wiki some articles talking about it will be deprecated, so is
> that true? i can see it in the 1.4 docs, is that for backward compatability
> or it still a essential part of the platform?
> How can i plug my own custom subclass of PageMap and make the framework use
> it instead of the stock ones
> thanks
> Joe
>


Re: 1.4 trunk broken?

2009-06-16 Thread Johan Compagner
i do remember one change for that invalidurlexception
(that we should throw that as an exception instead of just a page expired or
something)

On Tue, Jun 16, 2009 at 18:09, Stefan Lindner  wrote:

> Using current 1.4 trunk gives me the error
>
> [RequestCycle] org.apache.wicket.protocol.http.PageExpiredException:
> Cannot find the rendered page in session [pagemap=nu
> ll,componentPath=1,versionNumber=0]
> org.apache.wicket.protocol.http.request.InvalidUrlException:
> org.apache.wicket.protocol.http.PageExpiredException: Cannot find the
> rendered
> page in session [pagemap=null,componentPath=1,versionNumber=0]
>at
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequ
> estCycleProcessor.java:250)
>at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301)
>at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
>at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
>at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456
> )
>at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:
> 289)
>at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:235)
>at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:206)
>at
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilte
> r.java:96)
>at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
> tionFilterChain.java:235)
>at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
> erChain.java:206)
>at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
> e.java:235)
>at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
> e.java:191)
>at
> org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs
> sociationValve.java:190)
>at
> org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.j
> ava:92)
>at
> org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(
> SecurityContextEstablishmentValve.java:126)
>at
> org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(S
> ecurityContextEstablishmentValve.java:70)
>at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
> :127)
>at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
> :102)
>at
> org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConn
> ectionValve.java:158)
>at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
> java:109)
>at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:3
> 30)
>at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:82
> 9)
>at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
> Http11Protocol.java:598)
>at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>at java.lang.Thread.run(Thread.java:619)
> Caused by: org.apache.wicket.protocol.http.PageExpiredException: Cannot
> find the rendered page in session [pagemap=null,componentPath=1,vers
> ionNumber=0]
>at
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequ
> estCycleProcessor.java:197)
>... 25 more
>
>
> On loading a page. Did I miss some big change?
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


status of the PageMap

2009-06-16 Thread Joe Fawzy
Hi alli was wondering , what is the status of the pageMap?
i saw in the wiki some articles talking about it will be deprecated, so is
that true? i can see it in the 1.4 docs, is that for backward compatability
or it still a essential part of the platform?
How can i plug my own custom subclass of PageMap and make the framework use
it instead of the stock ones
thanks
Joe


Re: changing choices component in Palette

2009-06-16 Thread Fernando Wermus
Hi Eyal,

First:
 if you wanna change the components, you will see that you can override
the new protected method for that.

Second:
 There are many cases where you dont want to give public access to your
component because of implementation reasons. If you wanna change its
behavior then extended and be responsable for the implementation.

For instance, I saw some cases where the construction of some nested
components (of a main component) are done at rendering time. (I think I saw
something like this in wizard component).



On Sun, Jun 14, 2009 at 11:23 AM, Eyal Golan  wrote:

> any 1
>
> ?
>
> Eyal Golan
> egola...@gmail.com
>
> Visit: http://jvdrums.sourceforge.net/
> LinkedIn: http://www.linkedin.com/in/egolan74
>
> P  Save a tree. Please don't print this e-mail unless it's really necessary
>
>
> On Fri, Jun 12, 2009 at 7:13 AM, Eyal Golan  wrote:
>
> > BTW,
> > we use Wicket 1.3.6
> >
> > I will try to rephrase my original question:
> > why are getChoicesComponent and ‪getSelectionComponent()‬ private?
> > Can I add a Wish in Jira to make them public?
> >
> >
> > Eyal Golan
> > egola...@gmail.com
> >
> > Visit: http://jvdrums.sourceforge.net/
> > LinkedIn: http://www.linkedin.com/in/egolan74
> >
> > P  Save a tree. Please don't print this e-mail unless it's really
> necessary
> >
> >
> > On Thu, Jun 11, 2009 at 5:30 PM, Eyal Golan  wrote:
> >
> >> Hi,
> >> I have a situation that I want to change possible choices in a palette
> >> according to a DropDown.
> >> I added to the DropDown the Ajax Updating
> >> add(new AjaxFormComponentUpdatingBehavior("onchange") {...}
> >> I have this palette:
> >> final CustomPalette palette = new CustomPalette("palette", new
> >> PropertyModel(rolesCoverage, "comparedConfigurations"),
> >> allConfigurationsModel, choiceRenderer, 10, true);
> >> and:
> >> final IModel allConfigurationsModel = new
> AbstractReadOnlyModel()
> >> {
> >> private static final long serialVersionUID = 1L;
> >>
> >> @Override
> >> public Object getObject() {
> >> final List allConfigs =
> >> sageDal.getConfigurations();
> >> allConfigs.remove(rolesCoverage.getMainConfiguration());
> >> return allConfigs;
> >> }
> >> };
> >> The page uses CompoundPropertModel: super(id, new
> >> CompoundPropertyModel(rolesCoverage)); in the constructor.
> >> The problem that I encountered is that if I added to the target of the
> >> DropDown the palette, it kept remembering my selected values.
> >>
> >> In order to change that I hacked a bit with our CustomPalette:
> >> @Override
> >> protected Component newChoicesComponent() {
> >> final Component result = super.newChoicesComponent();
> >> externalizedChoiceComponent = result;
> >> externalizedChoiceComponent.setOutputMarkupId(true);
> >> return result;
> >> }
> >>
> >> public Component getExternalizedChoiceComponent() {
> >> return this.externalizedChoiceComponent;
> >> }
> >>
> >> And in the DropDown, instead of adding the palette, I used
> >> target.addComponent(customPalette.getExternalizedChoiceComponent());
> >>
> >> It works.
> >>
> >> My question is if this is the correct way? Is there a better way doing
> >> that?
> >>
> >> Eyal Golan
> >> egola...@gmail.com
> >>
> >> Visit: http://jvdrums.sourceforge.net/
> >> LinkedIn: http://www.linkedin.com/in/egolan74
> >>
> >> P  Save a tree. Please don't print this e-mail unless it's really
> >> necessary
> >>
> >
> >
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: Login page crashes if old bookmark

2009-06-16 Thread Igor Vaynberg
is your LoginPage the com.domain.view.application.MainPage ?

-igor

On Tue, Jun 16, 2009 at 9:54 AM, Martin
Makundi wrote:
> I am not actually sure how to repeat this bug, this is what I see on
> the production log.
>
> **
> Martin
>
> 2009/6/16 Igor Vaynberg :
>> IFormSubmitListener? so this happens when you submit the login page?
>>
>> -igor
>>
>> On Tue, Jun 16, 2009 at 9:30 AM, Martin
>> Makundi wrote:
 IIRC, for this purpose I had written a separate expired page but I had
 thrown a new restartresponseexception(LoginPage.class) which was working
 fine with wicket 1.3.4.
>>>
>>> So is there a bug with the pageparameters for a stateful page? They
>>> should be thrown away when pageExpired occurs (this happens
>>> automatically with restartresponseexception?)?
>>>
>>> Here is some more of the stack:
>
> -
> 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-like JavaScript Components

2009-06-16 Thread Nicolas Melendez
GWT is a good framework.You can code in java and then it is translated to
javascript.
NM

On Tue, Jun 16, 2009 at 4:05 PM, nino martinez wael <
nino.martinez.w...@gmail.com> wrote:

> You can also have a look at wicketstuff and see what integrations
> already exists :)
>
> 2009/6/15 Dane Laverty :
> > I'm working on a small project where I'm limited to using only
> JavaScript. I
> > love the Wicket programming model, especially reusable components. Is
> anyone
> > aware of a JavaScript framework or JavaScript techniques that would allow
> me
> > to approximate Wicket components?
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Login page crashes if old bookmark

2009-06-16 Thread Martin Makundi
I am not actually sure how to repeat this bug, this is what I see on
the production log.

**
Martin

2009/6/16 Igor Vaynberg :
> IFormSubmitListener? so this happens when you submit the login page?
>
> -igor
>
> On Tue, Jun 16, 2009 at 9:30 AM, Martin
> Makundi wrote:
>>> IIRC, for this purpose I had written a separate expired page but I had
>>> thrown a new restartresponseexception(LoginPage.class) which was working
>>> fine with wicket 1.3.4.
>>
>> So is there a bug with the pageparameters for a stateful page? They
>> should be thrown away when pageExpired occurs (this happens
>> automatically with restartresponseexception?)?
>>
>> Here is some more of the stack:

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



Re: Login page crashes if old bookmark

2009-06-16 Thread Igor Vaynberg
IFormSubmitListener? so this happens when you submit the login page?

-igor

On Tue, Jun 16, 2009 at 9:30 AM, Martin
Makundi wrote:
>> IIRC, for this purpose I had written a separate expired page but I had
>> thrown a new restartresponseexception(LoginPage.class) which was working
>> fine with wicket 1.3.4.
>
> So is there a bug with the pageparameters for a stateful page? They
> should be thrown away when pageExpired occurs (this happens
> automatically with restartresponseexception?)?
>
> Here is some more of the stack:
>
> 2009-06-06 21:52:58,998 114074809 [btpool0-212] ERROR RequestCycle  -
> component loginForm not found on page
> com.domain.view.application.MainPage[id = 0], listener interface =
> [RequestListenerInterface name=IFormSubmitListener, method=public
> abstract void 
> org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()]
> org.apache.wicket.WicketRuntimeException: component loginForm not
> found on page com.domain.view.application.MainPage[id = 0], listener
> interface = [RequestListenerInterface name=IFormSubmitListener,
> method=public abstract void
> org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()]
>       at 
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
>       at 
> org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
>       at 
> org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
>       at org.apache.wicket.RequestCycle.step(RequestCycle.java:1300)
>       at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)
>       at org.apache.wicket.RequestCycle.request(RequestCycle.java:544)
>       at 
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
>       at 
> org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
>       at wicket.quickstart.TakpServlet.service(TakpServlet.java:48)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
>       at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
>       at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
>       at 
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
>       at 
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>       at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
>       at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
>       at 
> org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
>       at 
> org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
>       at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>       at org.mortbay.jetty.Server.handle(Server.java:285)
>       at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
>       at 
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
>       at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:627)
>       at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
>       at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
>       at 
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
>       at 
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
>
> **
> Martin
>
>>
>
> -
> 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: Login page crashes if old bookmark

2009-06-16 Thread Martin Makundi
> IIRC, for this purpose I had written a separate expired page but I had
> thrown a new restartresponseexception(LoginPage.class) which was working
> fine with wicket 1.3.4.

So is there a bug with the pageparameters for a stateful page? They
should be thrown away when pageExpired occurs (this happens
automatically with restartresponseexception?)?

Here is some more of the stack:

2009-06-06 21:52:58,998 114074809 [btpool0-212] ERROR RequestCycle  -
component loginForm not found on page
com.domain.view.application.MainPage[id = 0], listener interface =
[RequestListenerInterface name=IFormSubmitListener, method=public
abstract void 
org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()]
org.apache.wicket.WicketRuntimeException: component loginForm not
found on page com.domain.view.application.MainPage[id = 0], listener
interface = [RequestListenerInterface name=IFormSubmitListener,
method=public abstract void
org.apache.wicket.markup.html.form.IFormSubmitListener.onFormSubmitted()]
   at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveListenerInterfaceTarget(AbstractRequestCycleProcessor.java:426)
   at 
org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:471)
   at 
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
   at org.apache.wicket.RequestCycle.step(RequestCycle.java:1300)
   at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1418)
   at org.apache.wicket.RequestCycle.request(RequestCycle.java:544)
   at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456)
   at 
org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
   at wicket.quickstart.TakpServlet.service(TakpServlet.java:48)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:491)
   at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:367)
   at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:185)
   at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
   at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:689)
   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:391)
   at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:146)
   at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
   at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
   at org.mortbay.jetty.Server.handle(Server.java:285)
   at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:457)
   at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:765)
   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:627)
   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:209)
   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:357)
   at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:329)
   at 
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

**
Martin

>

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



1.4 trunk broken?

2009-06-16 Thread Stefan Lindner
Using current 1.4 trunk gives me the error

[RequestCycle] org.apache.wicket.protocol.http.PageExpiredException:
Cannot find the rendered page in session [pagemap=nu
ll,componentPath=1,versionNumber=0]
org.apache.wicket.protocol.http.request.InvalidUrlException:
org.apache.wicket.protocol.http.PageExpiredException: Cannot find the
rendered
page in session [pagemap=null,componentPath=1,versionNumber=0]
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequ
estCycleProcessor.java:250)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1301)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1419)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
at
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456
)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:
289)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilte
r.java:96)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:235)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:191)
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAs
sociationValve.java:190)
at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.j
ava:92)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(
SecurityContextEstablishmentValve.java:126)
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(S
ecurityContextEstablishmentValve.java:70)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:102)
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConn
ectionValve.java:158)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:3
30)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:82
9)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
Http11Protocol.java:598)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.apache.wicket.protocol.http.PageExpiredException: Cannot
find the rendered page in session [pagemap=null,componentPath=1,vers
ionNumber=0]
at
org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequ
estCycleProcessor.java:197)
... 25 more


On loading a page. Did I miss some big change?

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



Re: Login page crashes if old bookmark

2009-06-16 Thread Serkan Camurcuoglu
IIRC, for this purpose I had written a separate expired page but I had 
thrown a new restartresponseexception(LoginPage.class) which was working 
fine with wicket 1.3.4.



Martin Makundi wrote:

the users should get a page expired error if they come in from a
stateful bookmark and the session is expired.



Well..  in order to avoid that I have attempted to redirect them onto
the login page by setting the LoginPage to be the expired page ;)

getApplicationSettings().setPageExpiredErrorPage(LoginPage.class);

I do not want a separate "pageExpiredErrorPage" to be displayed to the
user, just go back to login with no error messages. Now I get the
component loginForm not found on page... I would assume that
LoginPage.class is a clean initiation with no pageParameters.

**
Martin

  

On Tue, Jun 16, 2009 at 12:58 AM, Martin
Makundi wrote:


Hi!

I get the following error when users come to the login page using a
stateful bookmark:
2009-06-16 10:11:52,861 43237745 [btpool0-115] ERROR RequestCycle  -
component loginForm not found on page

Any tricks how this can be avoided?

**
Martin

-
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: Login page crashes if old bookmark

2009-06-16 Thread Igor Vaynberg
show more of the stacktrace

-igor

On Tue, Jun 16, 2009 at 8:35 AM, Martin
Makundi wrote:
>> the users should get a page expired error if they come in from a
>> stateful bookmark and the session is expired.
>
> Well..  in order to avoid that I have attempted to redirect them onto
> the login page by setting the LoginPage to be the expired page ;)
>
>    getApplicationSettings().setPageExpiredErrorPage(LoginPage.class);
>
> I do not want a separate "pageExpiredErrorPage" to be displayed to the
> user, just go back to login with no error messages. Now I get the
> component loginForm not found on page... I would assume that
> LoginPage.class is a clean initiation with no pageParameters.
>
> **
> Martin
>
>>
>> On Tue, Jun 16, 2009 at 12:58 AM, Martin
>> Makundi wrote:
>>> Hi!
>>>
>>> I get the following error when users come to the login page using a
>>> stateful bookmark:
>>> 2009-06-16 10:11:52,861 43237745 [btpool0-115] ERROR RequestCycle  -
>>> component loginForm not found on page
>>>
>>> Any tricks how this can be avoided?
>>>
>>> **
>>> Martin
>>>
>>> -
>>> 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: Login page crashes if old bookmark

2009-06-16 Thread Martin Makundi
> the users should get a page expired error if they come in from a
> stateful bookmark and the session is expired.

Well..  in order to avoid that I have attempted to redirect them onto
the login page by setting the LoginPage to be the expired page ;)

getApplicationSettings().setPageExpiredErrorPage(LoginPage.class);

I do not want a separate "pageExpiredErrorPage" to be displayed to the
user, just go back to login with no error messages. Now I get the
component loginForm not found on page... I would assume that
LoginPage.class is a clean initiation with no pageParameters.

**
Martin

>
> On Tue, Jun 16, 2009 at 12:58 AM, Martin
> Makundi wrote:
>> Hi!
>>
>> I get the following error when users come to the login page using a
>> stateful bookmark:
>> 2009-06-16 10:11:52,861 43237745 [btpool0-115] ERROR RequestCycle  -
>> component loginForm not found on page
>>
>> Any tricks how this can be avoided?
>>
>> **
>> Martin
>>
>> -
>> 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: Login page crashes if old bookmark

2009-06-16 Thread Igor Vaynberg
the users should get a page expired error if they come in from a
stateful bookmark and the session is expired.

-igor

On Tue, Jun 16, 2009 at 12:58 AM, Martin
Makundi wrote:
> Hi!
>
> I get the following error when users come to the login page using a
> stateful bookmark:
> 2009-06-16 10:11:52,861 43237745 [btpool0-115] ERROR RequestCycle  -
> component loginForm not found on page
>
> Any tricks how this can be avoided?
>
> **
> Martin
>
> -
> 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: Mix generic HTML for Wicket

2009-06-16 Thread Igor Vaynberg
jeremy and i have both given you the url, if that is too hard here is
the actual command line

svn co 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/attic/wicketstuff-crud

-igor

On Tue, Jun 16, 2009 at 6:51 AM, David
Brown wrote:
> Hello Igor, thanks for the reply. If I browse the repo at: 
> http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff only shows ghosted 
> folders for: attic, sandbox, etc. The sourcecode is not available for check 
> out. Please advise, David.
>
>
>
> - Original Message -
> From: "Igor Vaynberg" 
> To: users@wicket.apache.org
> Sent: Tuesday, June 9, 2009 9:59:25 AM GMT -06:00 US/Canada Central
> Subject: Re: Mix generic HTML for Wicket
>
> svn co 
> http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/attic/wicketstuff-crud/
>
> -igor
>
> On Tue, Jun 9, 2009 at 6:36 AM, David
> Brown wrote:
>> Hello Igor, I have an account on wicketstuff and I see the list of 
>> wicketstuff projects that have been so-called: move to attic or deleted. I 
>> don't see how to acquire wicketstuff-crud if it has not been deleted. I have 
>> a wicket-crud.war. I could de-compile the .war. If decompilation of the .war 
>> would give me the same as is found in the wicketstuff attic please advise, 
>> David.
>>
>>
>>
>>
>> - Original Message -
>> From: "Igor Vaynberg" 
>> To: users@wicket.apache.org
>> Sent: Saturday, June 6, 2009 12:14:41 PM GMT -06:00 US/Canada Central
>> Subject: Re: Mix generic HTML for Wicket
>>
>> there is wicketstuff-crud project somewhere in wicketstuff
>>
>> -igor
>>
>> On Sat, Jun 6, 2009 at 1:55 AM, Johan Compagner wrote:
>>> So you just wat generic components to have a CRUD pages on diffenent
>>> tables? There are projects/examples for this somewhere, you could
>>> build it your self by using repeaters and panels
>>>
>>> On 02/06/2009, sjtirtha  wrote:
 Hi,

 I'm a newbie with wicket.
 I see that all sample always require .html and .java on the same folder 
 with
 the same name.
 When I look into the .html files. They always contain simple html.
 Is there any possibility that I have a generic html and a generic wicket
 component that can be used shows DB tables.

 Regards,
 Steve

>>>
>>> -
>>> 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
>
>

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



Re: Wicket-like JavaScript Components

2009-06-16 Thread nino martinez wael
You can also have a look at wicketstuff and see what integrations
already exists :)

2009/6/15 Dane Laverty :
> I'm working on a small project where I'm limited to using only JavaScript. I
> love the Wicket programming model, especially reusable components. Is anyone
> aware of a JavaScript framework or JavaScript techniques that would allow me
> to approximate Wicket components?
>

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



Re: Mix generic HTML for Wicket

2009-06-16 Thread David Brown
Hello Igor, thanks for the reply. If I browse the repo at: 
http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff only shows ghosted folders 
for: attic, sandbox, etc. The sourcecode is not available for check out. Please 
advise, David.



- Original Message -
From: "Igor Vaynberg" 
To: users@wicket.apache.org
Sent: Tuesday, June 9, 2009 9:59:25 AM GMT -06:00 US/Canada Central
Subject: Re: Mix generic HTML for Wicket

svn co 
http://wicket-stuff.svn.sf.net/svnroot/wicket-stuff/attic/wicketstuff-crud/

-igor

On Tue, Jun 9, 2009 at 6:36 AM, David
Brown wrote:
> Hello Igor, I have an account on wicketstuff and I see the list of 
> wicketstuff projects that have been so-called: move to attic or deleted. I 
> don't see how to acquire wicketstuff-crud if it has not been deleted. I have 
> a wicket-crud.war. I could de-compile the .war. If decompilation of the .war 
> would give me the same as is found in the wicketstuff attic please advise, 
> David.
>
>
>
>
> - Original Message -
> From: "Igor Vaynberg" 
> To: users@wicket.apache.org
> Sent: Saturday, June 6, 2009 12:14:41 PM GMT -06:00 US/Canada Central
> Subject: Re: Mix generic HTML for Wicket
>
> there is wicketstuff-crud project somewhere in wicketstuff
>
> -igor
>
> On Sat, Jun 6, 2009 at 1:55 AM, Johan Compagner wrote:
>> So you just wat generic components to have a CRUD pages on diffenent
>> tables? There are projects/examples for this somewhere, you could
>> build it your self by using repeaters and panels
>>
>> On 02/06/2009, sjtirtha  wrote:
>>> Hi,
>>>
>>> I'm a newbie with wicket.
>>> I see that all sample always require .html and .java on the same folder with
>>> the same name.
>>> When I look into the .html files. They always contain simple html.
>>> Is there any possibility that I have a generic html and a generic wicket
>>> component that can be used shows DB tables.
>>>
>>> Regards,
>>> Steve
>>>
>>
>> -
>> 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: Send Page Parameter to Login Page after Calling Logoff Method

2009-06-16 Thread Ames, Tim
I recently had an issue with the LoginPage also.  This was using the 
AuthenticatedWebSession and AuthenticatedWebApplication classes.  Not sure if 
this holds true with Wasp.

I wanted to access the page parameters in the LogIn class itself but could not. 
 I had to save the page parameters in the web session that was just created via 
the Request object and pull them in from the session in the LogIn class.

I assume in your log out method that the session is being invalidated. When the 
new log in page is displayed, a new session may be there.  Check during the 
constructor phase of your web session and see if the Request object has the 
page parameters you desire. Not sure if they will be, but worth a shot.

-Original Message-
From: glory [mailto:glo_sari...@yahoo.com]
Sent: Monday, June 15, 2009 10:47 PM
To: users@wicket.apache.org
Subject: Send Page Parameter to Login Page after Calling Logoff Method

Hi, wicket users!

Is there any way to send a page parameter to the login page after calling 
logoff() method in a logout page?


((WaspSession)Session.get()).logoff(new LoginContext());

PageParameters parameters = new PageParameters();
parameters.put("myParameter", myParameter);
setResponsePage(LoginPage.class, parameters);

I've tried it so many times, I got no idea how to get the parameter.

Does anyone have idea?

 Thanks in Advance,
Glo


_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

EMAIL CONFIDENTIALITY NOTICE 

This Email message, and any attachments, may contain confidential 
patient health information that is legally protected. This information 
is intended only for the use of the individual or entity named above. 
The authorized recipient of this information is prohibited from disclosing 
this information to any other party unless required to do so by law 
or regulation and is required to destroy the information after its stated 
need has been fulfilled. If you are not the intended recipient, you are 
hereby notified that any disclosure, copying, distribution, or action 
taken in reliance on the contents of this message is strictly prohibited. 

If you have received this information in error, please notify 
the sender immediately by replying to this message and delete the 
message from your system.


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



Re: Does @Transactional work on a Wicket Component's methods?

2009-06-16 Thread Peter Ertl

consider using salve :-)

http://code.google.com/p/salve/
http://code.google.com/p/salve/wiki/WhySalve
http://code.google.com/p/salve/wiki/SpringTransactionManager
http://code.google.com/p/salve/wiki/AnnotatedTransactionManager


Am 16.06.2009 um 10:30 schrieb Martijn Dashorst:


You'll need the AspectJ AOP support for this. Wicket components aren't
Spring beans.

Martijn

On Tue, Jun 16, 2009 at 10:09 AM, Ben  
Hutchison wrote:

Hi all,

We are using the Spring @Transactional annotation on a method of a  
Wicket

Panel, and it does not appear to be doing anything. From some reading
around, I had kind of assumed that @Transactional would work in  
Wicket

components, but Im now wondering whether it does.

(We've gone through the usual suspects in the app context and  
everything

seems correct there.)

Can anyone confirm under what circumstances/pre-conditions  
@Transactional

definitely does/not work?

If so, how does the Spring annotation scanner become aware of Wicket
components? And how could it substitute a CGlib-modified dynamic  
subclass

with AOP hooks installed, when the Panel is instantiated with a 'new'
operator?

Regards
Ben

--



*Ben Hutchison
Senior Developer
* Level 2 476 St Kilda Road Melbourne VIC 3004
T 613 8807 5252 | F 613 8807 5203 | M 0423 879 534 | www.ibsglobalweb.com




-
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.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

-
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: Does @Transactional work on a Wicket Component's methods?

2009-06-16 Thread Martijn Dashorst
You'll need the AspectJ AOP support for this. Wicket components aren't
Spring beans.

Martijn

On Tue, Jun 16, 2009 at 10:09 AM, Ben Hutchison wrote:
> Hi all,
>
> We are using the Spring @Transactional annotation on a method of a Wicket
> Panel, and it does not appear to be doing anything. From some reading
> around, I had kind of assumed that @Transactional would work in Wicket
> components, but Im now wondering whether it does.
>
> (We've gone through the usual suspects in the app context and everything
> seems correct there.)
>
> Can anyone confirm under what circumstances/pre-conditions @Transactional
> definitely does/not work?
>
> If so, how does the Spring annotation scanner become aware of Wicket
> components? And how could it substitute a CGlib-modified dynamic subclass
> with AOP hooks installed, when the Panel is instantiated with a 'new'
> operator?
>
> Regards
> Ben
>
> --
>
>
>
> *Ben Hutchison
> Senior Developer
> * Level 2 476 St Kilda Road Melbourne VIC 3004
> T 613 8807 5252 | F 613 8807 5203 | M 0423 879 534 | www.ibsglobalweb.com
> 
>
>
>
> -
> 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.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Send Page Parameter to Login Page after Calling Logoff Method

2009-06-16 Thread glory
Hi, wicket users!

Is there any way to send a page parameter to the login page after calling 
logoff() method in a logout page?


((WaspSession)Session.get()).logoff(new LoginContext());

PageParameters parameters = new PageParameters();
parameters.put("myParameter", myParameter);
setResponsePage(LoginPage.class, parameters);

I've tried it so many times, I got no idea how to get the parameter.

Does anyone have idea?

 Thanks in Advance,
Glo


  

Does @Transactional work on a Wicket Component's methods?

2009-06-16 Thread Ben Hutchison

Hi all,

We are using the Spring @Transactional annotation on a method of a 
Wicket Panel, and it does not appear to be doing anything. From some 
reading around, I had kind of assumed that @Transactional would work in 
Wicket components, but Im now wondering whether it does.


(We've gone through the usual suspects in the app context and everything 
seems correct there.)


Can anyone confirm under what circumstances/pre-conditions 
@Transactional definitely does/not work?


If so, how does the Spring annotation scanner become aware of Wicket 
components? And how could it substitute a CGlib-modified dynamic 
subclass with AOP hooks installed, when the Panel is instantiated with a 
'new' operator?


Regards
Ben

--



*Ben Hutchison
Senior Developer
* Level 2 476 St Kilda Road Melbourne VIC 3004
T 613 8807 5252 | F 613 8807 5203 | M 0423 879 534 | 
www.ibsglobalweb.com 




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



Login page crashes if old bookmark

2009-06-16 Thread Martin Makundi
Hi!

I get the following error when users come to the login page using a
stateful bookmark:
2009-06-16 10:11:52,861 43237745 [btpool0-115] ERROR RequestCycle  -
component loginForm not found on page

Any tricks how this can be avoided?

**
Martin

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



Re: Wicket-like JavaScript Components

2009-06-16 Thread Paolo Di Tommaso
Extjs is a good choice, we have integrated it successfully with Wicket.

Check it out at http://code.google.com/p/wicket-ext/

Paolo


On Mon, Jun 15, 2009 at 6:31 PM, Dane Laverty  wrote:

> I'm working on a small project where I'm limited to using only JavaScript.
> I
> love the Wicket programming model, especially reusable components. Is
> anyone
> aware of a JavaScript framework or JavaScript techniques that would allow
> me
> to approximate Wicket components?
>