Re: [ANNOUNCE] Apache Wicket 1.3 released

2008-01-04 Thread Frank Bille
We haven't renamed trunk to 1.3.1, so it is still labelled 1.3.0-SNAPSHOT in
the maven repository.

Frank


On Jan 4, 2008 8:46 AM, Timo Rantalaiho [EMAIL PROTECTED] wrote:

 Hello,

 Are 1.3.1-SNAPSHOT builds available somewhere? I could only
 find the old 1.3.0-SNAPSHOTs here:

  http://wicketstuff.org/maven/repository/org/apache/wicket/

 Congratulations on the release!

 Best wishes,
 Timo

 --
 Timo Rantalaiho
 Reaktor Innovations OyURL: http://www.ri.fi/ 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: external login pages

2008-01-04 Thread Erik van Oosten
Hi Alex,

Normally you can throw a special exception, the
RestartResponseAtInterceptPageException. Unfortunately I do not think
this will work when the intercept page is external to Wicket.

So the only thing you can do, is put the original URL in a parameter to
the perl page, and let the perl page use that as second redirect. Makes
sense?

Regards,
Erik.



Alex Jacoby wrote:
 I am building a new wicket app that has to use an existing login
 page.  The legacy login page is written in perl and sets a login
 cookie before redirecting the user back to a specified URL.

 I'm hoping to keep things simple and use role-based authorization for
 pages.  In my authenticated app the login page is set to a
 RedirectPage which redirects to the external login page.  My problem
 is that I can't figure out how to grab the original URL that sent me
 to the login page, so that I can pass that URL to the external login
 page, and thereby be sent to my original destination after login. 
 (Currently I just send them back to the home page, which is annoying.)

 Has anyone tried this before?  I've got a feeling there's a better way
 I could be doing this -- my current version using AuthenticatedWebApp
 is very kludgy.

 Thanks for any ideas,
 Alex

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wickettester and session?

2008-01-04 Thread Nino Saturnino Martinez Vazquez Wael

Hi David

Thanks for the response. I cant construct the application at that point 
since I need to inject a spring context which might be different from 
test to test. Sometimes you'll only want to run pure ui tests and mock 
the database provider. other times you'll want to run integration tests. 
Switching of context then becomes really handy.


I am doing it like this :

   AnnotApplicationContextMock appctx = new 
AnnotApplicationContextMock();

   appctx.putBean(dBDao, dbProvider);

   wicketTester = new WicketTester(ZeuzGroupApplication.class);
  
   WebApplication app = wicketTester.getApplication();


   app.addComponentInstantiationListener(new 
SpringComponentInjector(app,

   appctx));


But as you mentioned it is a application and not a start page. I've also 
provided a simple quickstart that shows this behavior : 
https://issues.apache.org/jira/browse/WICKET-1256


However that does not show the part where I inject via spring as it's 
meant to be simple..


If you want to see a full fledged example look here at this svn : 
http://svn2.assembla.com/svn/wicketSpringJPAHibernateTut


However I havent written a test that displays the session problem for 
this project though.


regards Nino


David Shepherdson wrote:

On 21 Dec 2007, at 6.03 pm, Nino Saturnino Martinez Vazquez Wael wrote:

There seems to be a problem with wicket tester and the session 
created (I use my own custom session). I create the wicket tester 
like this:


...


  wicketTester = new WicketTester(ZeuzGroupApplication.class);


...

The application works fine without testing. But I get a class cast 
exception when testing, since the session arent my custom one,


We also have our own custom session class, and our version of 
newSession() looks practically identical to yours.


However, when we construct the WicketTester, we construct our 
application too, rather than passing in a class name -- something like:


wicketTester = new WicketTester(new ZeuzGroupApplication());

...and we're not seeing any ClassCastExceptions -- the session being 
constructed is definitely our custom class.


From the look of the JavaDoc/code for WIcketTester, the constructor 
that takes in a Class is expecting that to be the class of the 
application's home page, *not* the application itself; it constructs a 
WebApplication to wrap the home page in and uses that. Is it possible, 
therefore, that you're mistakenly calling the wrong constructor?


Alternatively, if ZeuzGroupApplication really is a page class (and not 
an application), I would say that your best bet would be to construct 
the WicketTester with an application instance, as in  my example 
above, and then use the tester's startPage(Class) method to test your 
page.


David Shepherdson

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: external login pages

2008-01-04 Thread Jeremy Thomerson
It's really late here and I'm not at a computer, so this is somewhat 
pseudo-code, but try this:

// place where you caught that they weren't 
// authenticated (before page construction)
String url = 
getRequest().getServletResponse().getUrlOrSomethingICantRememberRightNow();
throw new RestartResponseAtInterceptPageException(new 
RedirectPage(/perl-stuff/signin.pl?dest= + url));

Of course, you could encrypt the destination or something if it was critical, 
but typically that shouldn't be a problem.

Hope this helps.

Jeremy Thomerson
-- sent from a wireless device

-Original Message-
From: Erik van Oosten [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: 1/4/08 2:23 AM
Subject: Re: external login pages

Hi Alex,

Normally you can throw a special exception, the
RestartResponseAtInterceptPageException. Unfortunately I do not think
this will work when the intercept page is external to Wicket.

So the only thing you can do, is put the original URL in a parameter to
the perl page, and let the perl page use that as second redirect. Makes
sense?

Regards,
Erik.



Alex Jacoby wrote:
 I am building a new wicket app that has to use an existing login
 page.  The legacy login page is written in perl and sets a login
 cookie before redirecting the user back to a specified URL.

 I'm hoping to keep things simple and use role-based authorization for
 pages.  In my authenticated app the login page is set to a
 RedirectPage which redirects to the external login page.  My problem
 is that I can't figure out how to grab the original URL that sent me
 to the login page, so that I can pass that URL to the external login
 page, and thereby be sent to my original destination after login. 
 (Currently I just send them back to the home page, which is annoying.)

 Has anyone tried this before?  I've got a feeling there's a better way
 I could be doing this -- my current version using AuthenticatedWebApp
 is very kludgy.

 Thanks for any ideas,
 Alex

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANNOUNCE] Apache Wicket 1.3 released

2008-01-04 Thread Martijn Dashorst
That is why I don't like the 1.3.0 number. 1.3-SNAPSHOT is definetly
preferable to remove this confusion.

Martijn

On Jan 4, 2008 9:06 AM, Frank Bille [EMAIL PROTECTED] wrote:
 We haven't renamed trunk to 1.3.1, so it is still labelled 1.3.0-SNAPSHOT in
 the maven repository.

 Frank



 On Jan 4, 2008 8:46 AM, Timo Rantalaiho [EMAIL PROTECTED] wrote:

  Hello,
 
  Are 1.3.1-SNAPSHOT builds available somewhere? I could only
  find the old 1.3.0-SNAPSHOTs here:
 
   http://wicketstuff.org/maven/repository/org/apache/wicket/
 
  Congratulations on the release!
 
  Best wishes,
  Timo
 
  --
  Timo Rantalaiho
  Reaktor Innovations OyURL: http://www.ri.fi/ 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is it possible to use wicket without having any html page?

2008-01-04 Thread legolas

A web page, but it is completely dynamic and all components will be created
based on user request content.

Thanks

igor.vaynberg wrote:
 
 what would you like it to display? a web page or contents of some
 file/dynamic content?
 
 -igor
 
 
 On Jan 3, 2008 3:01 PM, legolas [EMAIL PROTECTED] wrote:

 Hi
 Is it possible to use wicket without having any html page?
 Just writing java code and pointing the browser to some url and it goes
 forward?

 Thanks
 --
 View this message in context:
 http://www.nabble.com/Is-it-possible-to-use-wicket-without-having-any-html-page--tp14607438p14607438.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Is-it-possible-to-use-wicket-without-having-any-html-page--tp14607438p14612909.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Something about Design

2008-01-04 Thread Ahmed Al-Obaidy
First of all, I'm very happy to find this framework... guys you are doing a 
great job...

Guys I'm very new to Wicket, so correct me if I'm wrong:

I think we can make use of the approach used by Drupal... I've been using it 
for while now... and believe me... it worth to watch... IMHO, they have two 
problems, GPL and PHP :(

have a look on their APIs (http://api.drupal.org/api/5)... very clean ... very 
simple... and yet very powerful... 

On Java world we can learn from Eclipse guys... if anyone of you have written 
an eclipse based application, he should notice how clean and powerful it is.

If we managed to build such a architecture... something like BodyPart, BoxPart, 
MenuBar something like Web Widget Tools (WWT) and ContentProvider... I 
think that would be revolutionary!


Cheers,
   
-
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Re: Is it possible to use wicket without having any html page?

2008-01-04 Thread Nino Saturnino Martinez Vazquez Wael

Hi legolas

im not sure how familiar you are with wicket. But i'd go for having the 
html and just using the approach specified here:


http://www.nabble.com/Ways-of-making-components-in-a-page-optional--tp14399390p14399390.html

It's possible that I've misunderstood you, do you want to redirect to 
some old legacy jsp page or?


legolas wrote:

A web page, but it is completely dynamic and all components will be created
based on user request content.

Thanks

igor.vaynberg wrote:
  

what would you like it to display? a web page or contents of some
file/dynamic content?

-igor


On Jan 3, 2008 3:01 PM, legolas [EMAIL PROTECTED] wrote:


Hi
Is it possible to use wicket without having any html page?
Just writing java code and pointing the browser to some url and it goes
forward?

Thanks
--
View this message in context:
http://www.nabble.com/Is-it-possible-to-use-wicket-without-having-any-html-page--tp14607438p14607438.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  


--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is it possible to use wicket without having any html page?

2008-01-04 Thread Johan Compagner
Thats only possible  if you use panels for everything. Or generate als
ther html dynamically based on your data

On 1/4/08, legolas [EMAIL PROTECTED] wrote:

 A web page, but it is completely dynamic and all components will be created
 based on user request content.

 Thanks

 igor.vaynberg wrote:
 
  what would you like it to display? a web page or contents of some
  file/dynamic content?
 
  -igor
 
 
  On Jan 3, 2008 3:01 PM, legolas [EMAIL PROTECTED] wrote:
 
  Hi
  Is it possible to use wicket without having any html page?
  Just writing java code and pointing the browser to some url and it goes
  forward?
 
  Thanks
  --
  View this message in context:
 
 http://www.nabble.com/Is-it-possible-to-use-wicket-without-having-any-html-page--tp14607438p14607438.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Is-it-possible-to-use-wicket-without-having-any-html-page--tp14607438p14612909.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[Wicket 1.2.6] How to get Wizard's form from inside a WizardStep?

2008-01-04 Thread Fabio Fioretti
First of all, many compliments for the great Wicket 1.3 release: we're
looking forward to port our application to the new cool version!

How can I get the Wizard's form from inside a WizardStep? I need it to
trigger an AjaxSubmitLink which should update a part of my model while
remaining inside that step. What leaves me clueless is the fact that
WizardStep instances are added to the WizardModel instead of the
Wizard, so doing something like this from inside the WizardStep:

Form form = (Form)WizardStep.this.findParent(Form.class);

seems to return null; moreover, this makes me wonder how the same
instruction inside WizardStep.AddFormValidatorAction.execute() can
succeed.

I'm sure I'm missing something really stupid. Please forgive me. :-)


Thanks a lot,

Fabio Fioretti - WindoM

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is it possible to use wicket without having any html page?

2008-01-04 Thread Nino Saturnino Martinez Vazquez Wael
But for most common use cases a page will have a .html . You could use 
several different approaches to archive something like you talk about. 
But when it comes down to it you will at least have:


Using markup inheritance:
one super class with a corresponding html and a sub class with 
corrosponding html, extending the super class to the special need. And 
maybe a mounted page that redirects to the wanted sub based on parameters.


Using panels:
one page with corresponding html, consistent of panels where only the 
appropriate are visible for the specific request.



I do not know echo2.

Are you wanting for wicket to produce all html? This is not possible afaik.

legolas wrote:

I am simple looking to know whether we can get rid of any markup files and
just use java files to define and design our pages, something like echo2?

Thanks.



Nino.Martinez wrote:
  

Hi legolas

im not sure how familiar you are with wicket. But i'd go for having the 
html and just using the approach specified here:


http://www.nabble.com/Ways-of-making-components-in-a-page-optional--tp14399390p14399390.html

It's possible that I've misunderstood you, do you want to redirect to 
some old legacy jsp page or?


legolas wrote:


A web page, but it is completely dynamic and all components will be
created
based on user request content.

Thanks

igor.vaynberg wrote:
  
  

what would you like it to display? a web page or contents of some
file/dynamic content?

-igor


On Jan 3, 2008 3:01 PM, legolas [EMAIL PROTECTED] wrote:



Hi
Is it possible to use wicket without having any html page?
Just writing java code and pointing the browser to some url and it goes
forward?

Thanks
--
View this message in context:
http://www.nabble.com/Is-it-possible-to-use-wicket-without-having-any-html-page--tp14607438p14607438.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  
  

--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  


--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wickettester and session?

2008-01-04 Thread Nino Saturnino Martinez Vazquez Wael
Eeek youre right. Why did I not see this earlier.. I'll fiddle a bit 
with this and see if I can make it work without the wrapper...


David Shepherdson wrote:

Hello Nino,

On 4 Jan 2008, at 8.14 am, Nino Saturnino Martinez Vazquez Wael wrote:

Thanks for the response. I cant construct the application at that 
point since I need to inject a spring context which might be 
different from test to test. Sometimes you'll only want to run pure 
ui tests and mock the database provider. other times you'll want to 
run integration tests. Switching of context then becomes really handy.


...

But as you mentioned it is a application and not a start page. I've 
also provided a simple quickstart that shows this behavior : 
https://issues.apache.org/jira/browse/WICKET-1256


But I think the problem is still that the constructor of WicketTester 
that takes in a class *isn't* taking in a class for the application, 
but for the application's home page. Looking at the code, it creates a 
new subclass of WebApplication that overrides the getHomePage() method 
to return the class you passed in. It doesn't do anything else with 
the class, so I can't see that passing in your application's class is 
going to be helpful unless you want the getHomePage() method to return 
your application's class for some reason.


Effectively, the code looks like this (simplified):

public WIcketTester(final Class homePage)
{
this(new WebApplication()
{
public Class getHomePage()
{
return homePage;
}
});
}

...so there's no way I can see that the WebApplication it returns 
could know anything about your application's custom session class (or 
any other aspect of your application).


If you can't construct the application then, and you can't delay the 
construction of the WicketTester until later (when you *are* able to 
construct the application) one approach would be to make a wrapper 
application class you could construct and pass into the WicketTester, 
which would have a method to construct an instance of your real 
application later on, when the necessary context is available -- in 
other words, something like:


WrapperApplication wrapperApp = new WrapperApplication();
wicketTester = new WicketTester(wrapperApp);

// Later on, when the context is available.
wrapperApp.setRealApp(new ZeuzGroupApplication(...));

Writing the wrapper itself might be a bit messy, though, because 
presumably you'd need to trampoline everything in WebApplication (and 
Application) that might be called on your application, so I would 
suggest deferring the construction of the WicketTester until later on 
if at all possible.


Hope this helps,

David

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Jetty, images and 404 http

2008-01-04 Thread Michael Sparer

that's not a permission problem, jetty just can't find the stuff, please
provide some code that generates the 404 error



Fernando Wermus-2 wrote:
 
 Jetty is not allowing to download the resources of my pages. It dumps this
 into the log,
 
 42150 [btpool0-1 - /misPartidos/resources/bg-header.jpg] DEBUG
 org.mortbay.log  - RESPONSE /misPartidos/resources/bg-header.jpg  404
 42150 [btpool0-1 - /misPartidos/resources/bg-header.jpg] DEBUG
 org.mortbay.log  - RESPONSE /misPartidos/resources/bg-header.jpg  404
 42150 [btpool0-1 - /misPartidos/resources/bg-header.jpg] DEBUG
 org.mortbay.log  - RESPONSE /misPartidos/resources/bg-header.jpg  404
 
 I was trying to figure it out if it is a linux permission problem or a
 problem from jetty itself.
 
 Thanks a lot!
 
 -- 
 Fernando Wermus.
 
 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Jetty%2C-images-and-404-http-tp14605929p14614654.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wickettester and session?

2008-01-04 Thread David Shepherdson

Hello Nino,

On 4 Jan 2008, at 8.14 am, Nino Saturnino Martinez Vazquez Wael wrote:

Thanks for the response. I cant construct the application at that  
point since I need to inject a spring context which might be  
different from test to test. Sometimes you'll only want to run pure  
ui tests and mock the database provider. other times you'll want to  
run integration tests. Switching of context then becomes really handy.


...

But as you mentioned it is a application and not a start page. I've  
also provided a simple quickstart that shows this behavior : https://issues.apache.org/jira/browse/WICKET-1256


But I think the problem is still that the constructor of WicketTester  
that takes in a class *isn't* taking in a class for the application,  
but for the application's home page. Looking at the code, it creates a  
new subclass of WebApplication that overrides the getHomePage() method  
to return the class you passed in. It doesn't do anything else with  
the class, so I can't see that passing in your application's class is  
going to be helpful unless you want the getHomePage() method to return  
your application's class for some reason.


Effectively, the code looks like this (simplified):

public WIcketTester(final Class homePage)
{
this(new WebApplication()
{
public Class getHomePage()
{
return homePage;
}
});
}

...so there's no way I can see that the WebApplication it returns  
could know anything about your application's custom session class (or  
any other aspect of your application).


If you can't construct the application then, and you can't delay the  
construction of the WicketTester until later (when you *are* able to  
construct the application) one approach would be to make a wrapper  
application class you could construct and pass into the WicketTester,  
which would have a method to construct an instance of your real  
application later on, when the necessary context is available -- in  
other words, something like:


WrapperApplication wrapperApp = new WrapperApplication();
wicketTester = new WicketTester(wrapperApp);

// Later on, when the context is available.
wrapperApp.setRealApp(new ZeuzGroupApplication(...));

Writing the wrapper itself might be a bit messy, though, because  
presumably you'd need to trampoline everything in WebApplication (and  
Application) that might be called on your application, so I would  
suggest deferring the construction of the WicketTester until later on  
if at all possible.


Hope this helps,

David

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket 1.3 portlets in Liferay

2008-01-04 Thread Martijn Dashorst
http://www.nabble.com/forum/Search.jtp?forum=13974local=yquery=liferay

On Jan 4, 2008 2:41 PM, racso [EMAIL PROTECTED] wrote:
  How easy is it to use Wicket 1.3 application as a portlet in Liferay Portal
 4.xx? As anyone tried it yet?




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [wicket-security] LDAP integration?

2008-01-04 Thread Maurice Marrink
Yes and not exactly.

wicket-security is build with plugability in mind, meaning if it does
not yet exist you can build it yourself quite easily.
Regarding LDAP, i myself have never worked with it but there are a
couple of options you can try
-use swarm and map ldap permissions to swarm principals
-use swarm with acegi and let acegi handle the ldap part, you still
need to map acegi permissions to swarm principals though but it saves
you from having to do all the ldap connection stuff yourself
-use wasp and build your own ldap implementation, more work but also
more control

As for the ldap example part, i am afraid you are somewhat on your own.
There is however an example showing how to integrate swarm with acegi
http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
and there is an other example showing wicket-auth-roles acegi and ldap
http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
So if you rip the ldap config from the last example and use it in the
first example instead of the TestingAuthenticationProvider you should
be ready to go
The example also has some suggestion on how you could do your own ldap
permission mapping if you choose to go that way.

If you decide to go all out and build directly on wasp you should take
a look at swarm itself a a reference, just ignore all the stuff about
permissions, principals, subjects and stuff.

Maurice

On Jan 4, 2008 2:15 PM, William Hoover [EMAIL PROTECTED] wrote:
 Can wicket-security be used with LDAP? If so, are there any examples 
 available demonstrating its use?


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket 1.3 portlets in Liferay

2008-01-04 Thread racso
 How easy is it to use Wicket 1.3 application as a portlet in Liferay Portal
4.xx? As anyone tried it yet?


Re: [ANNOUNCE] Apache Wicket 1.3 released

2008-01-04 Thread Gerolf Seitz
and another one:

http://www.jaxmag.com/itr/news/psecom,id,39414,nodeid,146.html

  Gerolf

On Jan 4, 2008 1:58 PM, Martijn Dashorst [EMAIL PROTECTED] wrote:

 Another couple of links with some publicity for Wicket:
  - http://www.javalobby.org/java/forums/t105230.html
  - http://www.infoworld.com/article/08/01/03/apache-wicket_1.html
  - http://www.theserverside.com/news/thread.tss?thread_id=47979

 Martijn

 On Jan 3, 2008 10:37 PM, Martijn Dashorst [EMAIL PROTECTED]
 wrote:
  Help promote wicket: digg our release:
 
  http://digg.com/programming/Apache_Wicket_1_3_released
 
  Martijn
 
 
  On Jan 3, 2008 8:58 AM, Jonathan Locke [EMAIL PROTECTED] wrote:
  
  
   yeah, baby, yeah!!!  way to go everyone!
  
  
  
   Martijn Dashorst-4 wrote:
   
Starting the new year with a bang the Wicket Team has released
 Apache
Wicket 1.3. With this release comes a lot of great successes, but
 most
of all the team wanted to express their wishes to everyone for a
 happy
new year.
   
You can download Apache Wicket 1.3 here:
   
http://wicket.apache.org/getting-wicket.html
   
Apache Wicket is one of the fastest growing Java open source
 component
based web frameworks. With a focus on producing valid html and a
logical separation between design and code.  Within minutes you can
start to enjoy throwing out tag soup, complex components and high
maintenance overhead for a simple POJO + html data model.
   
See the Apache Wicket website for more information:
   
http://wicket.apache.org
   
Take a look at some of the following highlights or skip to the
 bottom
and get started now.
   
 * last JDK-1.4 release (next release will be Java 5 based)
 * first Apache release: renamed packages to org.apache.wicket
 * simplified several core APIs
 * now works with zero-config behind a proxy server using relative
 URLs
 * added Google Guice support
 * use your Wicket pages directly in a portal without changing a
 line
of code (JSR-168/JSR-286 support)
 * switched logging API from commons-logging to slf4j
 * integrate velocity templates as panels in your pages
 * YUI-calendar and Joda time based date picker (wicket-datetime)
 * contribute new javascript dependencies to the page header using
 an
Ajax requeset
 * improved, more robust header contributions
 * scale to extremely large numbers of users with stateless pages
 and
components
 * improved AjaxTree/AjaxTreeTable
 * hybrid URL encoding to make search engines and your users happy
 * create form panels and use them anywhere without worrying about
 the
nesting of form tags
 * minimized session use by storing component hierarchy in file
 system
(DiskPageStore)
   
Get started today by downloading Wicket using this link:
   
http://www.apache.org/dyn/closer.cgi/wicket/1.3.0
   
The distribution contains all the Wicket libraries, and all the
 source
code including the examples project. In the root of the download you
will find a README document with full instructions.
   
Migrate your Wicket 1.2 application to Wicket 1.3 using our
 migration
guide:
   
http://cwiki.apache.org/WICKET/migrate-12.html
   
Best wishes from the Wicket Team and a prosperous 2008!
   
 - The Wicket Team
   
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
  
   --
   View this message in context:
 http://www.nabble.com/-ANNOUNCE--Apache-Wicket-1.3-released-tp14585070p14593193.html
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   -
  
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 
 
  --
  Buy Wicket in Action: http://manning.com/dashorst
  Apache Wicket 1.3.0 is released
  Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0
 



 --
 Buy Wicket in Action: http://manning.com/dashorst
 Apache Wicket 1.3.0 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Wickettester and session?

2008-01-04 Thread Nino Saturnino Martinez Vazquez Wael
Hmm had do make a method for switching out the context. But thats okay a 
minor thing. But I am still getting the class cast exception:


I think we should proceed with the example from the jira issue, ive 
changed it to   :


tester = new WicketTester(new WicketApplication());

But it still gives the class cast exception.

This is running 1.3.0 final.

I'll update the jira in a sec..


https://issues.apache.org/jira/browse/WICKET-1256



Nino Saturnino Martinez Vazquez Wael wrote:
Eeek youre right. Why did I not see this earlier.. I'll fiddle a bit 
with this and see if I can make it work without the wrapper...


David Shepherdson wrote:

Hello Nino,

On 4 Jan 2008, at 8.14 am, Nino Saturnino Martinez Vazquez Wael wrote:

Thanks for the response. I cant construct the application at that 
point since I need to inject a spring context which might be 
different from test to test. Sometimes you'll only want to run pure 
ui tests and mock the database provider. other times you'll want to 
run integration tests. Switching of context then becomes really handy.


...

But as you mentioned it is a application and not a start page. I've 
also provided a simple quickstart that shows this behavior : 
https://issues.apache.org/jira/browse/WICKET-1256


But I think the problem is still that the constructor of WicketTester 
that takes in a class *isn't* taking in a class for the application, 
but for the application's home page. Looking at the code, it creates 
a new subclass of WebApplication that overrides the getHomePage() 
method to return the class you passed in. It doesn't do anything else 
with the class, so I can't see that passing in your application's 
class is going to be helpful unless you want the getHomePage() method 
to return your application's class for some reason.


Effectively, the code looks like this (simplified):

public WIcketTester(final Class homePage)
{
this(new WebApplication()
{
public Class getHomePage()
{
return homePage;
}
});
}

...so there's no way I can see that the WebApplication it returns 
could know anything about your application's custom session class (or 
any other aspect of your application).


If you can't construct the application then, and you can't delay the 
construction of the WicketTester until later (when you *are* able to 
construct the application) one approach would be to make a wrapper 
application class you could construct and pass into the WicketTester, 
which would have a method to construct an instance of your real 
application later on, when the necessary context is available -- in 
other words, something like:


WrapperApplication wrapperApp = new WrapperApplication();
wicketTester = new WicketTester(wrapperApp);

// Later on, when the context is available.
wrapperApp.setRealApp(new ZeuzGroupApplication(...));

Writing the wrapper itself might be a bit messy, though, because 
presumably you'd need to trampoline everything in WebApplication (and 
Application) that might be called on your application, so I would 
suggest deferring the construction of the WicketTester until later on 
if at all possible.


Hope this helps,

David

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is it possible to use wicket without having any html page?

2008-01-04 Thread Martijn Dashorst
then just use Echo2. Why make Wicket into Echo2 when you can use that?

Wicket has a particular niche and Echo2 has its niche. There is no
sense into turning one into the other.

Martijn

On Jan 4, 2008 12:32 PM, legolas [EMAIL PROTECTED] wrote:

 I am simple looking to know whether we can get rid of any markup files and
 just use java files to define and design our pages, something like echo2?

 Thanks.




 Nino.Martinez wrote:
 
  Hi legolas
 
  im not sure how familiar you are with wicket. But i'd go for having the
  html and just using the approach specified here:
 
  http://www.nabble.com/Ways-of-making-components-in-a-page-optional--tp14399390p14399390.html
 
  It's possible that I've misunderstood you, do you want to redirect to
  some old legacy jsp page or?
 
  legolas wrote:
  A web page, but it is completely dynamic and all components will be
  created
  based on user request content.
 
  Thanks
 
  igor.vaynberg wrote:
 
  what would you like it to display? a web page or contents of some
  file/dynamic content?
 
  -igor
 
 
  On Jan 3, 2008 3:01 PM, legolas [EMAIL PROTECTED] wrote:
 
  Hi
  Is it possible to use wicket without having any html page?
  Just writing java code and pointing the browser to some url and it goes
  forward?
 
  Thanks
  --
  View this message in context:
  http://www.nabble.com/Is-it-possible-to-use-wicket-without-having-any-html-page--tp14607438p14607438.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
 
  --
  Nino Martinez Wael
  Java Specialist @ Jayway DK
  http://www.jayway.dk
  +45 2936 7684
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context: 
 http://www.nabble.com/Is-it-possible-to-use-wicket-without-having-any-html-page--tp14607438p14614650.html

 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Undesired behavior of wicket:enclosure in 1.3.0-final compared to 1.3.0-rc2

2008-01-04 Thread Daniel Kröger
Hi all,

consider the following markup:

wicket:enclosure child=label1
  span wicket:id=label1/span
  wicket:enclosure child=label2
span wicket:id=label2/span
  /wicket:enclosure
/wicket:enclosure

In Wicket 1.3.0-final I get an Unexpected RuntimeException (WicketMessage:
Expected close tag for wicket:enclosure child=label1) when the component
with id label1 has its visibility set to false. In Wicket 1.3.0-rc2
everything worked fine.

Was this behavior intended when releasing 1.3.0-final?


Now consider the following markup:

wicket:enclosure child=label1
  span wicket:id=label1/span
  span wicket:id=label2/span
/wicket:enclosure

When label1 has its visibilty set to false a warning
org.apache.wicket.Page - Component [Component id = label2, ...] wasn't
rendered but most likely it has a transparent parent: ... is logged, which
in my opinion is a bit annoying. A log level of INFO or DEBUG would be more
appropriate, wouldn't it?

Best regards,
Daniel


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Release announcement on JavaLobby has wrong subject? :)

2008-01-04 Thread Edvin Syse

http://www.javalobby.org/java/forums/t105163.html

Apache Wicket 1.3: first release candidate

This isn't a release candidate, is it? :)

-- Edvin

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANNOUNCE] Apache Wicket 1.3 released

2008-01-04 Thread Martijn Dashorst
Another couple of links with some publicity for Wicket:
 - http://www.javalobby.org/java/forums/t105230.html
 - http://www.infoworld.com/article/08/01/03/apache-wicket_1.html
 - http://www.theserverside.com/news/thread.tss?thread_id=47979

Martijn

On Jan 3, 2008 10:37 PM, Martijn Dashorst [EMAIL PROTECTED] wrote:
 Help promote wicket: digg our release:

 http://digg.com/programming/Apache_Wicket_1_3_released

 Martijn


 On Jan 3, 2008 8:58 AM, Jonathan Locke [EMAIL PROTECTED] wrote:
 
 
  yeah, baby, yeah!!!  way to go everyone!
 
 
 
  Martijn Dashorst-4 wrote:
  
   Starting the new year with a bang the Wicket Team has released Apache
   Wicket 1.3. With this release comes a lot of great successes, but most
   of all the team wanted to express their wishes to everyone for a happy
   new year.
  
   You can download Apache Wicket 1.3 here:
  
   http://wicket.apache.org/getting-wicket.html
  
   Apache Wicket is one of the fastest growing Java open source component
   based web frameworks. With a focus on producing valid html and a
   logical separation between design and code.  Within minutes you can
   start to enjoy throwing out tag soup, complex components and high
   maintenance overhead for a simple POJO + html data model.
  
   See the Apache Wicket website for more information:
  
   http://wicket.apache.org
  
   Take a look at some of the following highlights or skip to the bottom
   and get started now.
  
* last JDK-1.4 release (next release will be Java 5 based)
* first Apache release: renamed packages to org.apache.wicket
* simplified several core APIs
* now works with zero-config behind a proxy server using relative URLs
* added Google Guice support
* use your Wicket pages directly in a portal without changing a line
   of code (JSR-168/JSR-286 support)
* switched logging API from commons-logging to slf4j
* integrate velocity templates as panels in your pages
* YUI-calendar and Joda time based date picker (wicket-datetime)
* contribute new javascript dependencies to the page header using an
   Ajax requeset
* improved, more robust header contributions
* scale to extremely large numbers of users with stateless pages and
   components
* improved AjaxTree/AjaxTreeTable
* hybrid URL encoding to make search engines and your users happy
* create form panels and use them anywhere without worrying about the
   nesting of form tags
* minimized session use by storing component hierarchy in file system
   (DiskPageStore)
  
   Get started today by downloading Wicket using this link:
  
   http://www.apache.org/dyn/closer.cgi/wicket/1.3.0
  
   The distribution contains all the Wicket libraries, and all the source
   code including the examples project. In the root of the download you
   will find a README document with full instructions.
  
   Migrate your Wicket 1.2 application to Wicket 1.3 using our migration
   guide:
  
   http://cwiki.apache.org/WICKET/migrate-12.html
  
   Best wishes from the Wicket Team and a prosperous 2008!
  
- The Wicket Team
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
  --
  View this message in context: 
  http://www.nabble.com/-ANNOUNCE--Apache-Wicket-1.3-released-tp14585070p14593193.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 --
 Buy Wicket in Action: http://manning.com/dashorst
 Apache Wicket 1.3.0 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0




-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is it possible to use wicket without having any html page?

2008-01-04 Thread legolas

I am simple looking to know whether we can get rid of any markup files and
just use java files to define and design our pages, something like echo2?

Thanks.



Nino.Martinez wrote:
 
 Hi legolas
 
 im not sure how familiar you are with wicket. But i'd go for having the 
 html and just using the approach specified here:
 
 http://www.nabble.com/Ways-of-making-components-in-a-page-optional--tp14399390p14399390.html
 
 It's possible that I've misunderstood you, do you want to redirect to 
 some old legacy jsp page or?
 
 legolas wrote:
 A web page, but it is completely dynamic and all components will be
 created
 based on user request content.

 Thanks

 igor.vaynberg wrote:
   
 what would you like it to display? a web page or contents of some
 file/dynamic content?

 -igor


 On Jan 3, 2008 3:01 PM, legolas [EMAIL PROTECTED] wrote:
 
 Hi
 Is it possible to use wicket without having any html page?
 Just writing java code and pointing the browser to some url and it goes
 forward?

 Thanks
 --
 View this message in context:
 http://www.nabble.com/Is-it-possible-to-use-wicket-without-having-any-html-page--tp14607438p14607438.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


   
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 

   
 
 -- 
 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Is-it-possible-to-use-wicket-without-having-any-html-page--tp14607438p14614650.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket 1.3 portlets in Liferay

2008-01-04 Thread Thijs

Check also:
http://issues.apache.org/jira/browse/WICKET-1132
http://www.liferay.com/web/guest/community/forums/message_boards/message/338111


But in short: it works a bit: If you implement a bridge like the one in
http://www.nabble.com/Portlet-howto-tt13093514.html by charly
You should get things working a bit. But Ajax won't work because your 
not allowed to set the text/xml contenttype header (what wicket does)
Dynamic resources won't work because the response is not directly 
accessible (as portlet 1.0 spec) and there are some other issues...
I've been trying to get some things working and I've had to alter some 
of the portal code. I have ajax working (a bit).

But I'm constantly running into other things...

Thijs


racso wrote:

 How easy is it to use Wicket 1.3 application as a portlet in Liferay Portal
4.xx? As anyone tried it yet?

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [wicket-security] LDAP integration?

2008-01-04 Thread William Hoover
Thanks for the info. We are not using Spring (opted for Plexus) so I'm not sure 
how plausible it will be to implement the easiest solution in our case. The 
application in question is still in the preliminary evaluation stage so we may 
have to look for another route.

Do you have a roadmap/timeline on a release date for wicket-security?

-Original Message-
From: Maurice Marrink [mailto:[EMAIL PROTECTED]
Sent: Friday, January 04, 2008 8:36 AM
To: users@wicket.apache.org
Subject: Re: [wicket-security] LDAP integration?


Yes and not exactly.

wicket-security is build with plugability in mind, meaning if it does
not yet exist you can build it yourself quite easily.
Regarding LDAP, i myself have never worked with it but there are a
couple of options you can try
-use swarm and map ldap permissions to swarm principals
-use swarm with acegi and let acegi handle the ldap part, you still
need to map acegi permissions to swarm principals though but it saves
you from having to do all the ldap connection stuff yourself
-use wasp and build your own ldap implementation, more work but also
more control

As for the ldap example part, i am afraid you are somewhat on your own.
There is however an example showing how to integrate swarm with acegi
http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
and there is an other example showing wicket-auth-roles acegi and ldap
http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
So if you rip the ldap config from the last example and use it in the
first example instead of the TestingAuthenticationProvider you should
be ready to go
The example also has some suggestion on how you could do your own ldap
permission mapping if you choose to go that way.

If you decide to go all out and build directly on wasp you should take
a look at swarm itself a a reference, just ignore all the stuff about
permissions, principals, subjects and stuff.

Maurice

On Jan 4, 2008 2:15 PM, William Hoover [EMAIL PROTECTED] wrote:
 Can wicket-security be used with LDAP? If so, are there any examples 
 available demonstrating its use?


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wickettester and session?

2008-01-04 Thread David Shepherdson

On 4 Jan 2008, at 12.18 pm, Nino Saturnino Martinez Vazquez Wael wrote:

I think we should proceed with the example from the jira issue, ive  
changed it to   :


tester = new WicketTester(new WicketApplication());

But it still gives the class cast exception.

This is running 1.3.0 final.


This seemed really weird, because I knew our test code was doing  
something practically identical, and yet we weren't getting any  
ClassCastExceptions. But sure enough, when I run your quickstart, it  
gives a ClassCastException.


I think I can see what the difference is, though: our custom session  
class extends WebSession, whereas the one in the quickstart extends  
Session.


Indeed, this is supported by the ClassCastException message itself,  
which suggests that something in MockWebApplication (the base class  
for WicketTester, eventually) is trying to cast your CustomSession as  
a WebSession. When I change the base class of CustomSession to be  
WebSession instead, the test passes with no exceptions.


Regards,

David

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[wicket-security] LDAP integration?

2008-01-04 Thread William Hoover
Can wicket-security be used with LDAP? If so, are there any examples available 
demonstrating its use?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wickettester and session?

2008-01-04 Thread Nino Saturnino Martinez Vazquez Wael
Ahh, that might just be it then.. I've just verified it. I guess I used 
a too general session, as you wrote the stuff passes when using 
websession. Im gonna close the bug.


Thanks for your help.

David Shepherdson wrote:

On 4 Jan 2008, at 12.18 pm, Nino Saturnino Martinez Vazquez Wael wrote:

I think we should proceed with the example from the jira issue, ive 
changed it to   :


tester = new WicketTester(new WicketApplication());

But it still gives the class cast exception.

This is running 1.3.0 final.


This seemed really weird, because I knew our test code was doing 
something practically identical, and yet we weren't getting any 
ClassCastExceptions. But sure enough, when I run your quickstart, it 
gives a ClassCastException.


I think I can see what the difference is, though: our custom session 
class extends WebSession, whereas the one in the quickstart extends 
Session.


Indeed, this is supported by the ClassCastException message itself, 
which suggests that something in MockWebApplication (the base class 
for WicketTester, eventually) is trying to cast your CustomSession as 
a WebSession. When I change the base class of CustomSession to be 
WebSession instead, the test passes with no exceptions.


Regards,

David

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Release announcement on JavaLobby has wrong subject? :)

2008-01-04 Thread Martijn Dashorst
I've reported it to javalobby day before yesterday... Aparently their
editorial staff is not very quick in resolving requests.

Martijn

On Jan 4, 2008 3:40 PM, Edvin Syse [EMAIL PROTECTED] wrote:
 http://www.javalobby.org/java/forums/t105163.html

 Apache Wicket 1.3: first release candidate

 This isn't a release candidate, is it? :)

 -- Edvin

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Undesired behavior of wicket:enclosure in 1.3.0-final compared to 1.3.0-rc2

2008-01-04 Thread marcus dickerhof
Hi everybody,

I also have an exception with the nested wicket:enclosure tags since
wicket 1.3 final.
-- expecting closing tag...

It works fine in 1.3. rc 2.
Perhaps this is a related problem?

Best regards
Marcus


2008/1/4, Daniel Kröger [EMAIL PROTECTED]:

 Hi all,

 consider the following markup:

 wicket:enclosure child=label1
   span wicket:id=label1/span
   wicket:enclosure child=label2
 span wicket:id=label2/span
   /wicket:enclosure
 /wicket:enclosure

 In Wicket 1.3.0-final I get an Unexpected RuntimeException (WicketMessage:
 Expected close tag for wicket:enclosure child=label1) when the
 component
 with id label1 has its visibility set to false. In Wicket 1.3.0-rc2
 everything worked fine.

 Was this behavior intended when releasing 1.3.0-final?


 Now consider the following markup:

 wicket:enclosure child=label1
   span wicket:id=label1/span
   span wicket:id=label2/span
 /wicket:enclosure

 When label1 has its visibilty set to false a warning
 org.apache.wicket.Page - Component [Component id = label2, ...] wasn't
 rendered but most likely it has a transparent parent: ... is logged,
 which
 in my opinion is a bit annoying. A log level of INFO or DEBUG would be
 more
 appropriate, wouldn't it?

 Best regards,
 Daniel


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Bug in 1.3-final: CheckBox.setRequired() is not picked up as error when unchecked

2008-01-04 Thread Edvin Syse

I just filed: https://issues.apache.org/jira/browse/WICKET-1260

I'm on a deadline for a project and this makes it impossible for me to 
deploy. Can anyone think of a workaround I could use in the meantime?


Sincerely,
Edvin Syse

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel making AJAX?

2008-01-04 Thread Igor Vaynberg
why exactly isnt ajaxtabbedpanel the way to go?

-igor

On Jan 4, 2008 7:48 AM, Beyonder Unknown [EMAIL PROTECTED] wrote:

 Hi Guys,

 I was wondering if there's a way to implement TabbedPanel that when you click 
 the tab, it will do an ajax call to the backend, and update the body of the 
 tab. I looked at AjaxTabbedPanel, but it seems like its not the way to go.

 Any help will be gladly appreciated.

 Thanks,
 Wen Tong

 --
 The only constant in life is change.




   
 
 Be a better friend, newshound, and
 know-it-all with Yahoo! Mobile.  Try it now.  
 http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Undesired behavior of wicket:enclosure in 1.3.0-final compared to 1.3.0-rc2

2008-01-04 Thread Igor Vaynberg
please open a jira issue and provide a quickstart

-igor

On Jan 4, 2008 7:15 AM, marcus dickerhof [EMAIL PROTECTED] wrote:
 Hi everybody,

 I also have an exception with the nested wicket:enclosure tags since
 wicket 1.3 final.
 -- expecting closing tag...

 It works fine in 1.3. rc 2.
 Perhaps this is a related problem?

 Best regards
 Marcus


 2008/1/4, Daniel Kröger [EMAIL PROTECTED]:

 
  Hi all,
 
  consider the following markup:
 
  wicket:enclosure child=label1
span wicket:id=label1/span
wicket:enclosure child=label2
  span wicket:id=label2/span
/wicket:enclosure
  /wicket:enclosure
 
  In Wicket 1.3.0-final I get an Unexpected RuntimeException (WicketMessage:
  Expected close tag for wicket:enclosure child=label1) when the
  component
  with id label1 has its visibility set to false. In Wicket 1.3.0-rc2
  everything worked fine.
 
  Was this behavior intended when releasing 1.3.0-final?
 
 
  Now consider the following markup:
 
  wicket:enclosure child=label1
span wicket:id=label1/span
span wicket:id=label2/span
  /wicket:enclosure
 
  When label1 has its visibilty set to false a warning
  org.apache.wicket.Page - Component [Component id = label2, ...] wasn't
  rendered but most likely it has a transparent parent: ... is logged,
  which
  in my opinion is a bit annoying. A log level of INFO or DEBUG would be
  more
  appropriate, wouldn't it?
 
  Best regards,
  Daniel
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [wicket-security] LDAP integration?

2008-01-04 Thread Maurice Marrink
I think there will be one more beta before we do the final.
I recently made some changes to boost performance and a public beta
for that will be better. Even though we are already using it in our
apps without problems through the snapshot release.
With any luck the 2nd beta will be released this weekend and the final
will probably follow soon after.

Well the slightly more complex route is connecting to ldap yourself
(option number 1 in my previous mail).
Personally i think the mapping between ldap and swarm will be a
breeze. because a swarm principal is basically just a name.

Maurice

On Jan 4, 2008 3:43 PM, William Hoover [EMAIL PROTECTED] wrote:
 Thanks for the info. We are not using Spring (opted for Plexus) so I'm not 
 sure how plausible it will be to implement the easiest solution in our case. 
 The application in question is still in the preliminary evaluation stage so 
 we may have to look for another route.

 Do you have a roadmap/timeline on a release date for wicket-security?


 -Original Message-
 From: Maurice Marrink [mailto:[EMAIL PROTECTED]
 Sent: Friday, January 04, 2008 8:36 AM
 To: users@wicket.apache.org
 Subject: Re: [wicket-security] LDAP integration?


 Yes and not exactly.

 wicket-security is build with plugability in mind, meaning if it does
 not yet exist you can build it yourself quite easily.
 Regarding LDAP, i myself have never worked with it but there are a
 couple of options you can try
 -use swarm and map ldap permissions to swarm principals
 -use swarm with acegi and let acegi handle the ldap part, you still
 need to map acegi permissions to swarm principals though but it saves
 you from having to do all the ldap connection stuff yourself
 -use wasp and build your own ldap implementation, more work but also
 more control

 As for the ldap example part, i am afraid you are somewhat on your own.
 There is however an example showing how to integrate swarm with acegi
 http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
 and there is an other example showing wicket-auth-roles acegi and ldap
 http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
 So if you rip the ldap config from the last example and use it in the
 first example instead of the TestingAuthenticationProvider you should
 be ready to go
 The example also has some suggestion on how you could do your own ldap
 permission mapping if you choose to go that way.

 If you decide to go all out and build directly on wasp you should take
 a look at swarm itself a a reference, just ignore all the stuff about
 permissions, principals, subjects and stuff.

 Maurice

 On Jan 4, 2008 2:15 PM, William Hoover [EMAIL PROTECTED] wrote:
  Can wicket-security be used with LDAP? If so, are there any examples 
  available demonstrating its use?
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: London Wicket User Event

2008-01-04 Thread jweekend

Neo,
Sounds good, go ahead. We need to make more people aware of our events - too
often we hear oh, I would have loved to have come along if I only I had
known about it!. 
BTW, I see that you have not registered for a place yet - depending on where
we are hosted (TBA mid-January) we may fill up quite quickly so it would
not be a bad idea to  http://www.jweekend.co.uk/dev/LWUGReg/ do it soon  if
you'd like to come along.
Regards - Cemal
http://jWeekend.co.uk http://jWeekend.co.uk 

 

neo anderson wrote:
 
 May I forward this message to other people? I think that would be great
 for developers who  are also interested in such event.
 
 Thank you very much.
 
 - Original Message 
 From: jweekend [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Sent: Sunday, 30 December, 2007 9:51:35 PM
 Subject: London Wicket User Event
 
 
 The next London Wicket Event will be on Wednesday, February 6th, 2008. 
 Keep an eye on the  http://www.jweekend.com/dev/LWUGReg/ registration
  page 
 for the updates.
 http://herebebeasties.com/ Al Maw 's going to demonstrate creation of
  an
 AJAXified drag and drop list editor. 
 Ian Godman will tell us about his new, soon to be open-sourced Wicket
 security toolkit.
 I will deliver another topical presentation (subject TBD) too.
 There will also be a free prize-draw for access to 
 http://martijndashorst.com/blog/ Martijn  and 
 http://chillenious.wordpress.com/ Eelco 's
   http://manning.com/dashorst/
 Wicket In Action  (MEAP). 
 Register early (and don't forget to click on the confirmation link in
  the
 automated email to confirm or cancel) as we expect a good turn out and
  need
 to arrange a suitable location in good time.
 Those of you that kindly offered to host us should contact us 
 http://www.jweekend.co.uk/dev/ContactUsBody/ here  if this date suits
  you.
 
 Regards - Cemal
 http://jWeekend.co.uk http://jWeekend.co.uk 
 -- 
 View this message in context:
  http://www.nabble.com/London-Wicket-User-Event-tp14547280p14547280.html
 Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 
   __
 Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/London-Wicket-User-Event-tp14547280p14618714.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug in 1.3-final: CheckBox.setRequired() is not picked up as error when unchecked

2008-01-04 Thread Matej Knopp
I'm not sure either. It can be convenient, when you have for example a
license agreement. Then you just call checkbox.setRequired(true) and
you're done. What are the cons?

-Matej

On Jan 4, 2008 5:33 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:
 hmm, that was actually a request:
 https://issues.apache.org/jira/browse/WICKET-1221

 not sure what to do here...

 -igor



 On Jan 4, 2008 7:49 AM, Edvin Syse [EMAIL PROTECTED] wrote:
  I just filed: https://issues.apache.org/jira/browse/WICKET-1260
 
  I'm on a deadline for a project and this makes it impossible for me to
  deploy. Can anyone think of a workaround I could use in the meantime?
 
  Sincerely,
  Edvin Syse
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wickettester and session?

2008-01-04 Thread David Shepherdson

On 4 Jan 2008, at 1.19 pm, Nino Saturnino Martinez Vazquez Wael wrote:

Ahh, that might just be it then.. I've just verified it. I guess I  
used a too general session, as you wrote the stuff passes when using  
websession. Im gonna close the bug.


Thanks for your help.


No probs -- glad there was a good explanation for it in the end!

David

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AjaxFormComponentUpdateBehavior not working with Radio/RadioGroup

2008-01-04 Thread wicket user
Hi all,

I am trying to add AjaxFormComponentUpdateBehavior to Radio/RadioGroup,

I cant add the behaviour to the Radio as its not a FormComponent.
Adding the behaviour to RadioGroup is not working as well.

Is there any work around to get it working.

Regards
Dipu


Re: TabbedPanel making AJAX?

2008-01-04 Thread Igor Vaynberg
this has nothing to do with ajax. you should not store the hibernate
object itself in the model, you should use a model that can load the
object during next request - that way it is attached to the current
session and doesnt have lazy loading problems. see
LoadableDetachableModel, and maybe read up on detachable models.

-igor

On Jan 4, 2008 8:48 AM, Beyonder Unknown [EMAIL PROTECTED] wrote:

 Hi Igor,

 How are you? The AbstractTab  returns a Panel that  calls a backend object 
 using hibernate Lazy Loading.  (We have a session filter that closes the 
 hibernate session after the page is loaded ). So when you click the tab, it 
 throws a  Lazy Loading exception, because the session is already close.

 When I tried to use AjaxTabbedPanel and  implement  onAjaxUpdate, it already 
 throws the exception prior to reaching the function.

 Do I have to override and customize some method in AjaxTabbedPanel to achieve 
 this? Like finding the title link and change it to ajax link? I'm looking for 
 a solution that when you click the tab, it does an ajax call in the backend 
 and update the tab content. So I thought I'd email this problem to the group, 
 thinking somebody have encountered this problem before.

 thanks,
 Wen Tong

 --
 The only constant in life is change.

 - Original Message 
 From: Igor Vaynberg [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Sent: Friday, January 4, 2008 8:25:26 AM
 Subject: Re: TabbedPanel making AJAX?


 why exactly isnt ajaxtabbedpanel the way to go?

 -igor

 On Jan 4, 2008 7:48 AM, Beyonder Unknown [EMAIL PROTECTED] wrote:
 
  Hi Guys,
 
  I was wondering if there's a way to implement TabbedPanel that when
  you click the tab, it will do an ajax call to the backend, and update
  the body of the tab. I looked at AjaxTabbedPanel, but it seems like its
  not the way to go.
 
  Any help will be gladly appreciated.
 
  Thanks,
  Wen Tong
 
  --
  The only constant in life is change.
 
 
 
 
 
  
 
  Be a better friend, newshound, and
  know-it-all with Yahoo! Mobile.  Try it now.
   http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






   
 
 Never miss a thing.  Make Yahoo your home page.
 http://www.yahoo.com/r/hs


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel making AJAX?

2008-01-04 Thread Beyonder Unknown

Hi Igor,

How are you? The AbstractTab  returns a Panel that  calls a backend object 
using hibernate Lazy Loading.  (We have a session filter that closes the 
hibernate session after the page is loaded ). So when you click the tab, it 
throws a  Lazy Loading exception, because the session is already close.

When I tried to use AjaxTabbedPanel and  implement  onAjaxUpdate, it already 
throws the exception prior to reaching the function.

Do I have to override and customize some method in AjaxTabbedPanel to achieve 
this? Like finding the title link and change it to ajax link? I'm looking for a 
solution that when you click the tab, it does an ajax call in the backend and 
update the tab content. So I thought I'd email this problem to the group, 
thinking somebody have encountered this problem before.

thanks, 
Wen Tong
 
--
The only constant in life is change.

- Original Message 
From: Igor Vaynberg [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Friday, January 4, 2008 8:25:26 AM
Subject: Re: TabbedPanel making AJAX?


why exactly isnt ajaxtabbedpanel the way to go?

-igor

On Jan 4, 2008 7:48 AM, Beyonder Unknown [EMAIL PROTECTED] wrote:

 Hi Guys,

 I was wondering if there's a way to implement TabbedPanel that when
 you click the tab, it will do an ajax call to the backend, and update
 the body of the tab. I looked at AjaxTabbedPanel, but it seems like its
 not the way to go.

 Any help will be gladly appreciated.

 Thanks,
 Wen Tong

 --
 The only constant in life is change.




  
 

 Be a better friend, newshound, and
 know-it-all with Yahoo! Mobile.  Try it now.
  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: external login pages

2008-01-04 Thread Alex Jacoby
Thanks for the advice.  What you suggested is exactly what I've been  
working on.  I think I got it for now, but it's not pretty.  Wicket- 
auth-roles takes care of figuring out that the user isn't authorized  
for a particular page behind the scenes, so by the time my code  
knows that the user is being redirected to the login page, the  
original request is lost.  My workaround is to save the original  
request URL in the session in the AuthenticatedWebSession#getRoles  
method on every request, even when it's not needed.  That method  
always seems to get called.


It would be nice if it were easier to get the full URL for a page like  
discussed here http://issues.apache.org/jira/browse/WICKET-609


Thanks for the help,
Alex


On Jan 4, 2008, at 3:52 AM, Jeremy Thomerson wrote:

It's really late here and I'm not at a computer, so this is somewhat  
pseudo-code, but try this:


// place where you caught that they weren't
// authenticated (before page construction)
String url =  
getRequest 
().getServletResponse().getUrlOrSomethingICantRememberRightNow();
throw new RestartResponseAtInterceptPageException(new RedirectPage(/ 
perl-stuff/signin.pl?dest= + url));


Of course, you could encrypt the destination or something if it was  
critical, but typically that shouldn't be a problem.


Hope this helps.

Jeremy Thomerson
-- sent from a wireless device

-Original Message-
From: Erik van Oosten [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: 1/4/08 2:23 AM
Subject: Re: external login pages

Hi Alex,

Normally you can throw a special exception, the
RestartResponseAtInterceptPageException. Unfortunately I do not think
this will work when the intercept page is external to Wicket.

So the only thing you can do, is put the original URL in a parameter  
to
the perl page, and let the perl page use that as second redirect.  
Makes

sense?

Regards,
   Erik.



Alex Jacoby wrote:

I am building a new wicket app that has to use an existing login
page.  The legacy login page is written in perl and sets a login
cookie before redirecting the user back to a specified URL.

I'm hoping to keep things simple and use role-based authorization for
pages.  In my authenticated app the login page is set to a
RedirectPage which redirects to the external login page.  My problem
is that I can't figure out how to grab the original URL that sent me
to the login page, so that I can pass that URL to the external login
page, and thereby be sent to my original destination after login.
(Currently I just send them back to the home page, which is  
annoying.)


Has anyone tried this before?  I've got a feeling there's a better  
way

I could be doing this -- my current version using AuthenticatedWebApp
is very kludgy.

Thanks for any ideas,
Alex

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug in 1.3-final: CheckBox.setRequired() is not picked up as error when unchecked

2008-01-04 Thread Igor Vaynberg
hmm, that was actually a request:
https://issues.apache.org/jira/browse/WICKET-1221

not sure what to do here...

-igor


On Jan 4, 2008 7:49 AM, Edvin Syse [EMAIL PROTECTED] wrote:
 I just filed: https://issues.apache.org/jira/browse/WICKET-1260

 I'm on a deadline for a project and this makes it impossible for me to
 deploy. Can anyone think of a workaround I could use in the meantime?

 Sincerely,
 Edvin Syse

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: TabbedPanel making AJAX?

2008-01-04 Thread Beyonder Unknown

Thanks Igor,

Let me try that.

Wen T.
 
--
The only constant in life is change.

- Original Message 
From: Igor Vaynberg [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Friday, January 4, 2008 8:53:36 AM
Subject: Re: TabbedPanel making AJAX?


this has nothing to do with ajax. you should not store the hibernate
object itself in the model, you should use a model that can load the
object during next request - that way it is attached to the current
session and doesnt have lazy loading problems. see
LoadableDetachableModel, and maybe read up on detachable models.

-igor

On Jan 4, 2008 8:48 AM, Beyonder Unknown [EMAIL PROTECTED] wrote:

 Hi Igor,

 How are you? The AbstractTab  returns a Panel that  calls a backend
 object using hibernate Lazy Loading.  (We have a session filter that
 closes the hibernate session after the page is loaded ). So when you click
 the tab, it throws a  Lazy Loading exception, because the session is
 already close.

 When I tried to use AjaxTabbedPanel and  implement  onAjaxUpdate, it
 already throws the exception prior to reaching the function.

 Do I have to override and customize some method in AjaxTabbedPanel to
 achieve this? Like finding the title link and change it to ajax link?
 I'm looking for a solution that when you click the tab, it does an ajax
 call in the backend and update the tab content. So I thought I'd email
 this problem to the group, thinking somebody have encountered this
 problem before.

 thanks,
 Wen Tong

 --
 The only constant in life is change.

 - Original Message 
 From: Igor Vaynberg [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Sent: Friday, January 4, 2008 8:25:26 AM
 Subject: Re: TabbedPanel making AJAX?


 why exactly isnt ajaxtabbedpanel the way to go?

 -igor

 On Jan 4, 2008 7:48 AM, Beyonder Unknown [EMAIL PROTECTED]
 wrote:
 
  Hi Guys,
 
  I was wondering if there's a way to implement TabbedPanel that when
  you click the tab, it will do an ajax call to the backend, and
 update
  the body of the tab. I looked at AjaxTabbedPanel, but it seems like
 its
  not the way to go.
 
  Any help will be gladly appreciated.
 
  Thanks,
  Wen Tong
 
  --
  The only constant in life is change.
 
 
 
 
 

  

  Be a better friend, newshound, and
  know-it-all with Yahoo! Mobile.  Try it now.
   http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
 
 
 
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






  
 

 Never miss a thing.  Make Yahoo your home page.
 http://www.yahoo.com/r/hs


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  

Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TabbedPanel making AJAX?

2008-01-04 Thread Beyonder Unknown

Hi Guys,

I was wondering if there's a way to implement TabbedPanel that when you click 
the tab, it will do an ajax call to the backend, and update the body of the 
tab. I looked at AjaxTabbedPanel, but it seems like its not the way to go.

Any help will be gladly appreciated.

Thanks,
Wen Tong
 
--
The only constant in life is change.




  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket/Ajax history support

2008-01-04 Thread Sam Hough

What is the best bet for supporting the back button and bookmarking in Ajax
heavy Wicket 1.3?

I saw this ticket which I think covers what I'm on about:
http://issues.apache.org/jira/browse/WICKET-271

So far we are thinking about marking which bean properties of components
should be recorded for history and bookmark purposes and then shoving these
into #bit after the URL. Then need a bit of JS to send that to the server...
Obviously this will be a lot of work :(

Matej : Sorry if I gave the wrong impression on TheServerSide (as x.y) about
Wicket's performance. I thought I was saying pretty much as matt raible had
by putting it in the Internal, more desktop-like applications that are
stateful category. Doing server side component based framework is tough and
you guys have done an amazing job. I'm very, very grateful that Wicket has
saved me from struts 2 in my current job.

Cheers

Sam
-- 
View this message in context: 
http://www.nabble.com/Wicket-Ajax-history-support-tp14619281p14619281.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: external login pages

2008-01-04 Thread Alex Jacoby
It would be nice if it were easier to get the full URL for a page  
like discussed here http://issues.apache.org/jira/browse/WICKET-609


Whoops - I see this is already fixed in the 1.3 release.  The javadocs  
just haven't been updated yet:

http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/protocol/http/RequestUtils.html

Alex

On Jan 4, 2008, at 10:54 AM, Alex Jacoby wrote:

Thanks for the advice.  What you suggested is exactly what I've been  
working on.  I think I got it for now, but it's not pretty.  Wicket- 
auth-roles takes care of figuring out that the user isn't authorized  
for a particular page behind the scenes, so by the time my code  
knows that the user is being redirected to the login page, the  
original request is lost.  My workaround is to save the original  
request URL in the session in the AuthenticatedWebSession#getRoles  
method on every request, even when it's not needed.  That method  
always seems to get called.


It would be nice if it were easier to get the full URL for a page  
like discussed here http://issues.apache.org/jira/browse/WICKET-609


Thanks for the help,
Alex


On Jan 4, 2008, at 3:52 AM, Jeremy Thomerson wrote:

It's really late here and I'm not at a computer, so this is  
somewhat pseudo-code, but try this:


// place where you caught that they weren't
// authenticated (before page construction)
String url =  
getRequest 
().getServletResponse().getUrlOrSomethingICantRememberRightNow();
throw new RestartResponseAtInterceptPageException(new  
RedirectPage(/perl-stuff/signin.pl?dest= + url));


Of course, you could encrypt the destination or something if it was  
critical, but typically that shouldn't be a problem.


Hope this helps.

Jeremy Thomerson
-- sent from a wireless device

-Original Message-
From: Erik van Oosten [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: 1/4/08 2:23 AM
Subject: Re: external login pages

Hi Alex,

Normally you can throw a special exception, the
RestartResponseAtInterceptPageException. Unfortunately I do not think
this will work when the intercept page is external to Wicket.

So the only thing you can do, is put the original URL in a  
parameter to
the perl page, and let the perl page use that as second redirect.  
Makes

sense?

Regards,
  Erik.



Alex Jacoby wrote:

I am building a new wicket app that has to use an existing login
page.  The legacy login page is written in perl and sets a login
cookie before redirecting the user back to a specified URL.

I'm hoping to keep things simple and use role-based authorization  
for

pages.  In my authenticated app the login page is set to a
RedirectPage which redirects to the external login page.  My problem
is that I can't figure out how to grab the original URL that sent me
to the login page, so that I can pass that URL to the external login
page, and thereby be sent to my original destination after login.
(Currently I just send them back to the home page, which is  
annoying.)


Has anyone tried this before?  I've got a feeling there's a better  
way
I could be doing this -- my current version using  
AuthenticatedWebApp

is very kludgy.

Thanks for any ideas,
Alex

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AW: TabbedPanel making AJAX?

2008-01-04 Thread Beyonder Unknown
Hi Stefan, 

I already tried this, but onAjaxUpdate() is not even executed. Anyways, I have 
to take  look and see if theres another way to implement hibernate with wicket.

Thank you very much!

Best,
Wen Tong
 
--
The only constant in life is change.

- Original Message 
From: Stefan Lindner [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Friday, January 4, 2008 8:45:33 AM
Subject: AW: TabbedPanel making AJAX?


Wen Tong,

I think the following code does what you want:

new AjaxTabbedPanel(..) {
private static final long serialVersionUID = 1L;
@Override
protected void onAjaxUpdate(AjaxRequestTarget target) {
System.out.println(OnAjaxUpdate aufgerufen);
if (target != null) {
int selectedTab = getSelectedTab(); 
// Do whatever you want with the now selected tab und
 use the target variable for AJAX-actions

Stefan

-UrsprĂĽngliche Nachricht-
Von: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 4. Januar 2008 17:25
An: users@wicket.apache.org
Betreff: Re: TabbedPanel making AJAX?

why exactly isnt ajaxtabbedpanel the way to go?

-igor

On Jan 4, 2008 7:48 AM, Beyonder Unknown [EMAIL PROTECTED] wrote:

 Hi Guys,

 I was wondering if there's a way to implement TabbedPanel that when
 you click the tab, it will do an ajax call to the backend, and update
 the body of the tab. I looked at AjaxTabbedPanel, but it seems like its
 not the way to go.

 Any help will be gladly appreciated.

 Thanks,
 Wen Tong

 --
 The only constant in life is change.




   

 __
 __
 Be a better friend, newshound, and
 know-it-all with Yahoo! Mobile.  Try it now.  
 http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: TabbedPanel making AJAX?

2008-01-04 Thread Stefan Lindner
Wen Tong,

I think the following code does what you want:

new AjaxTabbedPanel(..) {
private static final long serialVersionUID = 1L;
@Override
protected void onAjaxUpdate(AjaxRequestTarget target) {
System.out.println(OnAjaxUpdate aufgerufen);
if (target != null) {
int selectedTab = getSelectedTab(); 
// Do whatever you want with the now selected 
tab und use the target variable for AJAX-actions

Stefan

-UrsprĂĽngliche Nachricht-
Von: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 4. Januar 2008 17:25
An: users@wicket.apache.org
Betreff: Re: TabbedPanel making AJAX?

why exactly isnt ajaxtabbedpanel the way to go?

-igor

On Jan 4, 2008 7:48 AM, Beyonder Unknown [EMAIL PROTECTED] wrote:

 Hi Guys,

 I was wondering if there's a way to implement TabbedPanel that when you click 
 the tab, it will do an ajax call to the backend, and update the body of the 
 tab. I looked at AjaxTabbedPanel, but it seems like its not the way to go.

 Any help will be gladly appreciated.

 Thanks,
 Wen Tong

 --
 The only constant in life is change.




   
 __
 __
 Be a better friend, newshound, and
 know-it-all with Yahoo! Mobile.  Try it now.  
 http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug in 1.3-final: CheckBox.setRequired() is not picked up as error when unchecked

2008-01-04 Thread Igor Vaynberg
correct, but we need to figure out what the framework default should be.

i dont really have an inclination either way

-igor


On Jan 4, 2008 9:06 AM, Martijn Dashorst [EMAIL PROTECTED] wrote:
 Whatever the resolution, Edvin can override checkRequired on that
 checkbox of his and return false as I understand it?

 Martijn


 On Jan 4, 2008 5:40 PM, Matej Knopp [EMAIL PROTECTED] wrote:
  I'm not sure either. It can be convenient, when you have for example a
  license agreement. Then you just call checkbox.setRequired(true) and
  you're done. What are the cons?
 
  -Matej
 
 
  On Jan 4, 2008 5:33 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:
   hmm, that was actually a request:
   https://issues.apache.org/jira/browse/WICKET-1221
  
   not sure what to do here...
  
   -igor
  
  
  
   On Jan 4, 2008 7:49 AM, Edvin Syse [EMAIL PROTECTED] wrote:
I just filed: https://issues.apache.org/jira/browse/WICKET-1260
   
I'm on a deadline for a project and this makes it impossible for me to
deploy. Can anyone think of a workaround I could use in the meantime?
   
Sincerely,
Edvin Syse
   
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
   
   
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 



 --
 Buy Wicket in Action: http://manning.com/dashorst
 Apache Wicket 1.3.0 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug in 1.3-final: CheckBox.setRequired() is not picked up as error when unchecked

2008-01-04 Thread Martijn Dashorst
Whatever the resolution, Edvin can override checkRequired on that
checkbox of his and return false as I understand it?

Martijn

On Jan 4, 2008 5:40 PM, Matej Knopp [EMAIL PROTECTED] wrote:
 I'm not sure either. It can be convenient, when you have for example a
 license agreement. Then you just call checkbox.setRequired(true) and
 you're done. What are the cons?

 -Matej


 On Jan 4, 2008 5:33 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:
  hmm, that was actually a request:
  https://issues.apache.org/jira/browse/WICKET-1221
 
  not sure what to do here...
 
  -igor
 
 
 
  On Jan 4, 2008 7:49 AM, Edvin Syse [EMAIL PROTECTED] wrote:
   I just filed: https://issues.apache.org/jira/browse/WICKET-1260
  
   I'm on a deadline for a project and this makes it impossible for me to
   deploy. Can anyone think of a workaround I could use in the meantime?
  
   Sincerely,
   Edvin Syse
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: AjaxFormComponentUpdateBehavior not working with Radio/RadioGroup

2008-01-04 Thread Igor Vaynberg
ajaxformchoicecomponentupdatingbehavior or something similar...

-igor

On Jan 4, 2008 8:53 AM, wicket user [EMAIL PROTECTED] wrote:
 Hi all,

 I am trying to add AjaxFormComponentUpdateBehavior to Radio/RadioGroup,

 I cant add the behaviour to the Radio as its not a FormComponent.
 Adding the behaviour to RadioGroup is not working as well.

 Is there any work around to get it working.

 Regards
 Dipu


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Is it possible to use wicket without having any html page?

2008-01-04 Thread Eelco Hillenius
On Jan 4, 2008 7:35 PM, Martijn Dashorst [EMAIL PROTECTED] wrote:
 then just use Echo2. Why make Wicket into Echo2 when you can use that?

 Wicket has a particular niche and Echo2 has its niche. There is no
 sense into turning one into the other.

+1!

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: BookmarkablePageLink giving a different URL

2008-01-04 Thread Haritha Juturu
hey johan
currently i have created a new class which extends from 
QueryStringUrlCodingStrategy to make it work.
u suggest that i shouold use normal mounting , do u mean one of these 2 methods 
given below

mount(IRequestTargetUrlCodingStrategy encoder) 

and
mount(java.lang.String path,
  PackageName packageName)



Thanks
Haritha


- Original Message 
From: Johan Compagner [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: Thursday, January 3, 2008 10:04:39 PM
Subject: Re: BookmarkablePageLink giving a different URL


Dont use query string but use the normal mounting
Query string does exactly what it says it does it builds a query
string for params

On 1/3/08, David Shepherdson [EMAIL PROTECTED]
 wrote:
 On 3 Jan 2008, at 5.07 pm, Haritha Juturu wrote:

  I would like to get a url similar to/editor?note=123456
 
  But when i execute this code i get /editor/note/123456
  Can anyone tell me how i can get the format that i would like.

 I believe you can do this by mounting the page using a
 QueryStringUrlCodingStrategy. In your application's init() method, do
 something like:

  mount(new QueryStringUrlCodingStrategy(/editor,
 Editor.class));

 That should cause it to encode the parameters using the query string,
 rather than as part of the URL path.

 (Incidentally, it looks like the JavaDoc for
 QueryStringUrlCodingStrategy could do with an update -- it still has
 references to QueryStringRequestTargetUrlCodingStrategy, which I
 presume was the old name for the class.)

 David Shepherdson

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

Equivalent to ?php include or Jsp Include directive

2008-01-04 Thread Haritha Juturu
Hi All,
How do we achieve  ?php include or Jsp Include directive using wicket
Thanks
Haritha




  

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  
http://tools.search.yahoo.com/newsearch/category.php?category=shopping

Re: Bug in 1.3-final: CheckBox.setRequired() is not picked up as error when unchecked

2008-01-04 Thread Edvin Syse

Thanks, that solved my problem.

As of what should be default, my suggestion is to let checkRequired return 
false because:

1. 1.3 now breaks existing code. Changing it right away will spare existing 
users from agony :)
2. A new user is likely to expect a required-error if he does 
setRequired(true) on a CheckBox.

-- Edvin

Igor Vaynberg skrev:

correct, but we need to figure out what the framework default should be.

i dont really have an inclination either way

-igor


On Jan 4, 2008 9:06 AM, Martijn Dashorst [EMAIL PROTECTED] wrote:

Whatever the resolution, Edvin can override checkRequired on that
checkbox of his and return false as I understand it?

Martijn


On Jan 4, 2008 5:40 PM, Matej Knopp [EMAIL PROTECTED] wrote:

I'm not sure either. It can be convenient, when you have for example a
license agreement. Then you just call checkbox.setRequired(true) and
you're done. What are the cons?

-Matej


On Jan 4, 2008 5:33 PM, Igor Vaynberg [EMAIL PROTECTED] wrote:

hmm, that was actually a request:
https://issues.apache.org/jira/browse/WICKET-1221

not sure what to do here...

-igor



On Jan 4, 2008 7:49 AM, Edvin Syse [EMAIL PROTECTED] wrote:

I just filed: https://issues.apache.org/jira/browse/WICKET-1260

I'm on a deadline for a project and this makes it impossible for me to
deploy. Can anyone think of a workaround I could use in the meantime?

Sincerely,
Edvin Syse

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [wicket-security] LDAP integration?

2008-01-04 Thread William Hoover
I'm with you... it doesn't seem to be too difficult to get the mapping between 
ldap/swarm working. I am attempting to try it out in a simple application. 
However, I am receiving a NullPointerException in WaspSession because the 
StrategyFactory is not instantiated. Is there something else that needs to be 
down in the SwarmWebApplication (following the instructions from 
http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm)?

public WaspSession(WaspApplication application, Request request)
{
super(request);
securityStrategy = 
application.getStrategyFactory().newStrategy(); // throws npe
}

-Original Message-
From: Maurice Marrink [mailto:[EMAIL PROTECTED]
Sent: Friday, January 04, 2008 11:16 AM
To: users@wicket.apache.org
Subject: Re: [wicket-security] LDAP integration?


I think there will be one more beta before we do the final.
I recently made some changes to boost performance and a public beta
for that will be better. Even though we are already using it in our
apps without problems through the snapshot release.
With any luck the 2nd beta will be released this weekend and the final
will probably follow soon after.

Well the slightly more complex route is connecting to ldap yourself
(option number 1 in my previous mail).
Personally i think the mapping between ldap and swarm will be a
breeze. because a swarm principal is basically just a name.

Maurice

On Jan 4, 2008 3:43 PM, William Hoover [EMAIL PROTECTED] wrote:
 Thanks for the info. We are not using Spring (opted for Plexus) so I'm not 
 sure how plausible it will be to implement the easiest solution in our case. 
 The application in question is still in the preliminary evaluation stage so 
 we may have to look for another route.

 Do you have a roadmap/timeline on a release date for wicket-security?


 -Original Message-
 From: Maurice Marrink [mailto:[EMAIL PROTECTED]
 Sent: Friday, January 04, 2008 8:36 AM
 To: users@wicket.apache.org
 Subject: Re: [wicket-security] LDAP integration?


 Yes and not exactly.

 wicket-security is build with plugability in mind, meaning if it does
 not yet exist you can build it yourself quite easily.
 Regarding LDAP, i myself have never worked with it but there are a
 couple of options you can try
 -use swarm and map ldap permissions to swarm principals
 -use swarm with acegi and let acegi handle the ldap part, you still
 need to map acegi permissions to swarm principals though but it saves
 you from having to do all the ldap connection stuff yourself
 -use wasp and build your own ldap implementation, more work but also
 more control

 As for the ldap example part, i am afraid you are somewhat on your own.
 There is however an example showing how to integrate swarm with acegi
 http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
 and there is an other example showing wicket-auth-roles acegi and ldap
 http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
 So if you rip the ldap config from the last example and use it in the
 first example instead of the TestingAuthenticationProvider you should
 be ready to go
 The example also has some suggestion on how you could do your own ldap
 permission mapping if you choose to go that way.

 If you decide to go all out and build directly on wasp you should take
 a look at swarm itself a a reference, just ignore all the stuff about
 permissions, principals, subjects and stuff.

 Maurice

 On Jan 4, 2008 2:15 PM, William Hoover [EMAIL PROTECTED] wrote:
  Can wicket-security be used with LDAP? If so, are there any examples 
  available demonstrating its use?
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [wicket-security] LDAP integration?

2008-01-04 Thread William Hoover
Never mind... I wasn't calling super.init() when I was overriding init() in 
SwarmWebApplication impl

-Original Message-
From: William Hoover [mailto:[EMAIL PROTECTED]
Sent: Friday, January 04, 2008 1:14 PM
To: users@wicket.apache.org
Subject: RE: [wicket-security] LDAP integration?


I'm with you... it doesn't seem to be too difficult to get the mapping between 
ldap/swarm working. I am attempting to try it out in a simple application. 
However, I am receiving a NullPointerException in WaspSession because the 
StrategyFactory is not instantiated. Is there something else that needs to be 
down in the SwarmWebApplication (following the instructions from 
http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm)?

public WaspSession(WaspApplication application, Request request)
{
super(request);
securityStrategy = 
application.getStrategyFactory().newStrategy(); // throws npe
}

-Original Message-
From: Maurice Marrink [mailto:[EMAIL PROTECTED]
Sent: Friday, January 04, 2008 11:16 AM
To: users@wicket.apache.org
Subject: Re: [wicket-security] LDAP integration?


I think there will be one more beta before we do the final.
I recently made some changes to boost performance and a public beta
for that will be better. Even though we are already using it in our
apps without problems through the snapshot release.
With any luck the 2nd beta will be released this weekend and the final
will probably follow soon after.

Well the slightly more complex route is connecting to ldap yourself
(option number 1 in my previous mail).
Personally i think the mapping between ldap and swarm will be a
breeze. because a swarm principal is basically just a name.

Maurice

On Jan 4, 2008 3:43 PM, William Hoover [EMAIL PROTECTED] wrote:
 Thanks for the info. We are not using Spring (opted for Plexus) so I'm not 
 sure how plausible it will be to implement the easiest solution in our case. 
 The application in question is still in the preliminary evaluation stage so 
 we may have to look for another route.

 Do you have a roadmap/timeline on a release date for wicket-security?


 -Original Message-
 From: Maurice Marrink [mailto:[EMAIL PROTECTED]
 Sent: Friday, January 04, 2008 8:36 AM
 To: users@wicket.apache.org
 Subject: Re: [wicket-security] LDAP integration?


 Yes and not exactly.

 wicket-security is build with plugability in mind, meaning if it does
 not yet exist you can build it yourself quite easily.
 Regarding LDAP, i myself have never worked with it but there are a
 couple of options you can try
 -use swarm and map ldap permissions to swarm principals
 -use swarm with acegi and let acegi handle the ldap part, you still
 need to map acegi permissions to swarm principals though but it saves
 you from having to do all the ldap connection stuff yourself
 -use wasp and build your own ldap implementation, more work but also
 more control

 As for the ldap example part, i am afraid you are somewhat on your own.
 There is however an example showing how to integrate swarm with acegi
 http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
 and there is an other example showing wicket-auth-roles acegi and ldap
 http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
 So if you rip the ldap config from the last example and use it in the
 first example instead of the TestingAuthenticationProvider you should
 be ready to go
 The example also has some suggestion on how you could do your own ldap
 permission mapping if you choose to go that way.

 If you decide to go all out and build directly on wasp you should take
 a look at swarm itself a a reference, just ignore all the stuff about
 permissions, principals, subjects and stuff.

 Maurice

 On Jan 4, 2008 2:15 PM, William Hoover [EMAIL PROTECTED] wrote:
  Can wicket-security be used with LDAP? If so, are there any examples 
  available demonstrating its use?
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Wicket Session and threading

2008-01-04 Thread Dan Kaplan
To me it seems like it would be an unusual situation for two threads to
access the session at the same time.  Under what circumstances does this
happen?

-Original Message-
From: Eelco Hillenius [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 03, 2008 10:15 PM
To: users@wicket.apache.org
Subject: Re: Wicket Session and threading

You're right, we should mention this in WIA. Would you mind leaving a
comment on the author forum?
http://www.manning-sandbox.com/forum.jspa?forumID=328

Cheers,

Eelco

On Jan 3, 2008 11:10 PM, Sebastiaan van Erk [EMAIL PROTECTED] wrote:

 Eelco Hillenius wrote:
  Am I right in concluding that I must make my wicket session
thread-safe?
 
  That is, if I want to store an int value in the session, I should use
  a volatile or AtomicInteger?
 
  Yes. We try our best to make pages/ components as thread safe as
  possible, but making the session thread safe would impose a too large
  performance penalty.
 
  Is there anywhere a small piece on how to deal with threading within
  Wicket (i.e., what is/is not synchronized in a request/response
  roundtrip?). I did some quick searching in the mailing list archives
and
  google, but could not find anything related to version 1.3.
 
  Pages are synced on pagemaps, which basically relates to browser
  windows. RequestCycles are separate instances which are not reused, so
  no sync needed there. Sessions are not synced so you need to sync
  manually. Though in practice this wouldn't give much trouble to start
  with. Applications are shared an not synced.
 
  Eelco

 Thanks for the answer. :-)

 Before really thinking about it I kind of implicitly assumed that
 session access was synced. It hasn't really gone wrong yet either, but
 that's probably because of the use of ThreadLocal which acts as a memory
 barrier (for session/application) and the fact that it's very hard to
 get two threads to interleave within one session unless you start having
 a fit on the mouse (or use lots of autoupdating ajaxy stuff).

 It could be (very) useful to have this info in the Wicket in Action book
 though. For example in listing 2.1 there is a Session object with a
 get/setUser, but it is completely unsynchronized; similarly, there is no
 synchronization at all on the Cheesr session. Again the visibility seems
 to be ensured by the fact that the session is set in a thread local, but
 the code somehow seems to suggest (to me anyway) that no synchronization
 is necessary...

 There are some comments on multithreadedness and threads (2.3; but in
 the context of detaching, not thread-safety, and 4.1.1 in the context of
 the Application object). However it also says (in 4.1.1) that all is
 safe if the Application only has read-only properties, however, in the
 CheesrApplication the list of cheeses is not final. This must mean that
 Wicket does ensure visibility (or else it's a bug ;-)), but that is not
 trivial and should probably be mentioned.

 Regards,
 Sebastiaan


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [wicket-security] LDAP integration?

2008-01-04 Thread William Hoover
I do have another question...

According to the documentation one should not extend SecureWebPage for the 
login page (makes sense), but if you have a decorator that is used on all of 
your pages (including the login page) how can you accomplish this? For example:

Example 1:
AbstractBasePage extends SecureWebPage (wrapper)

LoginPage extends AbstractBasePage (will not work)
OtherPage1 extends AbstractBasePage
OtherPage2 extends AbstractBasePage
...

Example 2:
AbstractBasePage extends WebPage (wrapper)

LoginPage extends AbstractBasePage 
OtherPage1 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
OtherPage2 extends ? (cannot extend both AbstractBasePage and SecureWebPage)
...

-Original Message-
From: William Hoover [mailto:[EMAIL PROTECTED]
Sent: Friday, January 04, 2008 1:24 PM
To: users@wicket.apache.org
Subject: RE: [wicket-security] LDAP integration?


Never mind... I wasn't calling super.init() when I was overriding init() in 
SwarmWebApplication impl

-Original Message-
From: William Hoover [mailto:[EMAIL PROTECTED]
Sent: Friday, January 04, 2008 1:14 PM
To: users@wicket.apache.org
Subject: RE: [wicket-security] LDAP integration?


I'm with you... it doesn't seem to be too difficult to get the mapping between 
ldap/swarm working. I am attempting to try it out in a simple application. 
However, I am receiving a NullPointerException in WaspSession because the 
StrategyFactory is not instantiated. Is there something else that needs to be 
down in the SwarmWebApplication (following the instructions from 
http://wicketstuff.org/confluence/display/STUFFWIKI/Getting+started+with+Swarm)?

public WaspSession(WaspApplication application, Request request)
{
super(request);
securityStrategy = 
application.getStrategyFactory().newStrategy(); // throws npe
}

-Original Message-
From: Maurice Marrink [mailto:[EMAIL PROTECTED]
Sent: Friday, January 04, 2008 11:16 AM
To: users@wicket.apache.org
Subject: Re: [wicket-security] LDAP integration?


I think there will be one more beta before we do the final.
I recently made some changes to boost performance and a public beta
for that will be better. Even though we are already using it in our
apps without problems through the snapshot release.
With any luck the 2nd beta will be released this weekend and the final
will probably follow soon after.

Well the slightly more complex route is connecting to ldap yourself
(option number 1 in my previous mail).
Personally i think the mapping between ldap and swarm will be a
breeze. because a swarm principal is basically just a name.

Maurice

On Jan 4, 2008 3:43 PM, William Hoover [EMAIL PROTECTED] wrote:
 Thanks for the info. We are not using Spring (opted for Plexus) so I'm not 
 sure how plausible it will be to implement the easiest solution in our case. 
 The application in question is still in the preliminary evaluation stage so 
 we may have to look for another route.

 Do you have a roadmap/timeline on a release date for wicket-security?


 -Original Message-
 From: Maurice Marrink [mailto:[EMAIL PROTECTED]
 Sent: Friday, January 04, 2008 8:36 AM
 To: users@wicket.apache.org
 Subject: Re: [wicket-security] LDAP integration?


 Yes and not exactly.

 wicket-security is build with plugability in mind, meaning if it does
 not yet exist you can build it yourself quite easily.
 Regarding LDAP, i myself have never worked with it but there are a
 couple of options you can try
 -use swarm and map ldap permissions to swarm principals
 -use swarm with acegi and let acegi handle the ldap part, you still
 need to map acegi permissions to swarm principals though but it saves
 you from having to do all the ldap connection stuff yourself
 -use wasp and build your own ldap implementation, more work but also
 more control

 As for the ldap example part, i am afraid you are somewhat on your own.
 There is however an example showing how to integrate swarm with acegi
 http://wicketstuff.org/confluence/display/STUFFWIKI/Swarm+and+Acegi+HowTo
 and there is an other example showing wicket-auth-roles acegi and ldap
 http://cwiki.apache.org/WICKET/acegi-and-wicket-auth-roles.html
 So if you rip the ldap config from the last example and use it in the
 first example instead of the TestingAuthenticationProvider you should
 be ready to go
 The example also has some suggestion on how you could do your own ldap
 permission mapping if you choose to go that way.

 If you decide to go all out and build directly on wasp you should take
 a look at swarm itself a a reference, just ignore all the stuff about
 permissions, principals, subjects and stuff.

 Maurice

 On Jan 4, 2008 2:15 PM, William Hoover [EMAIL PROTECTED] wrote:
  Can wicket-security be used with LDAP? If so, are there any examples 
  available demonstrating its use?
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For 

Form binding fails when formcomponents are previously invalidated

2008-01-04 Thread Edvin Syse

Hi!

I have a form which uses a CompoundPropertyModel.

On the form I have a textfield which has a AjaxFormComponentUpdatingBehavior connected to the onblur event. When I have some data in the 
field and tab out of the field, the onblur event will update some other parts of the modelobject and add their respective components 
(textfields) to the ajax target.


This works good until I once submit the form and get one or more validation errors. After that, the changed data that occur in the onblur 
event doesn't get pushed back with the ajax target. (They just display their former data even though the model object was updated).


Can anyone think of what causes this, or should I create a testcase?

Sincerely,
Edvin Syse

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How does wicket support conditional markup display?

2008-01-04 Thread Igor Vaynberg
you would put the message inside webmarkupcontainer and override its
isvisible so it only returns true when there are no items in the list

-igor


On Jan 4, 2008 10:44 AM, Zheng, Xiahong [EMAIL PROTECTED] wrote:
 I have a page that normally display a list of items retrieved from some
 external source. The markup page will be table based in this case.
 However, when the list returned is empty, I want to display some error
 message using different markup.

 Is there a wicket component or tag I can use for this purpose?


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How does wicket support conditional markup display?

2008-01-04 Thread Zheng, Xiahong
I have a page that normally display a list of items retrieved from some
external source. The markup page will be table based in this case.
However, when the list returned is empty, I want to display some error
message using different markup. 

Is there a wicket component or tag I can use for this purpose?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Equivalent to ?php include or Jsp Include directive

2008-01-04 Thread Roland Kaercher
Hi Haritha,
just use a panel where you would have included something.

regards,
roland

On Jan 4, 2008 7:24 PM, Haritha Juturu [EMAIL PROTECTED] wrote:
 Hi All,
 How do we achieve  ?php include or Jsp Include directive using wicket
 Thanks
 Haritha




   
 
 Looking for last minute shopping deals?
 Find them fast with Yahoo! Search.  
 http://tools.search.yahoo.com/newsearch/category.php?category=shopping

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Jetty, images and 404 http

2008-01-04 Thread Fernando Wermus
I don't have any code. The css files are pointing to some images. If I
perform a

 GET http://localhost:8081/misPartidos/resources

I got the file list in the directory,

.svn
bg-ad-top.png
bg-body.png
bg-feed.gif
bg-footer.jpg
bg-header.jpg
bg-menu.png
bg-menu-hover.png
bg-sidebar-bottom.gif
bg-sidebar-top.gif
button-feed.png
icon-comment.png
images

But when I try to perform a

 GET http://localhost:8081/misPartidos/resources/bg-menu-hover.png

I got nothing. Beside, the console throws a

838661 [btpool0-2 - /misPartidos/resources/bg-menu-hover.png] DEBUG
org.mortbay.log  - RESPONSE /misPartidos/resources/bg-menu-hover.png  404

If I move up all that images,  I have access to all of them.

On Jan 4, 2008 9:41 AM, Michael Sparer  [EMAIL PROTECTED]  wrote:


 that's not a permission problem, jetty just can't find the stuff, please
 provide some code that generates the 404 error



 Fernando Wermus-2 wrote:
 
  Jetty is not allowing to download the resources of my pages. It dumps
 this
  into the log,
 
  42150 [btpool0-1 - /misPartidos/resources/bg-header.jpg] DEBUG
  org.mortbay.log  - RESPONSE /misPartidos/resources/bg-header.jpg  404
  42150 [btpool0-1 - /misPartidos/resources/bg- header.jpg] DEBUG
  org.mortbay.log  - RESPONSE /misPartidos/resources/bg-header.jpg  404
  42150 [btpool0-1 - /misPartidos/resources/bg-header.jpg] DEBUG
  org.mortbay.log  - RESPONSE /misPartidos/resources/bg- header.jpg  404
 
  I was trying to figure it out if it is a linux permission problem or a
  problem from jetty itself.
 
  Thanks a lot!
 
  --
  Fernando Wermus.
 
 


 -
 Michael Sparer
 http://talk-on-tech.blogspot.com
 --
 View this message in context:
 http://www.nabble.com/Jetty%2C-images-and-404-http-tp14605929p14614654.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
Fernando Wermus.


Migration issue from 1.2.6 to 1.3

2008-01-04 Thread Andrew Berman
Hey guys,

I am having an issue migrating from 1.2.6 to 1.3.  I changed my Application
class so it would compile for 1.3 and the method in question is
newRequestCycle(Request request, Response response).  Before I was looking
at the URL and based on the URL selecting a skin for the site and logging in
as a particular user which creates the new session.  With 1.3 I am now
getting an exception of java.lang.IllegalStateException: you can only locate
or create sessions in the context of a request cycle.  Is there some other
method I can use to do the URL testing and creating of the session?

Thanks,

Andew


Re: Jetty, images and 404 http

2008-01-04 Thread Fernando Wermus
Michael,
  I have changed the images to another directory and it is working
right now. I don't know the reason of this behavior but It is solved.

Thanks a lot.

On Jan 4, 2008 4:43 PM, Fernando Wermus [EMAIL PROTECTED] wrote:

 I don't have any code. The css files are pointing to some images. If I
 perform a

  GET http://localhost:8081/misPartidos/resources

 I got the file list in the directory,

 .svn
 bg-ad-top.png
 bg-body.png
 bg-feed.gif
 bg-footer.jpg
 bg-header.jpg
 bg-menu.png
 bg-menu-hover.png
 bg-sidebar-bottom.gif
 bg-sidebar-top.gif
 button-feed.png
 icon-comment.png
 images

 But when I try to perform a

  GET http://localhost:8081/misPartidos/resources/bg-menu-hover.png

 I got nothing. Beside, the console throws a

 838661 [btpool0-2 - /misPartidos/resources/bg-menu-hover.png] DEBUG
 org.mortbay.log  - RESPONSE /misPartidos/resources/bg-menu-hover.png  404

 If I move up all that ima ges,  I have access to all of them.


 On Jan 4, 2008 9:41 AM, Michael Sparer  [EMAIL PROTECTED]  wrote:

 
  that's not a permission problem, jetty just can't find the stuff, please
 
  provide some code that generates the 404 error
 
 
 
  Fernando Wermus-2 wrote:
  
   Jetty is not allowing to download the resources of my pages. It dumps
  this
   into the log,
  
   42150 [btpool0-1 - /misPartidos/resources/bg-header.jpg] DEBUG
   org.mortbay.log  - RESPONSE /misPartidos/resources/bg-header.jpg  404
   42150 [btpool0-1 - /misPartidos/resources/bg- header.jpg] DEBUG
   org.mortbay.log  - RESPONSE /misPartidos/resources/bg-header.jpg  404
   42150 [btpool0-1 - /misPartidos/resources/bg-header.jpg] DEBUG
   org.mortbay.log  - RESPONSE /misPartidos/resources/bg- header.jpg  404
  
   I was trying to figure it out if it is a linux permission problem or a
   problem from jetty itself.
  
   Thanks a lot!
  
   --
   Fernando Wermus.
  
  
 
 
  -
  Michael Sparer
  http://talk-on-tech.blogspot.com
  --
  View this message in context:
  http://www.nabble.com/Jetty%2C-images-and-404-http-tp14605929p14614654.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Fernando Wermus.




-- 
Fernando Wermus.


Re: Form binding fails when formcomponents are previously invalidated

2008-01-04 Thread Igor Vaynberg
create a testcase please

-igor


On Jan 4, 2008 11:52 AM, Edvin Syse [EMAIL PROTECTED] wrote:
 Hi!

 I have a form which uses a CompoundPropertyModel.

 On the form I have a textfield which has a AjaxFormComponentUpdatingBehavior 
 connected to the onblur event. When I have some data in the
 field and tab out of the field, the onblur event will update some other parts 
 of the modelobject and add their respective components
 (textfields) to the ajax target.

 This works good until I once submit the form and get one or more validation 
 errors. After that, the changed data that occur in the onblur
 event doesn't get pushed back with the ajax target. (They just display their 
 former data even though the model object was updated).

 Can anyone think of what causes this, or should I create a testcase?

 Sincerely,
 Edvin Syse

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Clear Localizer Cache

2008-01-04 Thread marcus dickerhof
Hello,
is there a possiblity to globally clear the localizer cache?
I have a database stringresource, which might get updated.
If that happens I do not want to restart the application.
I want to have button with which I can clear the cache.

Thanks!

Best regards
Marcus


Re: Form binding fails when formcomponents are previously invalidated

2008-01-04 Thread Edvin Syse

I created a standard quickstart project and added this to HomePage.java:

public class HomePage extends WebPage {
private ModelObject o = new ModelObject();

public HomePage(final PageParameters parameters) {
add(new FeedbackPanel(feedback));
Form f = new Form(f, new CompoundPropertyModel(o));
add(f);

final TextField name = new TextField(name, Integer.class);
name.setRequired(true);
name.setOutputMarkupId(true);
f.add(name);

final TextField number = new TextField(number);
number.add(new AjaxFormComponentUpdatingBehavior(onblur) {
@Override protected void onUpdate(AjaxRequestTarget 
target) {
o.setName(Number  + 
number.getConvertedInput());
target.addComponent(name);
}
});
f.add(number);

f.add(new Button(submit));
}

class ModelObject implements Serializable {
private Integer number;
private String name;

public Integer getNumber() {
return number;
}
public void setNumber(Integer number) {
this.number = number;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
}

And the HomePage.html:

html xmlns:wicket=http://wicket.apache.org;
body
div wicket:id=feedbackFeedback/div

form wicket:id=f
fieldset
p
labelNumber/label
input type=text wicket:id=number /
/p

p
labelName/label
input type=text wicket:id=name /
/p
/fieldset

input type=submit wicket:id=submit /

/form
/body
/html


If you add a number and press tab, the name input will display Name number.
Works good until you try to submit once without a value in the name input, and get the 
validation message Field 'name' is required..

After that, name will not be updated if you tab out of number.

-- Edvin


Igor Vaynberg skrev:

create a testcase please

-igor


On Jan 4, 2008 11:52 AM, Edvin Syse [EMAIL PROTECTED] wrote:

Hi!

I have a form which uses a CompoundPropertyModel.

On the form I have a textfield which has a AjaxFormComponentUpdatingBehavior 
connected to the onblur event. When I have some data in the
field and tab out of the field, the onblur event will update some other parts 
of the modelobject and add their respective components
(textfields) to the ajax target.

This works good until I once submit the form and get one or more validation 
errors. After that, the changed data that occur in the onblur
event doesn't get pushed back with the ajax target. (They just display their 
former data even though the model object was updated).

Can anyone think of what causes this, or should I create a testcase?

Sincerely,
Edvin Syse

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Form binding fails when formcomponents are previously invalidated

2008-01-04 Thread Edvin Syse

Oups, Integer.class should be on the number field, not the name field :) 
Doesn't really matter though, it still blows up :)

-- Edvin

Edvin Syse skrev:

I created a standard quickstart project and added this to HomePage.java:

public class HomePage extends WebPage {
private ModelObject o = new ModelObject();

public HomePage(final PageParameters parameters) {

add(new FeedbackPanel(feedback));
Form f = new Form(f, new CompoundPropertyModel(o));
add(f);
   
final TextField name = new TextField(name, Integer.class);

name.setRequired(true);
name.setOutputMarkupId(true);
f.add(name);
   
final TextField number = new TextField(number);

number.add(new AjaxFormComponentUpdatingBehavior(onblur) {
@Override protected void onUpdate(AjaxRequestTarget target) {
o.setName(Number  + number.getConvertedInput());
target.addComponent(name);
}
});
f.add(number);
   
f.add(new Button(submit));

}

class ModelObject implements Serializable {
private Integer number;
private String name;
   
public Integer getNumber() {

return number;
}
public void setNumber(Integer number) {
this.number = number;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
}

And the HomePage.html:

html xmlns:wicket=http://wicket.apache.org;
body
div wicket:id=feedbackFeedback/div
   
form wicket:id=f

fieldset
p
labelNumber/label
input type=text wicket:id=number /
/p
   
p

labelName/label
input type=text wicket:id=name /
/p
/fieldset
   
input type=submit wicket:id=submit /
   
/form

/body
/html


If you add a number and press tab, the name input will display Name 
number.
Works good until you try to submit once without a value in the name 
input, and get the validation message Field 'name' is required..


After that, name will not be updated if you tab out of number.

-- Edvin


Igor Vaynberg skrev:

create a testcase please

-igor


On Jan 4, 2008 11:52 AM, Edvin Syse [EMAIL PROTECTED] wrote:

Hi!

I have a form which uses a CompoundPropertyModel.

On the form I have a textfield which has a 
AjaxFormComponentUpdatingBehavior connected to the onblur event. When 
I have some data in the
field and tab out of the field, the onblur event will update some 
other parts of the modelobject and add their respective components

(textfields) to the ajax target.

This works good until I once submit the form and get one or more 
validation errors. After that, the changed data that occur in the onblur
event doesn't get pushed back with the ajax target. (They just 
display their former data even though the model object was updated).


Can anyone think of what causes this, or should I create a testcase?

Sincerely,
Edvin Syse

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Form binding fails when formcomponents are previously invalidated

2008-01-04 Thread Edvin Syse

Just found out that calling valid() for the components before returning does 
the trick, but I guess that's not the correct approach. I added:

f.visitChildren(new IVisitor() {
public Object component(Component component) {
if(component instanceof FormComponent)
((FormComponent)component).valid();
return null;
}
});

in the onUpdate method of the AjaxFormComponentUpdatingBehavior, but it feels 
kind of nasty :)

-- Edvin

Edvin Syse skrev:

I created a standard quickstart project and added this to HomePage.java:

public class HomePage extends WebPage {
private ModelObject o = new ModelObject();

public HomePage(final PageParameters parameters) {

add(new FeedbackPanel(feedback));
Form f = new Form(f, new CompoundPropertyModel(o));
add(f);
   
final TextField name = new TextField(name, Integer.class);

name.setRequired(true);
name.setOutputMarkupId(true);
f.add(name);
   
final TextField number = new TextField(number);

number.add(new AjaxFormComponentUpdatingBehavior(onblur) {
@Override protected void onUpdate(AjaxRequestTarget target) {
o.setName(Number  + number.getConvertedInput());
target.addComponent(name);
}
});
f.add(number);
   
f.add(new Button(submit));

}

class ModelObject implements Serializable {
private Integer number;
private String name;
   
public Integer getNumber() {

return number;
}
public void setNumber(Integer number) {
this.number = number;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
}

And the HomePage.html:

html xmlns:wicket=http://wicket.apache.org;
body
div wicket:id=feedbackFeedback/div
   
form wicket:id=f

fieldset
p
labelNumber/label
input type=text wicket:id=number /
/p
   
p

labelName/label
input type=text wicket:id=name /
/p
/fieldset
   
input type=submit wicket:id=submit /
   
/form

/body
/html


If you add a number and press tab, the name input will display Name 
number.
Works good until you try to submit once without a value in the name 
input, and get the validation message Field 'name' is required..


After that, name will not be updated if you tab out of number.

-- Edvin


Igor Vaynberg skrev:

create a testcase please

-igor


On Jan 4, 2008 11:52 AM, Edvin Syse [EMAIL PROTECTED] wrote:

Hi!

I have a form which uses a CompoundPropertyModel.

On the form I have a textfield which has a 
AjaxFormComponentUpdatingBehavior connected to the onblur event. When 
I have some data in the
field and tab out of the field, the onblur event will update some 
other parts of the modelobject and add their respective components

(textfields) to the ajax target.

This works good until I once submit the form and get one or more 
validation errors. After that, the changed data that occur in the onblur
event doesn't get pushed back with the ajax target. (They just 
display their former data even though the model object was updated).


Can anyone think of what causes this, or should I create a testcase?

Sincerely,
Edvin Syse

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems Refreshin a Image from AjaxLink

2008-01-04 Thread Loren Cole
I haven't found anything that does a good job covering Wicket 1.3 and I
haven't looked at books which cover older versions.  There is Enjoying Web
Development With Wicket which is available as an ebook, but it is really a
series of how-to's - fairly superficial, with no real discussion of how the
guts of the thing work or best practices.

Wicket in Action is definitely a long way from finished but the available
chapters do provide a good grounding in fundamental concepts like models and
page layout/navigation.

On Dec 22, 2007 2:50 PM, Marco Santos [EMAIL PROTECTED] wrote:


 Thanks a lot! I worked!

 Tell me, do you know a good book about wicket? I have red the 1st chapter
 o
 Wicket in Action from manning and it seams nice, but it is not finished
 yet.

 Thanks again!

 --ms


 Matej Knopp-2 wrote:
 
  Image doesn't change because it's being cached by the browser.
  To ensure that browser doesn't cache the image you need to append a
  string to url that changes on every refresh.
  Just like NonCachingImage does.
 
  -Matej
 
  On Dec 22, 2007 8:53 PM, Marco Santos [EMAIL PROTECTED] wrote:
 
  Hello there!
 
  I'm with problems refreshing an Image. On my web application i'm trying
  to
  refresh or change an Image that is on a Panel. On the panel there is a
  Image
  (it is rendered the first time) and a label. Outside the panel i have
  AjaxLink's (that are images too) that refresh the panel, and
 consequently
  the components on it, the image and the label. when the link is
 clicked,
  the
  label e refreshed with the new text, but the image still the same. The
  code
  is the following:
 
  /**
   *The Panel with the image to be refreshed:
   *(the label on the panel is freshed when the link is pressed.
   **/
  public class PhotoPanel extends Panel {
  /** Creates a new instance of PhotoPanel*/
  public PhotoPanel(String id, byte[] photoData, int size, Integer
  index)
  {
  super(id);
  setOutputMarkupId(true);
 
  MyImage mainPhoto = new MyImage(mainPhoto, photoData,
  size);//component that extends Image
  mainPhoto.setOutputMarkupId(true);
 
  Label label = new Label(index, MYLABEL:  + index.toString
 ());
 
  add(mainPhoto);
  add(label);
  }
  }
 
  /**
   * The AjaxLink's on a Parent panel that holds a panel with the links,
  and
  the panel with the image
   * to be refreshed
   **/
  private class PhotoSlideLink extends AjaxLink {
  private byte[] photoSlideData = null;
  Integer index = 0;
  public PhotoSlideLink(String id, byte[] photoSlideData ) {
  super(id);
  this.photoSlideData = photoSlideData ;
 
  MyImage photoSlide = new MyImage(photoSlide,
 photoSlideData
  ,
  100);
  add(photoSlide );
  }
 
  @Override
  public void onClick(AjaxRequestTarget ajaxRequestTarget) {
  Panel newMainPhotoPanel = new PhotoPanel(mainPhotoPanel,
  photoSlideData , MAIN_PHOTO_SIZE, index++);
  newMainPhotoPanel .setOutputMarkupId(true);
 
  /*the first PhotoPanel created when the page was loaded*/
  mainPhotoPanel.replaceWith(newMainPhotoPanel);
  mainPhotoPanel= newMainPhotoPanel ;
 
  ajaxRequestTarget.addComponent(newMainPhotoPanel);
  }
  }
 
  Does any one know why refreshing the panel, the label change, but not
 the
  image? Am i forgetting to do something?
 
  Thanks a lot
  --
  View this message in context:
 
 http://www.nabble.com/Problems-Refreshin-a-Image-from-AjaxLink-tp14472713p14472713.html
  Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Problems-Refreshin-a-Image-from-AjaxLink-tp14472713p14473189.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Wicket Session and threading

2008-01-04 Thread Frank Bille
What about (i)frames with pages being loaded in every one of them at the
same time?

Frank


On Jan 4, 2008 7:57 PM, Dan Kaplan [EMAIL PROTECTED] wrote:

 To me it seems like it would be an unusual situation for two threads to
 access the session at the same time.  Under what circumstances does this
 happen?

 -Original Message-
 From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
 Sent: Thursday, January 03, 2008 10:15 PM
 To: users@wicket.apache.org
 Subject: Re: Wicket Session and threading

 You're right, we should mention this in WIA. Would you mind leaving a
 comment on the author forum?
 http://www.manning-sandbox.com/forum.jspa?forumID=328

 Cheers,

 Eelco

 On Jan 3, 2008 11:10 PM, Sebastiaan van Erk [EMAIL PROTECTED] wrote:
 
  Eelco Hillenius wrote:
   Am I right in concluding that I must make my wicket session
 thread-safe?
  
   That is, if I want to store an int value in the session, I should
 use
   a volatile or AtomicInteger?
  
   Yes. We try our best to make pages/ components as thread safe as
   possible, but making the session thread safe would impose a too large
   performance penalty.
  
   Is there anywhere a small piece on how to deal with threading within
   Wicket (i.e., what is/is not synchronized in a request/response
   roundtrip?). I did some quick searching in the mailing list archives
 and
   google, but could not find anything related to version 1.3.
  
   Pages are synced on pagemaps, which basically relates to browser
   windows. RequestCycles are separate instances which are not reused, so
   no sync needed there. Sessions are not synced so you need to sync
   manually. Though in practice this wouldn't give much trouble to start
   with. Applications are shared an not synced.
  
   Eelco
 
  Thanks for the answer. :-)
 
  Before really thinking about it I kind of implicitly assumed that
  session access was synced. It hasn't really gone wrong yet either, but
  that's probably because of the use of ThreadLocal which acts as a memory
  barrier (for session/application) and the fact that it's very hard to
  get two threads to interleave within one session unless you start having
  a fit on the mouse (or use lots of autoupdating ajaxy stuff).
 
  It could be (very) useful to have this info in the Wicket in Action book
  though. For example in listing 2.1 there is a Session object with a
  get/setUser, but it is completely unsynchronized; similarly, there is no
  synchronization at all on the Cheesr session. Again the visibility seems
  to be ensured by the fact that the session is set in a thread local, but
  the code somehow seems to suggest (to me anyway) that no synchronization
  is necessary...
 
  There are some comments on multithreadedness and threads (2.3; but in
  the context of detaching, not thread-safety, and 4.1.1 in the context of
  the Application object). However it also says (in 4.1.1) that all is
  safe if the Application only has read-only properties, however, in the
  CheesrApplication the list of cheeses is not final. This must mean that
  Wicket does ensure visibility (or else it's a bug ;-)), but that is not
  trivial and should probably be mentioned.
 
  Regards,
  Sebastiaan
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




RE: Wicket Session and threading

2008-01-04 Thread Dan Kaplan
Yeah that makes sense.  Since we're sorta on the topic, I thought I would
ask this question.  As the User object goes from being initially registered
to its profile being edited, how does one update the User in the session and
the db simultaneously?

Here's a scenario:  A user registers with your website and later adds a
signature that is to show up on every post he makes.  

Do you add an instance of a UserService to your WebSession and then have
this in it:

private User user;

public synchronized void setUser(User updatedUser) {
  userService.updateUser(updatedUser);
  this.user = updatedUser;
}

public synchronized User getUser() {
  return this.user;
}

?  Cause I've been doing something like that.  Is there a better way to go
about this?  


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Frank Bille
Sent: Friday, January 04, 2008 2:02 PM
To: users@wicket.apache.org
Subject: Re: Wicket Session and threading

What about (i)frames with pages being loaded in every one of them at the
same time?

Frank


On Jan 4, 2008 7:57 PM, Dan Kaplan [EMAIL PROTECTED] wrote:

 To me it seems like it would be an unusual situation for two threads to
 access the session at the same time.  Under what circumstances does this
 happen?

 -Original Message-
 From: Eelco Hillenius [mailto:[EMAIL PROTECTED]
 Sent: Thursday, January 03, 2008 10:15 PM
 To: users@wicket.apache.org
 Subject: Re: Wicket Session and threading

 You're right, we should mention this in WIA. Would you mind leaving a
 comment on the author forum?
 http://www.manning-sandbox.com/forum.jspa?forumID=328

 Cheers,

 Eelco

 On Jan 3, 2008 11:10 PM, Sebastiaan van Erk [EMAIL PROTECTED] wrote:
 
  Eelco Hillenius wrote:
   Am I right in concluding that I must make my wicket session
 thread-safe?
  
   That is, if I want to store an int value in the session, I should
 use
   a volatile or AtomicInteger?
  
   Yes. We try our best to make pages/ components as thread safe as
   possible, but making the session thread safe would impose a too large
   performance penalty.
  
   Is there anywhere a small piece on how to deal with threading within
   Wicket (i.e., what is/is not synchronized in a request/response
   roundtrip?). I did some quick searching in the mailing list archives
 and
   google, but could not find anything related to version 1.3.
  
   Pages are synced on pagemaps, which basically relates to browser
   windows. RequestCycles are separate instances which are not reused, so
   no sync needed there. Sessions are not synced so you need to sync
   manually. Though in practice this wouldn't give much trouble to start
   with. Applications are shared an not synced.
  
   Eelco
 
  Thanks for the answer. :-)
 
  Before really thinking about it I kind of implicitly assumed that
  session access was synced. It hasn't really gone wrong yet either, but
  that's probably because of the use of ThreadLocal which acts as a memory
  barrier (for session/application) and the fact that it's very hard to
  get two threads to interleave within one session unless you start having
  a fit on the mouse (or use lots of autoupdating ajaxy stuff).
 
  It could be (very) useful to have this info in the Wicket in Action book
  though. For example in listing 2.1 there is a Session object with a
  get/setUser, but it is completely unsynchronized; similarly, there is no
  synchronization at all on the Cheesr session. Again the visibility seems
  to be ensured by the fact that the session is set in a thread local, but
  the code somehow seems to suggest (to me anyway) that no synchronization
  is necessary...
 
  There are some comments on multithreadedness and threads (2.3; but in
  the context of detaching, not thread-safety, and 4.1.1 in the context of
  the Application object). However it also says (in 4.1.1) that all is
  safe if the Application only has read-only properties, however, in the
  CheesrApplication the list of cheeses is not final. This must mean that
  Wicket does ensure visibility (or else it's a bug ;-)), but that is not
  trivial and should probably be mentioned.
 
  Regards,
  Sebastiaan
 

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Clear Localizer Cache

2008-01-04 Thread Matej Knopp
Application.getResourceSettings().getLocalizer().clearCache() might do
the trick.

-Matej

On Jan 4, 2008 9:00 PM, marcus dickerhof [EMAIL PROTECTED] wrote:
 Hello,
 is there a possiblity to globally clear the localizer cache?
 I have a database stringresource, which might get updated.
 If that happens I do not want to restart the application.
 I want to have button with which I can clear the cache.

 Thanks!

 Best regards
 Marcus


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Why dioes this error occur?

2008-01-04 Thread wicket21

We solved more or less the same problem by 

a) reading the Ajax - Links Example  (get the starting point: use
AjaxCallDecorator)
b) finding/writing a js function to display a layer to cover all the visible
area of the window + disallow any user clicks (similar behaviour as the
layer behind the modal window)
c) calling this js function before the ajax call
d) calling some more js code to hide the extra layer after the ajax call

Step d is not needed when u r using setResponsePage.

I think using target.append/prependJavascript might do the job as well.

Regards,
Konstantinos



salmas wrote:
 
 
 It seems that this is a common bug, there is a thread titled
 Doubleclicking on a refreshable Ajax button which appears to be similar.
 I am using an AjaxSubmitButton in my application and double clicks and
 fast clicks are an issue. 
 I have followed the sugggestions to use javascript to disable the button
 between clicks and while this reduced the frequency it still does occur
 from time to time. We cannot move to my application to prodution like this
 and my manager does not want this application to have to go to a newer
 wicket since we'll have to start from scratch with testing. Would it be
 possible to release a patch for older releases such as wicket-1.2.6? This
 would be huge for my project.
 
 Regards
 
 
 serban.balamaci wrote:
 
 Hi. Well in my case this error apeared when the user clicked on a link
 that was directing the user to the next page, and while the user did not
 wait for the other page to load, or he thought that he did not press the
 mouse button and he clicked again. The server saw that the
 component(link) was no longer in the the new page and therefore the
 nullpointer. (Or that's how i explained it to myself). I got around this
 by disabling the link after the clicking.
 
 
 
 salmas wrote:
 
 Every once in awhile if I am clicking around for awhile in the UI of my
 application I get the following error. What causes this?
 
 java.lang.NullPointerException
 at
 wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveListenerInterfaceTarget(DefaultRequestTargetResolverStrategy.java:295)
 at
 wicket.request.compound.DefaultRequestTargetResolverStrategy.resolveRenderedPage(DefaultRequestTargetResolverStrategy.java:228)
 at
 wicket.request.compound.DefaultRequestTargetResolverStrategy.resolve(DefaultRequestTargetResolverStrategy.java:153)
 at
 wicket.request.compound.AbstractCompoundRequestCycleProcessor.resolve(AbstractCompoundRequestCycleProcessor.java:48)
 at wicket.RequestCycle.step(RequestCycle.java:992)
 at wicket.RequestCycle.steps(RequestCycle.java:1084)
 at wicket.RequestCycle.request(RequestCycle.java:454)
 at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219)
 at wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:262)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
 weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
 at
 weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
 at
 weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
 at
 weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6981)
 at
 weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
 at
 weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
 at
 weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892)
 at
 weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766)
 at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
 at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
 
 
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Why-dioes-this-error-occur--tp13633697p14627974.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Form binding fails when formcomponents are previously invalidated

2008-01-04 Thread Igor Vaynberg
ajaxformcomponentupdatingbehavior (AB) is really made for isolated
component updates. because you are tweaking more then one component
you need to process the components that AB is not attached to
manually. this involves calling valid() and all that yourself.

alternatively you can use AjaxFormSubmitBehavior which will properly
process the entire form.

-igor


On Jan 4, 2008 12:47 PM, Edvin Syse [EMAIL PROTECTED] wrote:
 Just found out that calling valid() for the components before returning does 
 the trick, but I guess that's not the correct approach. I added:

 f.visitChildren(new IVisitor() {
 public Object component(Component component) {
 if(component instanceof FormComponent)
 ((FormComponent)component).valid();
 return null;
 }
 });

 in the onUpdate method of the AjaxFormComponentUpdatingBehavior, but it feels 
 kind of nasty :)

 -- Edvin

 Edvin Syse skrev:

  I created a standard quickstart project and added this to HomePage.java:
 
  public class HomePage extends WebPage {
  private ModelObject o = new ModelObject();
 
  public HomePage(final PageParameters parameters) {
  add(new FeedbackPanel(feedback));
  Form f = new Form(f, new CompoundPropertyModel(o));
  add(f);
 
  final TextField name = new TextField(name, Integer.class);
  name.setRequired(true);
  name.setOutputMarkupId(true);
  f.add(name);
 
  final TextField number = new TextField(number);
  number.add(new AjaxFormComponentUpdatingBehavior(onblur) {
  @Override protected void onUpdate(AjaxRequestTarget target) {
  o.setName(Number  + number.getConvertedInput());
  target.addComponent(name);
  }
  });
  f.add(number);
 
  f.add(new Button(submit));
  }
 
  class ModelObject implements Serializable {
  private Integer number;
  private String name;
 
  public Integer getNumber() {
  return number;
  }
  public void setNumber(Integer number) {
  this.number = number;
  }
  public String getName() {
  return name;
  }
  public void setName(String name) {
  this.name = name;
  }
  }
  }
 
  And the HomePage.html:
 
  html xmlns:wicket=http://wicket.apache.org;
  body
  div wicket:id=feedbackFeedback/div
 
  form wicket:id=f
  fieldset
  p
  labelNumber/label
  input type=text wicket:id=number /
  /p
 
  p
  labelName/label
  input type=text wicket:id=name /
  /p
  /fieldset
 
  input type=submit wicket:id=submit /
 
  /form
  /body
  /html
 
 
  If you add a number and press tab, the name input will display Name
  number.
  Works good until you try to submit once without a value in the name
  input, and get the validation message Field 'name' is required..
 
  After that, name will not be updated if you tab out of number.
 
  -- Edvin
 
 
  Igor Vaynberg skrev:
  create a testcase please
 
  -igor
 
 
  On Jan 4, 2008 11:52 AM, Edvin Syse [EMAIL PROTECTED] wrote:
  Hi!
 
  I have a form which uses a CompoundPropertyModel.
 
  On the form I have a textfield which has a
  AjaxFormComponentUpdatingBehavior connected to the onblur event. When
  I have some data in the
  field and tab out of the field, the onblur event will update some
  other parts of the modelobject and add their respective components
  (textfields) to the ajax target.
 
  This works good until I once submit the form and get one or more
  validation errors. After that, the changed data that occur in the onblur
  event doesn't get pushed back with the ajax target. (They just
  display their former data even though the model object was updated).
 
  Can anyone think of what causes this, or should I create a testcase?
 
  Sincerely,
  Edvin Syse
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket Session and threading

2008-01-04 Thread Eelco Hillenius
On Jan 5, 2008 5:02 AM, Frank Bille [EMAIL PROTECTED] wrote:
 What about (i)frames with pages being loaded in every one of them at the
 same time?

Or images that are resources for instance.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket Session and threading

2008-01-04 Thread Eelco Hillenius
On Jan 5, 2008 5:15 AM, Dan Kaplan [EMAIL PROTECTED] wrote:
 Yeah that makes sense.  Since we're sorta on the topic, I thought I would
 ask this question.  As the User object goes from being initially registered
 to its profile being edited, how does one update the User in the session and
 the db simultaneously?

 Here's a scenario:  A user registers with your website and later adds a
 signature that is to show up on every post he makes.

 Do you add an instance of a UserService to your WebSession and then have
 this in it:

 private User user;

 public synchronized void setUser(User updatedUser) {
   userService.updateUser(updatedUser);
   this.user = updatedUser;
 }

 public synchronized User getUser() {
   return this.user;
 }

 ?  Cause I've been doing something like that.  Is there a better way to go
 about this?


Looks fine to me.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problems Refreshin a Image from AjaxLink

2008-01-04 Thread Eelco Hillenius
 Wicket in Action is definitely a long way from finished

Not really... we're working on the last chapter now.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [ANNOUNCE] Apache Wicket 1.3 released

2008-01-04 Thread Eelco Hillenius
And thanks team and community. I feel that Apache Wicket is a text
book example of a successful open source project: a diverse and
enthusiastic team who don't feel above the rest of the community, and
a user base with plenty of people helping out with the lists, issues,
WIKI, etc. Thanks all!

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]