Re: Like to override normal page mapping but setResponsePage(...) is final

2009-05-06 Thread Steve Flasby

Hi Igor, thanks.
Yeah, there is no other choice given the final methods. A bit of a shame
really, as having this work uniformly will depend on us all remembering
to do this instead of simply calling setResponse() directly.

Just out of interest, does anyone know why this method is final?


Cheers - Steve


Igor Vaynberg wrote:

setResponsePage(MyApplicaton.getCustomizedPageXClass(), .., ..)

-igor

On Tue, May 5, 2009 at 12:15 AM, Steve Flasby st...@flasby.org wrote:

Chaps,
We have a requirement to customize certain pages depending on the
installation. My approach is to subclass the pages needing customization
and put the difference in the subclass. Then a bit of installation
specific config overrides the normal destination page and returns a
different one.

This seems an OK approach (other approaches happily received) but
requires that I be able to intercept calls to the original page with
calls to the subclassed version.
I was going to implement a subclass of RequestCycle to lookup the requested
page and use the subclass if my configuration specifies one. That way there
is no change needed in the rest of the application when we decide to use
a modified page.

new WebRequestCycle(this, (WebRequest)request, (WebResponse)response){
 public C extends Page void setResponsePage(final ClassC pageClass,
final PageParameters pageParameters,
   final String pageMapName) {
   // finds configured alternative or returns same pageClass if nothing
   // configured for this page.
   ClassC altClass = getPageFactory().getPage(pageClass);
   super.setResponsePage( altClass, pageParameters, pageMapName);
 }
};

Unfortunately, setResponsePage(...) is final so I cant. This makes
me think I am approaching this wrong as whenever I find I am blocked
doing something in Wicket it's usually because I am going the wrong way.

I'm using 1.4RC2.

Can anyone offer an alternative for me please.


Cheers - Steve


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




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




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



Re: Like to override normal page mapping but setResponsePage(...) is final

2009-05-06 Thread Igor Vaynberg
it is final because we like to keep internals locked up so we can
easily change them even during minor version upgrades. if we make the
method overridable we are defining a certain contract which we do not
want to support.

to you it may seem like a shame, but people who read your code will
probably think otherwise as they will not be left wondering why they
are seeing a different page. a matter of taste i suppose.

-igor

On Tue, May 5, 2009 at 11:50 PM, Steve Flasby st...@flasby.org wrote:
 Hi Igor, thanks.
 Yeah, there is no other choice given the final methods. A bit of a shame
 really, as having this work uniformly will depend on us all remembering
 to do this instead of simply calling setResponse() directly.

 Just out of interest, does anyone know why this method is final?


 Cheers - Steve


 Igor Vaynberg wrote:

 setResponsePage(MyApplicaton.getCustomizedPageXClass(), .., ..)

 -igor

 On Tue, May 5, 2009 at 12:15 AM, Steve Flasby st...@flasby.org wrote:

 Chaps,
 We have a requirement to customize certain pages depending on the
 installation. My approach is to subclass the pages needing customization
 and put the difference in the subclass. Then a bit of installation
 specific config overrides the normal destination page and returns a
 different one.

 This seems an OK approach (other approaches happily received) but
 requires that I be able to intercept calls to the original page with
 calls to the subclassed version.
 I was going to implement a subclass of RequestCycle to lookup the
 requested
 page and use the subclass if my configuration specifies one. That way
 there
 is no change needed in the rest of the application when we decide to use
 a modified page.

 new WebRequestCycle(this, (WebRequest)request, (WebResponse)response){
  public C extends Page void setResponsePage(final ClassC pageClass,
 final PageParameters pageParameters,
           final String pageMapName) {
   // finds configured alternative or returns same pageClass if nothing
   // configured for this page.
   ClassC altClass = getPageFactory().getPage(pageClass);
   super.setResponsePage( altClass, pageParameters, pageMapName);
  }
 };

 Unfortunately, setResponsePage(...) is final so I cant. This makes
 me think I am approaching this wrong as whenever I find I am blocked
 doing something in Wicket it's usually because I am going the wrong way.

 I'm using 1.4RC2.

 Can anyone offer an alternative for me please.


 Cheers - Steve


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



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



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



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



Re: best way to add tooltips in wicket

2009-05-06 Thread RoyBatty

Hi Nino, 

regarding Mootip, to sum up what i've noted:

1. while i think Mootip looks better than prototip, i felt that it seemed,
well, slower. Basically, when you move the mouse around mootip updates less
frequently and thus appears glitchier than prototip. 

2. Another thing was that i couldn't see that it was possible to create a
MooTip without a header. To point to a specific place in the code,  I
couldn't see that there was a way to set the addTitle boolean to false.
This makes all tooltip to have a header and body segment even when there's
no header text, which is not optimal.


These points, mostly point 2, made me pick prototip. Now, with the quirks
with prototip i mentioned in another post, I might have to make another pass
at picking the framework to use... *sigh*. At least some nice folks here
have given me some pointers, thanks for that.


Cheers/Mathias

nino martinez wael wrote:
 
 Please do tell if there are any issues with mootip, do not hesitate to
 write me (i'll be using it soon)..
 
 Im not soo keen todo stuff with prototip, since it's commercial
 license as of the latest version..
 
 2009/5/4 Mathias Nilsson wicket.program...@gmail.com:

 yes I have the same exact problem. Tried all settings there is in
 ProtoTip.
 The only thing that worked was to have onclick to show the tip and close
 button but this is of course not the way we want it.

 If you come up with a solution please post it here. Do you experience the
 same bug with MooTip?
 --
 View this message in context:
 http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p23371425.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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

-- 
View this message in context: 
http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p23401104.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Like to override normal page mapping but setResponsePage(...) is final

2009-05-06 Thread Steve Flasby

Mmm, you are right.
One of my complaints about gadgets like Spring is that it does things by
magic configured somewhere in an XML wonderland. It's better to keep it
explicit. I will shut up now.

Thanks, Igor.

Cheers - Steve



Igor Vaynberg wrote:

it is final because we like to keep internals locked up so we can
easily change them even during minor version upgrades. if we make the
method overridable we are defining a certain contract which we do not
want to support.

to you it may seem like a shame, but people who read your code will
probably think otherwise as they will not be left wondering why they
are seeing a different page. a matter of taste i suppose.

-igor

On Tue, May 5, 2009 at 11:50 PM, Steve Flasby st...@flasby.org wrote:

Hi Igor, thanks.
Yeah, there is no other choice given the final methods. A bit of a shame
really, as having this work uniformly will depend on us all remembering
to do this instead of simply calling setResponse() directly.

Just out of interest, does anyone know why this method is final?


Cheers - Steve


Igor Vaynberg wrote:

setResponsePage(MyApplicaton.getCustomizedPageXClass(), .., ..)

-igor

On Tue, May 5, 2009 at 12:15 AM, Steve Flasby st...@flasby.org wrote:

Chaps,
We have a requirement to customize certain pages depending on the
installation. My approach is to subclass the pages needing customization
and put the difference in the subclass. Then a bit of installation
specific config overrides the normal destination page and returns a
different one.

This seems an OK approach (other approaches happily received) but
requires that I be able to intercept calls to the original page with
calls to the subclassed version.
I was going to implement a subclass of RequestCycle to lookup the
requested
page and use the subclass if my configuration specifies one. That way
there
is no change needed in the rest of the application when we decide to use
a modified page.

new WebRequestCycle(this, (WebRequest)request, (WebResponse)response){
 public C extends Page void setResponsePage(final ClassC pageClass,
final PageParameters pageParameters,
  final String pageMapName) {
  // finds configured alternative or returns same pageClass if nothing
  // configured for this page.
  ClassC altClass = getPageFactory().getPage(pageClass);
  super.setResponsePage( altClass, pageParameters, pageMapName);
 }
};

Unfortunately, setResponsePage(...) is final so I cant. This makes
me think I am approaching this wrong as whenever I find I am blocked
doing something in Wicket it's usually because I am going the wrong way.

I'm using 1.4RC2.

Can anyone offer an alternative for me please.


Cheers - Steve


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



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



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




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




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



How to manipulate values in a data table?

2009-05-06 Thread HHB
Hey,
I have a message class that has a status (which it is an integer)
 to indicate whether the message has been sent successfully.
Inside a data table, how to handle this integer values so instead
 of displaying 0 or 1, it displays Sent or Not Sent?
Thanks.   


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



Re: How to manipulate values in a data table?

2009-05-06 Thread Linda van der Pal
Turn it into an object with that status as an integer and a name as 
String? Then the toString should return the name. You could possibly 
even use an enum.


Linda

HHB wrote:

Hey,
I have a message class that has a status (which it is an integer)
 to indicate whether the message has been sent successfully.
Inside a data table, how to handle this integer values so instead
 of displaying 0 or 1, it displays Sent or Not Sent?
Thanks.   



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




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.325 / Virus Database: 270.12.18/2096 - Release Date: 05/04/09 17:51:00


  



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



Re: DropDownChoice with ChoiceRender problem

2009-05-06 Thread jensiator

But still. In this case the map is constant. What when the values is fetched
from db. Are you going to call tha db every time you want to get the
displayname? 
Jens
-- 
View this message in context: 
http://www.nabble.com/DropDownChoice-with-ChoiceRender-problem-tp23374394p23401547.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to manipulate values in a data table?

2009-05-06 Thread Steve Flasby

Use a class to represent this and then add a customized ConverterLocator to 
your Application.
I find the ConverterLocator very powerful, you get consistent rendering across 
the entire
application without having to do anything special.


Hope this helps.

Cheers - Steve



HHB wrote:

Hey,
I have a message class that has a status (which it is an integer)
 to indicate whether the message has been sent successfully.
Inside a data table, how to handle this integer values so instead
 of displaying 0 or 1, it displays Sent or Not Sent?
Thanks.   



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




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



FW: need help urgent......Change label dynamicly

2009-05-06 Thread Praveen Kumar A.

Hello,

I want to change the Label  for the AjaxButton, when it is clicked. Iam
not able to work out this.

new AjaxButton(preview){

public void onSubmit(AjaxRequestTarget target, Form form){

// need to get the label name here...how to get the label name?
if(AjaxButton.label.equal(click)) then set label to Unclick
if UnClick then show click
}

Need urgently, stopping my work. Could you please give me hint, how to
do this Implementation.
 

Thanks,

Praveen
---BeginMessage---
 

 

Hello,

 

I want to change the Label  for the AjaxButton, when it is clicked. Iam not 
able to work out this.

 

 

new AjaxButton(preview){

public void onSubmit(AjaxRequestTarget target, Form form){

 

if(AjaxButton.label.equal(click)) then set label to Unclick

if UnClick then show click

 

}

Need urgently, stopping my work. Could you please give me hint, how to do this. 
Implementation.

 

Thanks,

Praveen


---End Message---

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

Re: unsubcribe

2009-05-06 Thread Martijn Dashorst
No worries... get well soon and then unsubscribe properly :)

Martijn

On Tue, May 5, 2009 at 11:14 PM, Clint Popetz cl...@42lines.net wrote:
 Oh, the shame.  My only excuse is that the drugs for a sickness were
 stronger than expected, and I shouldn't have been typing then (or now,
 likely.)   My apologies nonetheless.

 -Clint

 On Tue, May 5, 2009 at 3:08 PM, Clint Popetz cpop...@gmail.com wrote:
 unsubscribe

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



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





-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: remember me at login page feature

2009-05-06 Thread Khlystov Alexandr



this is the problem descirbed in first letter:

I can't
change this behavior, because this check:
...
if
(!AuthenticatedWebSession.get().isSignedIn()
...

Is place
in final method of AuthenticatedWebSession.
:)

 Well..
darn ... then do not call and check the cookie :)
 
  if
(!AuthenticatedWebSession.get().isSignedIn() 
(!myOwnCookieCheck()))
 {
 :...
 }


 **
 Martin
 
 2009/5/6 Khlystov
Alexandr a...@ovservice.org:




  Thanks for reply, Martin.



AuthenticatedWebSession#isSignedIn() is final too :). And according to
 design I think it is not the proper place to do the auto-login
logic.



http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/authentication/AuthenticatedWebSession.html#isSignedIn()


 All you need to do is evaluate
the cookie here:

 if
(!AuthenticatedWebSession.get().isSignedIn())

 Meaning that this should return TRUE if cookie is
 found.

 **

Martin


 2009/5/5 Khlystov
Alexandr a...@ovservice.org:
 Hello
 all.

 Previous
answers did not helped me much.
 Though thanks authors for
their
 replies.

 I am going to provide more detailed question:

 My App  extends
AuthenticatedWebApplication {


And I want to implement auto-login/remember me feature.
 More precisely - when user submits to browser URL for
some
 Wicket page
 (and
 user is not yet logged in) he
 should be
able to see this page without
 seeing

 SignInPage (if he set at previous session
remember me check
 box at

SignInPage).

 I can't
 understand how can I achive that with the

 AuthenticatedWebApplication. How can I
handle redirecting user to the
 SignInPage at


org.apache.wicket.authentication;AuthenticatedWebApplication

 final method:
onUnauthorizedInstantiation:
 ...

  public final void
onUnauthorizedInstantiation(final Component

component)
   {
   // If
there is
 a sign in page class declared, and the
unauthorized
   //
 component is a
page, but it's not the sign in page
   if
 (component instanceof Page)
   {

 if
(!AuthenticatedWebSession.get().isSignedIn())

 {
   // Redirect to intercept
page to let the
 user sign in
  
throw new


RestartResponseAtInterceptPageException(getSignInPageClass());
   }
   else

  {
  
onUnauthorizedPage((Page)component);
   }
   }
   else
   {
   // The
component was not a
 page, so throw an exception
   throw new

UnauthorizedInstantiationException(component.getClass());
   }
   }

...

 As it is final I can't
override the line:
 ...

  throw new


RestartResponseAtInterceptPageException(getSignInPageClass());
 ...

 to make
setting SignInPage
 optional, depending on the cookie, and
if
 cookie
 is given from
remember me checkbox - than to
 authenticate user
just by
 login retrieved from the cookie.
 And do not show SignInPage and do not

do
 any

redirectToInterceptPage.

 Thanks in
 advance!

 P.S.
 I
think Wicket as
 a project requires more detailed and
features-wide
 reference

documentation.

 Khlystov
Alexandr пишет:

 Good
day.

 Can anyone,
please, give an example, or direct wicket API
 description
 about remember me at login page
 feature.


Thanks in advance.



 --

 Khlystov Alexandr




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





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






--
 ___
 Best regards, Khlystov
Alexandr.
 mailto:
 a...@ovservice.org

 

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


-- 
___
Best regards, Khlystov Alexandr.
mailto:
a...@ovservice.org


Re: remember me at login page feature

2009-05-06 Thread Martin Makundi
Did you try putting a breakpoint and finding a suitable place from the
call-stack?

**
Martin

2009/5/6 Khlystov Alexandr a...@ovservice.org:



 this is the problem descirbed in first letter:

 I can't
 change this behavior, because this check:
 ...
 if
 (!AuthenticatedWebSession.get().isSignedIn()
 ...

 Is place
 in final method of AuthenticatedWebSession.
 :)

 Well..
 darn ... then do not call and check the cookie :)

  if
 (!AuthenticatedWebSession.get().isSignedIn() 
 (!myOwnCookieCheck()))
 {
 :...
 }


 **
 Martin

 2009/5/6 Khlystov
 Alexandr a...@ovservice.org:




  Thanks for reply, Martin.



 AuthenticatedWebSession#isSignedIn() is final too :). And according to
 design I think it is not the proper place to do the auto-login
 logic.



 http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/authentication/AuthenticatedWebSession.html#isSignedIn()


 All you need to do is evaluate
 the cookie here:

 if
 (!AuthenticatedWebSession.get().isSignedIn())

 Meaning that this should return TRUE if cookie is
 found.

 **

 Martin


 2009/5/5 Khlystov
 Alexandr a...@ovservice.org:
 Hello
 all.

 Previous
 answers did not helped me much.
 Though thanks authors for
 their
 replies.

 I am going to provide more detailed question:

 My App  extends
 AuthenticatedWebApplication {


 And I want to implement auto-login/remember me feature.
 More precisely - when user submits to browser URL for
 some
 Wicket page
 (and
 user is not yet logged in) he
 should be
 able to see this page without
 seeing

 SignInPage (if he set at previous session
 remember me check
 box at

 SignInPage).

 I can't
 understand how can I achive that with the

 AuthenticatedWebApplication. How can I
 handle redirecting user to the
 SignInPage at


 org.apache.wicket.authentication;AuthenticatedWebApplication

 final method:
 onUnauthorizedInstantiation:
 ...

  public final void
 onUnauthorizedInstantiation(final Component

 component)
   {
   // If
 there is
 a sign in page class declared, and the
 unauthorized
   //
 component is a
 page, but it's not the sign in page
   if
 (component instanceof Page)
   {

 if
 (!AuthenticatedWebSession.get().isSignedIn())

 {
   // Redirect to intercept
 page to let the
 user sign in

throw new


 RestartResponseAtInterceptPageException(getSignInPageClass());
   }
   else

  {

 onUnauthorizedPage((Page)component);
   }
   }
   else
   {
   // The
 component was not a
 page, so throw an exception
   throw new

 UnauthorizedInstantiationException(component.getClass());
   }
   }

 ...

 As it is final I can't
 override the line:
 ...

  throw new


 RestartResponseAtInterceptPageException(getSignInPageClass());
 ...

 to make
 setting SignInPage
 optional, depending on the cookie, and
 if
 cookie
 is given from
 remember me checkbox - than to
 authenticate user
 just by
 login retrieved from the cookie.
 And do not show SignInPage and do not

 do
 any

 redirectToInterceptPage.

 Thanks in
 advance!

 P.S.
 I
 think Wicket as
 a project requires more detailed and
 features-wide
 reference

 documentation.

 Khlystov
 Alexandr пишет:

 Good
 day.

 Can anyone,
 please, give an example, or direct wicket API
 description
 about remember me at login page
 feature.


 Thanks in advance.



 --

 Khlystov Alexandr




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





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






 --
 ___
 Best regards, Khlystov
 Alexandr.
 mailto:
 a...@ovservice.org



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





 --
 ___
 Best regards, Khlystov Alexandr.
 mailto:
 a...@ovservice.org


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



Re: remember me at login page feature

2009-05-06 Thread Khlystov Alexandr



No :), it is to complex. What I do better is than hack the LoginPage
and do there cookie check, and redirecting to requested Page ;).

 Did you try putting a breakpoint and finding a suitable place from
the
 call-stack?
 
 **
 Martin
 
 2009/5/6 Khlystov Alexandr a...@ovservice.org:



 this is the problem
descirbed in first letter:

 I can't
 change this behavior, because this check:
 ...
 if

(!AuthenticatedWebSession.get().isSignedIn()
 ...

 Is place
 in final method of
AuthenticatedWebSession.
 :)


Well..
 darn ... then do not call and check the cookie :)

  if

(!AuthenticatedWebSession.get().isSignedIn() 

(!myOwnCookieCheck()))
 {
 :...
 }


 **
 Martin

 2009/5/6
Khlystov
 Alexandr a...@ovservice.org:




  Thanks for reply, Martin.



 AuthenticatedWebSession#isSignedIn() is final too :). And
according to
 design I think it is not the proper
place to do the auto-login
 logic.




http://people.apache.org/~tobrien/wicket/apidocs/org/apache/wicket/authentication/AuthenticatedWebSession.html#isSignedIn()


 All you
need to do is evaluate
 the cookie here:

 if

(!AuthenticatedWebSession.get().isSignedIn())

 Meaning that this should return TRUE if cookie
is
 found.

 **


Martin


 2009/5/5 Khlystov
 Alexandr
a...@ovservice.org:
 Hello
 all.

 Previous
 answers did not helped
me much.
 Though thanks authors for

their
 replies.

 I am going to
provide more detailed question:

 My App  extends

AuthenticatedWebApplication {


 And I want to implement
auto-login/remember me feature.
 More
precisely - when user submits to browser URL for
 some
 Wicket page
 (and
 user is not yet logged in) he
 should be
 able to see this page
without
 seeing

 SignInPage (if he set at
previous session
 remember me check
 box at


SignInPage).

 I
can't
 understand how can I achive that with the


AuthenticatedWebApplication. How can I
 handle redirecting
user to the
 SignInPage at



org.apache.wicket.authentication;AuthenticatedWebApplication

 final method:
 onUnauthorizedInstantiation:

...

  public final
void
 onUnauthorizedInstantiation(final Component

 component)
   {
   //
If
 there is
 a sign in page class
declared, and the
 unauthorized

  //
 component is a
 page, but it's
not the sign in page
   if
 (component instanceof Page)
   {

 if

(!AuthenticatedWebSession.get().isSignedIn())

 {
   // Redirect to intercept
 page to let the
 user sign in

throw new



RestartResponseAtInterceptPageException(getSignInPageClass());
   }
  
else

  {


onUnauthorizedPage((Page)component);

  }
   }
   
   else
   {
   // The
 component was
not a
 page, so throw an exception
   throw new


UnauthorizedInstantiationException(component.getClass());
   }
   }

 ...

 As it is final I
can't
 override the line:

...

  throw new



RestartResponseAtInterceptPageException(getSignInPageClass());
 ...

 to make
 setting SignInPage
 optional, depending on the cookie, and

if
 cookie
 is
given from
 remember me checkbox - than to
 authenticate user
 just by
 login retrieved from the cookie.
 And do not show SignInPage and do not

 do

any


redirectToInterceptPage.

 Thanks in
 advance!

 P.S.
 I
 think Wicket as
 a project requires more detailed and

features-wide
 reference

 documentation.

 Khlystov
 Alexandr пишет:

 Good
 day.

 Can
anyone,
 please, give an example, or direct wicket API
 description
 about
remember me at login page
 feature.


 Thanks in advance.



 --

 Khlystov Alexandr





-
 To unsubscribe, e-mail:

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

users-h...@wicket.apache.org






-
 To unsubscribe, e-mail:

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






 --

___
 Best regards, Khlystov
 Alexandr.
 mailto:

a...@ovservice.org




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






--
 ___
 Best regards, Khlystov
Alexandr.
 mailto:
 a...@ovservice.org

 

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


-- 
___
Best regards, Khlystov Alexandr.
mailto:
a...@ovservice.org


Re: FW: need help urgent......Change label dynamicly

2009-05-06 Thread Per Newgro

Maybe you could add two buttons and set the other visible?

Cheers
Per

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



Encoding problems in forms

2009-05-06 Thread avia listing
Hi,
  I'm using the wicket distribution for java 1.4 on a OC4J 10.1.3.3,

When using a form, I'm having some encoding problems similar to the ones in
the link below

http://markmail.org/search/?q=wicket+encoding#query:wicket%20encoding+page:1+mid:ebuxlgb2vvu7x6oo+state:results

Problem is, that for me changing to UTF-8 doesn't seem to help (nor any
other encoding) ...

Any ideas ?


Re: FW: need help urgent......Change label dynamicly

2009-05-06 Thread nino martinez wael
Maybe to it with an attribute modifier.. I cant remember ajaxbutton..

2009/5/6 Per Newgro per.new...@gmx.ch:
 Maybe you could add two buttons and set the other visible?

 Cheers
 Per

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



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



Re: FW: need help urgent......Change label dynamicly

2009-05-06 Thread Janos Cserep
AFAIR a button's label comes from it's Model. So you should do:

new AjaxButton(preview){

   public void onSubmit(AjaxRequestTarget target, Form form){
   String label = getModelObject(); // or
getDefaultModelObject(); if 1.4
   if (click.equals(label) {
  getModel().setObject(unclick); // or
getDefaultModel().setObject(unclick) in case you're at 1.4
   }
   }
}.setModel(click);


On Wed, May 6, 2009 at 11:44 AM, nino martinez wael
nino.martinez.w...@gmail.com wrote:
 Maybe to it with an attribute modifier.. I cant remember ajaxbutton..

 2009/5/6 Per Newgro per.new...@gmx.ch:
 Maybe you could add two buttons and set the other visible?

 Cheers
 Per

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



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



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



Re: FW: need help urgent......Change label dynamicly

2009-05-06 Thread Janos Cserep
And of course don't forget to add the button or a parent component to
the ajaxrequesttarget as well.


On Wed, May 6, 2009 at 11:58 AM, Janos Cserep cser...@metaprime.hu wrote:
 AFAIR a button's label comes from it's Model. So you should do:

 new AjaxButton(preview){

       public void onSubmit(AjaxRequestTarget target, Form form){
           String label = getModelObject(); // or
 getDefaultModelObject(); if 1.4
           if (click.equals(label) {
              getModel().setObject(unclick); // or
 getDefaultModel().setObject(unclick) in case you're at 1.4
           }
       }
 }.setModel(click);


 On Wed, May 6, 2009 at 11:44 AM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 Maybe to it with an attribute modifier.. I cant remember ajaxbutton..

 2009/5/6 Per Newgro per.new...@gmx.ch:
 Maybe you could add two buttons and set the other visible?

 Cheers
 Per

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



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




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



Re: DateTextField design issue

2009-05-06 Thread Eyal Golan
More on that,
we used the newConverterLocator() in out application exactly as it is
suggested in WIA, page 297.
However, because the DateTextField has its own converter, we even don't get
to our customized converter.

Is it a bug?

Please advise.


Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Tue, May 5, 2009 at 7:51 PM, Eyal Golan egola...@gmail.com wrote:

 Hello,
 We use Wicket 1.3.5 and I found something annoying with the DateTextField.
 In the constructor of that class, the converter is created internally.
 If I want to use my own converter, I need to inherit DateTextField, add a
 converter as a member, and return it in the getConverter method.

 Why not have a protected method (that can be overridden) that returns the
 converter:
 Instead of:
 public DateTextField(String id, IModel model, String datePattern)
 {
 super(id, model, Date.class);
 this.datePattern = datePattern;
 *this.converter = new DateConverter()
 {
 private static final long serialVersionUID = 1L;

 /**
  * @see
 org.apache.wicket.util.convert.converters.DateConverter#getDateFormat(java.util.Locale)
  */
 public DateFormat getDateFormat(Locale locale)
 {
 return new
 SimpleDateFormat(DateTextField.this.datePattern);
 }
 };*
 }

 Do something like:
 public DateTextField(String id, IModel model, String datePattern)
 {
 super(id, model, Date.class);
 this.datePattern = datePattern;
 *this.converter = newDateConverter();*
 }
 and

 protected newDateConverter() {
  return new DateConverter()
 {
 private static final long serialVersionUID = 1L;

 /**
  * @see
 org.apache.wicket.util.convert.converters.DateConverter#getDateFormat(java.util.Locale)
  */
 public DateFormat getDateFormat(Locale locale)
 {
 return new
 SimpleDateFormat(DateTextField.this.datePattern);
 }
 };
 }

 BTW, I know that we can also use the newConverterLocator() in our
 application.

 Do you think I should open a JIRA issue with 'wish' for that?


 Eyal Golan
 egola...@gmail.com

 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74

 P  Save a tree. Please don't print this e-mail unless it's really necessary



ListMultipleChoice AbstactChoice methodclass access too strict?

2009-05-06 Thread Mikko Pukki
Hi,

I have a case where ListMultipleChoice is on a page and model of
choices can change. To be more spesific, selected values can be moved
up and down on a list. When ListMultipleChoice is updated via Ajax,
selected items do not stay selected. I thought that overriding isSelected
on a ListMultipleChoice would be a viable option (not pretty though), because
I already have the selected objects cached elsewhere, so determing whether
or not an object is selected would be trivial.

But then I thought maybe I would be better to inherit a whole new implementation
from AbstractChoice. Well, it could be done, but the class has package access
to it, so no luck there. And if I override appendOptionHtml, it should be 
entirely
rewritten. And it uses private fields (renderer, and setter for that is again 
final...)
of AbstractChoice, so it makes things even more difficult.

Could it be possible to change access to the AbstractChoice (is package access 
at all necessary?)?
Or have I missed something obvious and maybe thinking this wrong way around? 
All I would
like to do, is set correct objects on list as selected, but I guess that there 
is no
any good way doing that.


--
Mikko Pukki
Syncron Tech Oy
Laserkatu 6
53850 Lappeenranta
+358 400 757 178



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



Maven setup

2009-05-06 Thread Frank Tegtmeyer
Hi,

does anybody have a Wicket quickstart project updated
to the latest versions?

I am new to Java, to Maven and to Wicket of course too.
I have a background in web developing with Zope and
Django (all implemented in Python) but am forced to use
Java now. I know that the learning curve will be steep
and I got some showstoppers already :)

After reading much about many Java frameworks and some
frustrating tests with JSF I've chosen Wicket because
it fits my requirements best. I've done some tests
with databinder which promoted Maven heavily, so I
want to use Maven too.

I'm still struggling with the whole setup - the following
issues are still not clear to me:

- Maven setup - Wicket dependency doesn't work for 1.3.5
  nor for 1.3.6 although the website says so
  (data at the end of this message)
  Possibly another repository required?
- integration with Eclipse - Maven goal or Eclipse plugin
  or both?
- I want to use embedded Jetty also for production
  (running the application behind lighttpd).
  How to do deployment in an elegant way?
  There is only SSH access to my server.
- Hibernate integration - does databinder help much
  or is it better to learn Hibernate directly? I saw
  that databinder always is somewhat behind the
  current versions, so that may be an issue.

I hope these are not too stupid questions and someone will
find the time to answer them.

With kind regards,
Frank

The Maven dependency for wicket:

dependency
  groupIdwicket/groupId
  artifactIdwicket/artifactId
  version1.3.5/version
/dependency

The error:

[INFO]task-segment: [compile]
[INFO] 

[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered 
resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
Downloading: 
http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.pom
[INFO] Unable to find resource 'wicket:wicket:pom:1.3.5' in repository 
central (http://repo1.maven.org/maven2)
[INFO] artifact wicket:wicket-extensions: checking for updates from 
central
[INFO] artifact mysql:mysql-connector-java: checking for updates from 
central
[INFO] artifact org.mortbay.jetty:jetty: checking for updates from central
Downloading: 
http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.jar
[INFO] Unable to find resource 'wicket:wicket:jar:1.3.5' in repository 
central (http://repo1.maven.org/maven2)
[INFO] 

[ERROR] BUILD ERROR
[INFO] 

[INFO] Failed to resolve artifact.


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



Re: Maven setup

2009-05-06 Thread Eyal Golan
Have you checked http://wicket.apache.org/quickstart.html ?
You can copy the archtype command.
paste in your command prompt and the run it.
after that, run mvn eclipse:eclipse and you'll have everything you need.
Also the Jetty embedded plugin.


Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Wed, May 6, 2009 at 1:47 PM, Frank Tegtmeyer 
frank.tegtme...@online-systemhaus.com wrote:

 Hi,

 does anybody have a Wicket quickstart project updated
 to the latest versions?

 I am new to Java, to Maven and to Wicket of course too.
 I have a background in web developing with Zope and
 Django (all implemented in Python) but am forced to use
 Java now. I know that the learning curve will be steep
 and I got some showstoppers already :)

 After reading much about many Java frameworks and some
 frustrating tests with JSF I've chosen Wicket because
 it fits my requirements best. I've done some tests
 with databinder which promoted Maven heavily, so I
 want to use Maven too.

 I'm still struggling with the whole setup - the following
 issues are still not clear to me:

 - Maven setup - Wicket dependency doesn't work for 1.3.5
  nor for 1.3.6 although the website says so
  (data at the end of this message)
  Possibly another repository required?
 - integration with Eclipse - Maven goal or Eclipse plugin
  or both?
 - I want to use embedded Jetty also for production
  (running the application behind lighttpd).
  How to do deployment in an elegant way?
  There is only SSH access to my server.
 - Hibernate integration - does databinder help much
  or is it better to learn Hibernate directly? I saw
  that databinder always is somewhat behind the
  current versions, so that may be an issue.

 I hope these are not too stupid questions and someone will
 find the time to answer them.

 With kind regards,
 Frank

 The Maven dependency for wicket:

 dependency
  groupIdwicket/groupId
  artifactIdwicket/artifactId
  version1.3.5/version
 /dependency

 The error:

 [INFO]task-segment: [compile]
 [INFO]
 
 [INFO] [resources:resources]
 [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
 resources, i.e. build is platform dependent!
 [INFO] Copying 1 resource
 Downloading:
 http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.pom
 [INFO] Unable to find resource 'wicket:wicket:pom:1.3.5' in repository
 central (http://repo1.maven.org/maven2)
 [INFO] artifact wicket:wicket-extensions: checking for updates from
 central
 [INFO] artifact mysql:mysql-connector-java: checking for updates from
 central
 [INFO] artifact org.mortbay.jetty:jetty: checking for updates from central
 Downloading:
 http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.jar
 [INFO] Unable to find resource 'wicket:wicket:jar:1.3.5' in repository
 central (http://repo1.maven.org/maven2)
 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] Failed to resolve artifact.


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




Re: DropDownChoice with ChoiceRender problem

2009-05-06 Thread James Carman
On Wed, May 6, 2009 at 3:39 AM, jensiator jens.alen...@megasol.se wrote:

 But still. In this case the map is constant. What when the values is fetched
 from db. Are you going to call tha db every time you want to get the
 displayname?

I wouldn't suggest this solution in that case.  This was an enumerated
values case (perhaps an enum would work better here?).

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



Re: Maven setup

2009-05-06 Thread Linda van der Pal
For more information about Maven, check out this online book: 
http://www.sonatype.com/books/maven-book/pdf/maven-definitive-guide.pdf


Regards,
Linda

Frank Tegtmeyer wrote:

Hi,

does anybody have a Wicket quickstart project updated
to the latest versions?

I am new to Java, to Maven and to Wicket of course too.
I have a background in web developing with Zope and
Django (all implemented in Python) but am forced to use
Java now. I know that the learning curve will be steep
and I got some showstoppers already :)

After reading much about many Java frameworks and some
frustrating tests with JSF I've chosen Wicket because
it fits my requirements best. I've done some tests
with databinder which promoted Maven heavily, so I
want to use Maven too.

I'm still struggling with the whole setup - the following
issues are still not clear to me:

- Maven setup - Wicket dependency doesn't work for 1.3.5
  nor for 1.3.6 although the website says so
  (data at the end of this message)
  Possibly another repository required?
- integration with Eclipse - Maven goal or Eclipse plugin
  or both?
- I want to use embedded Jetty also for production
  (running the application behind lighttpd).
  How to do deployment in an elegant way?
  There is only SSH access to my server.
- Hibernate integration - does databinder help much
  or is it better to learn Hibernate directly? I saw
  that databinder always is somewhat behind the
  current versions, so that may be an issue.

I hope these are not too stupid questions and someone will
find the time to answer them.

With kind regards,
Frank

The Maven dependency for wicket:

dependency
  groupIdwicket/groupId
  artifactIdwicket/artifactId
  version1.3.5/version
/dependency

The error:

[INFO]task-segment: [compile]
[INFO] 


[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered 
resources, i.e. build is platform dependent!

[INFO] Copying 1 resource
Downloading: 
http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.pom
[INFO] Unable to find resource 'wicket:wicket:pom:1.3.5' in repository 
central (http://repo1.maven.org/maven2)
[INFO] artifact wicket:wicket-extensions: checking for updates from 
central
[INFO] artifact mysql:mysql-connector-java: checking for updates from 
central

[INFO] artifact org.mortbay.jetty:jetty: checking for updates from central
Downloading: 
http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.jar
[INFO] Unable to find resource 'wicket:wicket:jar:1.3.5' in repository 
central (http://repo1.maven.org/maven2)
[INFO] 


[ERROR] BUILD ERROR
[INFO] 


[INFO] Failed to resolve artifact.


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




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.325 / Virus Database: 270.12.20/2100 - Release Date: 05/06/09 06:04:00


  



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



Re: Maven setup

2009-05-06 Thread Steve Swinsburg

Hi,

The dependency is wrong.

It should be:

dependency
groupIdorg.apache.wicket/groupId
artifactIdwicket/artifactId
version1.3.5/version
/dependency


cheers,
Steve







On 6 May 2009, at 11:47, Frank Tegtmeyer wrote:


Hi,

does anybody have a Wicket quickstart project updated
to the latest versions?

I am new to Java, to Maven and to Wicket of course too.
I have a background in web developing with Zope and
Django (all implemented in Python) but am forced to use
Java now. I know that the learning curve will be steep
and I got some showstoppers already :)

After reading much about many Java frameworks and some
frustrating tests with JSF I've chosen Wicket because
it fits my requirements best. I've done some tests
with databinder which promoted Maven heavily, so I
want to use Maven too.

I'm still struggling with the whole setup - the following
issues are still not clear to me:

- Maven setup - Wicket dependency doesn't work for 1.3.5
 nor for 1.3.6 although the website says so
 (data at the end of this message)
 Possibly another repository required?
- integration with Eclipse - Maven goal or Eclipse plugin
 or both?
- I want to use embedded Jetty also for production
 (running the application behind lighttpd).
 How to do deployment in an elegant way?
 There is only SSH access to my server.
- Hibernate integration - does databinder help much
 or is it better to learn Hibernate directly? I saw
 that databinder always is somewhat behind the
 current versions, so that may be an issue.

I hope these are not too stupid questions and someone will
find the time to answer them.

With kind regards,
Frank

The Maven dependency for wicket:

dependency
 groupIdwicket/groupId
 artifactIdwicket/artifactId
 version1.3.5/version
/dependency

The error:

[INFO]task-segment: [compile]
[INFO]

[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
Downloading:
http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.pom
[INFO] Unable to find resource 'wicket:wicket:pom:1.3.5' in repository
central (http://repo1.maven.org/maven2)
[INFO] artifact wicket:wicket-extensions: checking for updates from
central
[INFO] artifact mysql:mysql-connector-java: checking for updates from
central
[INFO] artifact org.mortbay.jetty:jetty: checking for updates from  
central

Downloading:
http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.jar
[INFO] Unable to find resource 'wicket:wicket:jar:1.3.5' in repository
central (http://repo1.maven.org/maven2)
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Failed to resolve artifact.


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





smime.p7s
Description: S/MIME cryptographic signature


Re: best way to add tooltips in wicket

2009-05-06 Thread James Carman
Have you tried using overLIB?  I've got some code if you're interested.

On Wed, May 6, 2009 at 2:59 AM, RoyBatty math...@afjochnick.net wrote:

 Hi Nino,

 regarding Mootip, to sum up what i've noted:

 1. while i think Mootip looks better than prototip, i felt that it seemed,
 well, slower. Basically, when you move the mouse around mootip updates less
 frequently and thus appears glitchier than prototip.

 2. Another thing was that i couldn't see that it was possible to create a
 MooTip without a header. To point to a specific place in the code,  I
 couldn't see that there was a way to set the addTitle boolean to false.
 This makes all tooltip to have a header and body segment even when there's
 no header text, which is not optimal.


 These points, mostly point 2, made me pick prototip. Now, with the quirks
 with prototip i mentioned in another post, I might have to make another pass
 at picking the framework to use... *sigh*. At least some nice folks here
 have given me some pointers, thanks for that.


 Cheers/Mathias

 nino martinez wael wrote:

 Please do tell if there are any issues with mootip, do not hesitate to
 write me (i'll be using it soon)..

 Im not soo keen todo stuff with prototip, since it's commercial
 license as of the latest version..

 2009/5/4 Mathias Nilsson wicket.program...@gmail.com:

 yes I have the same exact problem. Tried all settings there is in
 ProtoTip.
 The only thing that worked was to have onclick to show the tip and close
 button but this is of course not the way we want it.

 If you come up with a solution please post it here. Do you experience the
 same bug with MooTip?
 --
 View this message in context:
 http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p23371425.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context: 
 http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p23401104.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Maven setup

2009-05-06 Thread Frank Tegtmeyer
Eyal Golan egola...@gmail.com wrote:
 Have you checked http://wicket.apache.org/quickstart.html ?

Yes I saw it some day but forgot about it. Thanks for
pointing there.

Thanks also to Linda and Steve. All this was very helpful.

Regards, Frank


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



Re: best way to add tooltips in wicket

2009-05-06 Thread nino martinez wael
Hi Roy

Regarding 1. You should be able to tweak settings as you want theres a
showdelay setting you can setup. And a lot more settings regarding
timeout etc if wanted..

Regarding 2:
No it seems it has to have a title at least my wrappers, you could try
to set maxTitleChars to 0, int the mootip settings..

I just did'nt see the need for not having a title when I created it :)

2009/5/6 RoyBatty math...@afjochnick.net:

 Hi Nino,

 regarding Mootip, to sum up what i've noted:

 1. while i think Mootip looks better than prototip, i felt that it seemed,
 well, slower. Basically, when you move the mouse around mootip updates less
 frequently and thus appears glitchier than prototip.

 2. Another thing was that i couldn't see that it was possible to create a
 MooTip without a header. To point to a specific place in the code,  I
 couldn't see that there was a way to set the addTitle boolean to false.
 This makes all tooltip to have a header and body segment even when there's
 no header text, which is not optimal.


 These points, mostly point 2, made me pick prototip. Now, with the quirks
 with prototip i mentioned in another post, I might have to make another pass
 at picking the framework to use... *sigh*. At least some nice folks here
 have given me some pointers, thanks for that.


 Cheers/Mathias

 nino martinez wael wrote:

 Please do tell if there are any issues with mootip, do not hesitate to
 write me (i'll be using it soon)..

 Im not soo keen todo stuff with prototip, since it's commercial
 license as of the latest version..

 2009/5/4 Mathias Nilsson wicket.program...@gmail.com:

 yes I have the same exact problem. Tried all settings there is in
 ProtoTip.
 The only thing that worked was to have onclick to show the tip and close
 button but this is of course not the way we want it.

 If you come up with a solution please post it here. Do you experience the
 same bug with MooTip?
 --
 View this message in context:
 http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p23371425.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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




 --
 View this message in context: 
 http://www.nabble.com/best-way-to-add-tooltips-in-wicket-tp22697930p23401104.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Maven setup

2009-05-06 Thread Null kühl
Hi,

Kindly have a look on this webpage, www.ilearnzone.com/wicket.html
It's a video tutorial that explains kicking off with wicket along with maven
+ tomcat/jetty :)
it also explains kicking off without maven.

Regards,
Ahmed M.


On Wed, May 6, 2009 at 4:11 PM, Frank Tegtmeyer 
frank.tegtme...@online-systemhaus.com wrote:

 Eyal Golan egola...@gmail.com wrote:
  Have you checked http://wicket.apache.org/quickstart.html ?

 Yes I saw it some day but forgot about it. Thanks for
 pointing there.

 Thanks also to Linda and Steve. All this was very helpful.

 Regards, Frank


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




Add a ui lock page over the page while waiting for response

2009-05-06 Thread Matthias Keller

Hi

We have a web form which does some very extensive backend communication 
requiring a lot of time. So usually after pressing 'submit', the UI is 
locked for 10-30 seconds. To avoid re-submission, we'd like to put some 
kind of ui-lock-page over the current page, stating 'Please wait' or 
something.
So I'd need something to add to the onclick of the submit button (which 
is NOT an ajax button but a normal input type=submit button) which 
blocks the UI until the response is ready.
I've tried the wicket-stuff veil thingy, but it doesn't work. Here's 
what I tried:

WebMarkupContainer submit = new WebMarkupContainer(submit);
submit.add(new Veil());
add(submit);

But even though I see some JS files added to the page, nothing happens 
when I click my button?


Is there something else that I can just add to a button?
Thanks a lot

Matt

--
matthias.kel...@ergon.ch  +41 44 268 83 98
Ergon Informatik AG, Kleinstrasse 15, CH-8008 Zürich
http://www.ergon.ch
__
e r g o nsmart people - smart software

Ergon ist im Final für den Fairnesspreis 2009 - Online-Abstimmung bis 6. Mai 2009 unter www.fairnesspreis.ch 





smime.p7s
Description: S/MIME Cryptographic Signature


Re: remember me at login page feature

2009-05-06 Thread Khlystov Alexandr


Guys? if really nobody has implemented the auto-login via cookie, basing 
on AuthenticatedWebApplication ???


Khlystov Alexandr пишет:

Hello all.

Previous answers did not helped me much. Though thanks authors for 
their replies.


I am going to provide more detailed question:

My App  extends AuthenticatedWebApplication {

And I want to implement auto-login/remember me feature.
More precisely - when user submits to browser URL for some Wicket page 
(and user is not yet logged in) he should be able to see this page 
without seeing SignInPage (if he set at previous session remember me 
check box at SignInPage).


I can't understand how can I achive that with the 
AuthenticatedWebApplication. How can I handle redirecting user to the 
SignInPage at 
org.apache.wicket.authentication;AuthenticatedWebApplication final 
method: onUnauthorizedInstantiation:

...
   public final void onUnauthorizedInstantiation(final Component 
component)

   {
   // If there is a sign in page class declared, and the unauthorized
   // component is a page, but it's not the sign in page
   if (component instanceof Page)
   {
   if (!AuthenticatedWebSession.get().isSignedIn())
   {
   // Redirect to intercept page to let the user sign in
   throw new 
RestartResponseAtInterceptPageException(getSignInPageClass());

   }
   else
   {
   onUnauthorizedPage((Page)component);
   }
   }
   else
   {
   // The component was not a page, so throw an exception
   throw new 
UnauthorizedInstantiationException(component.getClass());

   }
   }
...

As it is final I can't override the line:
...
   throw new 
RestartResponseAtInterceptPageException(getSignInPageClass());

...

to make setting SignInPage optional, depending on the cookie, and if 
cookie is given from remember me checkbox - than to authenticate 
user just by login retrieved from the cookie. And do not show 
SignInPage and do not do any redirectToInterceptPage.


Thanks in advance!

P.S.
I think Wicket as a project requires more detailed and features-wide 
reference documentation.


Khlystov Alexandr пишет:


Good day.

Can anyone, please, give an example, or direct wicket API description 
about remember me at login page feature.


Thanks in advance.







--
Khlystov Alexandr


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



Re: remember me at login page feature

2009-05-06 Thread James Carman
Are you using acegi/spring-security?  If so, have you looked into
using their remember me filter:

http://static.springframework.org/spring-security/site/reference/html/remember-me.html




On Wed, May 6, 2009 at 10:02 AM, Khlystov Alexandr a...@ovservice.org wrote:

 Guys? if really nobody has implemented the auto-login via cookie, basing on
 AuthenticatedWebApplication ???

 Khlystov Alexandr пишет:

 Hello all.

 Previous answers did not helped me much. Though thanks authors for their
 replies.

 I am going to provide more detailed question:

 My App  extends AuthenticatedWebApplication {

 And I want to implement auto-login/remember me feature.
 More precisely - when user submits to browser URL for some Wicket page
 (and user is not yet logged in) he should be able to see this page without
 seeing SignInPage (if he set at previous session remember me check box at
 SignInPage).

 I can't understand how can I achive that with the
 AuthenticatedWebApplication. How can I handle redirecting user to the
 SignInPage at org.apache.wicket.authentication;AuthenticatedWebApplication
 final method: onUnauthorizedInstantiation:
 ...
   public final void onUnauthorizedInstantiation(final Component component)
   {
       // If there is a sign in page class declared, and the unauthorized
       // component is a page, but it's not the sign in page
       if (component instanceof Page)
       {
           if (!AuthenticatedWebSession.get().isSignedIn())
           {
               // Redirect to intercept page to let the user sign in
               throw new
 RestartResponseAtInterceptPageException(getSignInPageClass());
           }
           else
           {
               onUnauthorizedPage((Page)component);
           }
       }
       else
       {
           // The component was not a page, so throw an exception
           throw new
 UnauthorizedInstantiationException(component.getClass());
       }
   }
 ...

 As it is final I can't override the line:
 ...
               throw new
 RestartResponseAtInterceptPageException(getSignInPageClass());
 ...

 to make setting SignInPage optional, depending on the cookie, and if
 cookie is given from remember me checkbox - than to authenticate user just
 by login retrieved from the cookie. And do not show SignInPage and do not do
 any redirectToInterceptPage.

 Thanks in advance!

 P.S.
 I think Wicket as a project requires more detailed and features-wide
 reference documentation.

 Khlystov Alexandr пишет:

 Good day.

 Can anyone, please, give an example, or direct wicket API description
 about remember me at login page feature.

 Thanks in advance.





 --
 Khlystov Alexandr


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



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



Re: Maven setup

2009-05-06 Thread Roman Zechner

hi,

also check `mvn deploy` - you can use that to export your war with 
scp://, for maven eclipse integration check m2eclipse.
as for lighttpd, i don't know, but i remember there was no ajp connector 
available last time i was searching, let us know if you have some 
experience on that!

oh, and a comparison one day between django and wicket would be cool ... :-)

cheers, roman

Null kühl wrote:

Hi,

Kindly have a look on this webpage, www.ilearnzone.com/wicket.html
It's a video tutorial that explains kicking off with wicket along with maven
+ tomcat/jetty :)
it also explains kicking off without maven.

Regards,
Ahmed M.


On Wed, May 6, 2009 at 4:11 PM, Frank Tegtmeyer 
frank.tegtme...@online-systemhaus.com wrote:

  

Eyal Golan egola...@gmail.com wrote:


Have you checked http://wicket.apache.org/quickstart.html ?
  

Yes I saw it some day but forgot about it. Thanks for
pointing there.

Thanks also to Linda and Steve. All this was very helpful.

Regards, Frank


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





  


--
Liland ...does IT better

Liland IT GmbH
Creative Master
email: roman.zech...@liland.at

office: +43 (0)463 220-111  | fax: +43 (0)463 220-288 http://www.Liland.at 



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



Re: Add a ui lock page over the page while waiting for response

2009-05-06 Thread Linda van der Pal
Back when I was programming in jsp I solved this by disabling the button 
after clicking it (because it would redirect after processing the data). 
Not sure how I'd do such a thing with Wicket.


Linda.


Matthias Keller wrote:

Hi

We have a web form which does some very extensive backend 
communication requiring a lot of time. So usually after pressing 
'submit', the UI is locked for 10-30 seconds. To avoid re-submission, 
we'd like to put some kind of ui-lock-page over the current page, 
stating 'Please wait' or something.
So I'd need something to add to the onclick of the submit button 
(which is NOT an ajax button but a normal input type=submit button) 
which blocks the UI until the response is ready.
I've tried the wicket-stuff veil thingy, but it doesn't work. Here's 
what I tried:

WebMarkupContainer submit = new WebMarkupContainer(submit);
submit.add(new Veil());
add(submit);

But even though I see some JS files added to the page, nothing happens 
when I click my button?


Is there something else that I can just add to a button?
Thanks a lot

Matt




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



Forcing model update?

2009-05-06 Thread Thierry Leveque
Hi

Is there a way to force the model to update even if the field value is not
change?

Why would I want to do that?

Because I am using Castor (xml) object. And for element of type Int, the
Castor objects have a boolean method like HasElementName. It is set to
false until the value of the element is set. If HasElementName is set to
false and the element is mandatory (from the XSD definition), there will be
a validation exception when trying to marshall the xml.

The problem is with the default value (has defined in the XSD). If I have an
element with a default value like 5 for example. This value will be
displayed on my page correctly, but when I save it without changing the
value, the model object is not updated. Then the HasElementName is not
change and the exception is throwed!

Of course I have a workaround. Just before creating the component, I can add
something like: CastorObject.setElementValue( CastorObject.getElementValue()
); to force the value to be set using the current value.

But I think this is ugly...

Thierry


Re: Forcing model update?

2009-05-06 Thread James Carman
Call Component.modelChanged()?

On Wed, May 6, 2009 at 10:40 AM, Thierry Leveque tleve...@gmail.com wrote:
 Hi

 Is there a way to force the model to update even if the field value is not
 change?

 Why would I want to do that?

 Because I am using Castor (xml) object. And for element of type Int, the
 Castor objects have a boolean method like HasElementName. It is set to
 false until the value of the element is set. If HasElementName is set to
 false and the element is mandatory (from the XSD definition), there will be
 a validation exception when trying to marshall the xml.

 The problem is with the default value (has defined in the XSD). If I have an
 element with a default value like 5 for example. This value will be
 displayed on my page correctly, but when I save it without changing the
 value, the model object is not updated. Then the HasElementName is not
 change and the exception is throwed!

 Of course I have a workaround. Just before creating the component, I can add
 something like: CastorObject.setElementValue( CastorObject.getElementValue()
 ); to force the value to be set using the current value.

 But I think this is ugly...

 Thierry


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



Re: Add a ui lock page over the page while waiting for response

2009-05-06 Thread James Carman
There is a veil component in wicketstuff-minis, I believe.  That might help.

On Wed, May 6, 2009 at 10:30 AM, Linda van der Pal
lvd...@heritageagenturen.nl wrote:
 Back when I was programming in jsp I solved this by disabling the button
 after clicking it (because it would redirect after processing the data). Not
 sure how I'd do such a thing with Wicket.

 Linda.


 Matthias Keller wrote:

 Hi

 We have a web form which does some very extensive backend communication
 requiring a lot of time. So usually after pressing 'submit', the UI is
 locked for 10-30 seconds. To avoid re-submission, we'd like to put some kind
 of ui-lock-page over the current page, stating 'Please wait' or something.
 So I'd need something to add to the onclick of the submit button (which is
 NOT an ajax button but a normal input type=submit button) which blocks the
 UI until the response is ready.
 I've tried the wicket-stuff veil thingy, but it doesn't work. Here's what
 I tried:
 WebMarkupContainer submit = new WebMarkupContainer(submit);
 submit.add(new Veil());
 add(submit);

 But even though I see some JS files added to the page, nothing happens
 when I click my button?

 Is there something else that I can just add to a button?
 Thanks a lot

 Matt



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



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



Re: Add a ui lock page over the page while waiting for response

2009-05-06 Thread Serkan Camurcuoglu

you could use the jquery blockui plugin..

http://malsup.com/jquery/block/#demos



James Carman wrote:

There is a veil component in wicketstuff-minis, I believe.  That might help.

On Wed, May 6, 2009 at 10:30 AM, Linda van der Pal
lvd...@heritageagenturen.nl wrote:
  

Back when I was programming in jsp I solved this by disabling the button
after clicking it (because it would redirect after processing the data). Not
sure how I'd do such a thing with Wicket.

Linda.


Matthias Keller wrote:


Hi

We have a web form which does some very extensive backend communication
requiring a lot of time. So usually after pressing 'submit', the UI is
locked for 10-30 seconds. To avoid re-submission, we'd like to put some kind
of ui-lock-page over the current page, stating 'Please wait' or something.
So I'd need something to add to the onclick of the submit button (which is
NOT an ajax button but a normal input type=submit button) which blocks the
UI until the response is ready.
I've tried the wicket-stuff veil thingy, but it doesn't work. Here's what
I tried:
WebMarkupContainer submit = new WebMarkupContainer(submit);
submit.add(new Veil());
add(submit);

But even though I see some JS files added to the page, nothing happens
when I click my button?

Is there something else that I can just add to a button?
Thanks a lot

Matt

  

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





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


  



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



Re: Add a ui lock page over the page while waiting for response

2009-05-06 Thread nino martinez wael
I think the veil are just over a certain component, like only the
button.. I think he are looking for a Either Modal or something more
than Veil, there was an article somewhere about it..

2009/5/6 James Carman jcar...@carmanconsulting.com:
 There is a veil component in wicketstuff-minis, I believe.  That might help.

 On Wed, May 6, 2009 at 10:30 AM, Linda van der Pal
 lvd...@heritageagenturen.nl wrote:
 Back when I was programming in jsp I solved this by disabling the button
 after clicking it (because it would redirect after processing the data). Not
 sure how I'd do such a thing with Wicket.

 Linda.


 Matthias Keller wrote:

 Hi

 We have a web form which does some very extensive backend communication
 requiring a lot of time. So usually after pressing 'submit', the UI is
 locked for 10-30 seconds. To avoid re-submission, we'd like to put some kind
 of ui-lock-page over the current page, stating 'Please wait' or something.
 So I'd need something to add to the onclick of the submit button (which is
 NOT an ajax button but a normal input type=submit button) which blocks the
 UI until the response is ready.
 I've tried the wicket-stuff veil thingy, but it doesn't work. Here's what
 I tried:
 WebMarkupContainer submit = new WebMarkupContainer(submit);
 submit.add(new Veil());
 add(submit);

 But even though I see some JS files added to the page, nothing happens
 when I click my button?

 Is there something else that I can just add to a button?
 Thanks a lot

 Matt



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



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



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



Avoiding 'WicketMessage: Unable to find component with id' error

2009-05-06 Thread Vasu Srinivasan
Im a wicket newbie ..

I have a Search Page with some search criteria inputs and below it, the list
of data based on search.

The first time the page is hit, the listView component is not still present,
because Im adding that only onSubmit() -- like this:

class XPage extends WebPage {
  
  class XForm extends Form {
   ...

   @Override public void onSubmit() {
 List resultList = searchDao.search(searchOptions);
 add(new ListView (listView, resultList ) {
 });
   }
}

The html is straightforward..

form ...

/form

div id=resultArea
 table
tr wicket:id=listView
...
/tr
 /table
/div

Even at first hit of the page, wicket shows up the message Unable to find
component with id listView ..

Is there a way to make Wicket not worry about unfound components or is there
any other standard way of handling it ?

Appreciate any help...

-- 
Regards,
Vasu


Re: Avoiding 'WicketMessage: Unable to find component with id' error

2009-05-06 Thread Sven Meier
You should add the listView right away and keep it invisible until a
search result is available.

Sven

On Mi, 2009-05-06 at 10:07 -0500, Vasu Srinivasan wrote:
 Im a wicket newbie ..
 
 I have a Search Page with some search criteria inputs and below it, the list
 of data based on search.
 
 The first time the page is hit, the listView component is not still present,
 because Im adding that only onSubmit() -- like this:
 
 class XPage extends WebPage {
   
   class XForm extends Form {
...
 
@Override public void onSubmit() {
  List resultList = searchDao.search(searchOptions);
  add(new ListView (listView, resultList ) {
  });
}
 }
 
 The html is straightforward..
 
 form ...
 
 /form
 
 div id=resultArea
  table
 tr wicket:id=listView
 ...
 /tr
  /table
 /div
 
 Even at first hit of the page, wicket shows up the message Unable to find
 component with id listView ..
 
 Is there a way to make Wicket not worry about unfound components or is there
 any other standard way of handling it ?
 
 Appreciate any help...
 


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



Re: Add a ui lock page over the page while waiting for response

2009-05-06 Thread James Carman
I thought the veil covered the whole screen.  If it's not, you could
easily do that by adding a div with a WebMarkupContainer that covers
all the content of your page.

On Wed, May 6, 2009 at 11:04 AM, nino martinez wael
nino.martinez.w...@gmail.com wrote:
 I think the veil are just over a certain component, like only the
 button.. I think he are looking for a Either Modal or something more
 than Veil, there was an article somewhere about it..

 2009/5/6 James Carman jcar...@carmanconsulting.com:
 There is a veil component in wicketstuff-minis, I believe.  That might 
 help.

 On Wed, May 6, 2009 at 10:30 AM, Linda van der Pal
 lvd...@heritageagenturen.nl wrote:
 Back when I was programming in jsp I solved this by disabling the button
 after clicking it (because it would redirect after processing the data). Not
 sure how I'd do such a thing with Wicket.

 Linda.


 Matthias Keller wrote:

 Hi

 We have a web form which does some very extensive backend communication
 requiring a lot of time. So usually after pressing 'submit', the UI is
 locked for 10-30 seconds. To avoid re-submission, we'd like to put some 
 kind
 of ui-lock-page over the current page, stating 'Please wait' or something.
 So I'd need something to add to the onclick of the submit button (which is
 NOT an ajax button but a normal input type=submit button) which blocks 
 the
 UI until the response is ready.
 I've tried the wicket-stuff veil thingy, but it doesn't work. Here's what
 I tried:
 WebMarkupContainer submit = new WebMarkupContainer(submit);
 submit.add(new Veil());
 add(submit);

 But even though I see some JS files added to the page, nothing happens
 when I click my button?

 Is there something else that I can just add to a button?
 Thanks a lot

 Matt



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



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



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



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



Re: Add a ui lock page over the page while waiting for response

2009-05-06 Thread nino martinez wael
Not as I remember, veil just makes it impossible to interact with a
component.. Cant remember more..

I last time I ended up doing a simple component that blocks the entire screen...

2009/5/6 James Carman jcar...@carmanconsulting.com:
 I thought the veil covered the whole screen.  If it's not, you could
 easily do that by adding a div with a WebMarkupContainer that covers
 all the content of your page.

 On Wed, May 6, 2009 at 11:04 AM, nino martinez wael
 nino.martinez.w...@gmail.com wrote:
 I think the veil are just over a certain component, like only the
 button.. I think he are looking for a Either Modal or something more
 than Veil, there was an article somewhere about it..

 2009/5/6 James Carman jcar...@carmanconsulting.com:
 There is a veil component in wicketstuff-minis, I believe.  That might 
 help.

 On Wed, May 6, 2009 at 10:30 AM, Linda van der Pal
 lvd...@heritageagenturen.nl wrote:
 Back when I was programming in jsp I solved this by disabling the button
 after clicking it (because it would redirect after processing the data). 
 Not
 sure how I'd do such a thing with Wicket.

 Linda.


 Matthias Keller wrote:

 Hi

 We have a web form which does some very extensive backend communication
 requiring a lot of time. So usually after pressing 'submit', the UI is
 locked for 10-30 seconds. To avoid re-submission, we'd like to put some 
 kind
 of ui-lock-page over the current page, stating 'Please wait' or something.
 So I'd need something to add to the onclick of the submit button (which is
 NOT an ajax button but a normal input type=submit button) which blocks 
 the
 UI until the response is ready.
 I've tried the wicket-stuff veil thingy, but it doesn't work. Here's what
 I tried:
 WebMarkupContainer submit = new WebMarkupContainer(submit);
 submit.add(new Veil());
 add(submit);

 But even though I see some JS files added to the page, nothing happens
 when I click my button?

 Is there something else that I can just add to a button?
 Thanks a lot

 Matt



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



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



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



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



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



Re: DateTextField design issue

2009-05-06 Thread Igor Vaynberg
what is the full name of this class? there are two DateTextField
classes in wicket codebase.

-igor

On Tue, May 5, 2009 at 9:51 AM, Eyal Golan egola...@gmail.com wrote:
 Hello,
 We use Wicket 1.3.5 and I found something annoying with the DateTextField.
 In the constructor of that class, the converter is created internally.
 If I want to use my own converter, I need to inherit DateTextField, add a
 converter as a member, and return it in the getConverter method.

 Why not have a protected method (that can be overridden) that returns the
 converter:
 Instead of:
    public DateTextField(String id, IModel model, String datePattern)
    {
        super(id, model, Date.class);
        this.datePattern = datePattern;
        *this.converter = new DateConverter()
        {
            private static final long serialVersionUID = 1L;

            /**
             * @see
 org.apache.wicket.util.convert.converters.DateConverter#getDateFormat(java.util.Locale)
             */
            public DateFormat getDateFormat(Locale locale)
            {
                return new SimpleDateFormat(DateTextField.this.datePattern);
            }
        };*
    }

 Do something like:
    public DateTextField(String id, IModel model, String datePattern)
    {
        super(id, model, Date.class);
        this.datePattern = datePattern;
        *this.converter = newDateConverter();*
    }
 and

 protected newDateConverter() {
     return new DateConverter()
        {
            private static final long serialVersionUID = 1L;

            /**
             * @see
 org.apache.wicket.util.convert.converters.DateConverter#getDateFormat(java.util.Locale)
             */
            public DateFormat getDateFormat(Locale locale)
            {
                return new SimpleDateFormat(DateTextField.this.datePattern);
            }
        };
 }

 BTW, I know that we can also use the newConverterLocator() in our
 application.

 Do you think I should open a JIRA issue with 'wish' for that?


 Eyal Golan
 egola...@gmail.com

 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74

 P  Save a tree. Please don't print this e-mail unless it's really necessary


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



Re: remember me at login page feature

2009-05-06 Thread Igor Vaynberg
if you search this list for wicket-auth-roles you will see that the
project is meant as an example, not as something for you to base your
project on. if some piece doesnt do what you want then roll your own
piece. the codebase is kept simple on purpose - it has to be easy to
read - because it is an example.

-igor

On Wed, May 6, 2009 at 7:02 AM, Khlystov Alexandr a...@ovservice.org wrote:

 Guys? if really nobody has implemented the auto-login via cookie, basing on
 AuthenticatedWebApplication ???

 Khlystov Alexandr пишет:

 Hello all.

 Previous answers did not helped me much. Though thanks authors for their
 replies.

 I am going to provide more detailed question:

 My App  extends AuthenticatedWebApplication {

 And I want to implement auto-login/remember me feature.
 More precisely - when user submits to browser URL for some Wicket page
 (and user is not yet logged in) he should be able to see this page without
 seeing SignInPage (if he set at previous session remember me check box at
 SignInPage).

 I can't understand how can I achive that with the
 AuthenticatedWebApplication. How can I handle redirecting user to the
 SignInPage at org.apache.wicket.authentication;AuthenticatedWebApplication
 final method: onUnauthorizedInstantiation:
 ...
   public final void onUnauthorizedInstantiation(final Component component)
   {
       // If there is a sign in page class declared, and the unauthorized
       // component is a page, but it's not the sign in page
       if (component instanceof Page)
       {
           if (!AuthenticatedWebSession.get().isSignedIn())
           {
               // Redirect to intercept page to let the user sign in
               throw new
 RestartResponseAtInterceptPageException(getSignInPageClass());
           }
           else
           {
               onUnauthorizedPage((Page)component);
           }
       }
       else
       {
           // The component was not a page, so throw an exception
           throw new
 UnauthorizedInstantiationException(component.getClass());
       }
   }
 ...

 As it is final I can't override the line:
 ...
               throw new
 RestartResponseAtInterceptPageException(getSignInPageClass());
 ...

 to make setting SignInPage optional, depending on the cookie, and if
 cookie is given from remember me checkbox - than to authenticate user just
 by login retrieved from the cookie. And do not show SignInPage and do not do
 any redirectToInterceptPage.

 Thanks in advance!

 P.S.
 I think Wicket as a project requires more detailed and features-wide
 reference documentation.

 Khlystov Alexandr пишет:

 Good day.

 Can anyone, please, give an example, or direct wicket API description
 about remember me at login page feature.

 Thanks in advance.





 --
 Khlystov Alexandr


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



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



Re: wicketstuff-core:jquery accordion broken?

2009-05-06 Thread Marc Nuri San Félix
Hi.
Had same problem but found something at google:
http://www.nabble.com/select-next-n-%22somethings%22-td21550403s27240.html

Simply remove the '.r' from  the expression and it will work.
Best regards
--
Marc Nuri

 hi

 currently the accordion in jquery-examples does not work in FF nor IE.

 jQuery.filter(e.rxpr, [i]) is undefined

http://localhost:8080/resources/org.wicketstuff.jquery.accordion.JQAccordion/jquery.accordion.pack.js
 Line: 1

 is this known, or should i try diggin in?

 about jquery anyway: i recognized that the jquery project in wstuff-core
 does not use the jslib project to define its dependency to the jquery
 lib. is this intended, or could/should it be changed? using
 wstuff-core/jslib would make it possible to combine components built on
 top of jquery from different projects without suffering.

 cu uwe


Re: ListMultipleChoice AbstactChoice methodclass access too strict?

2009-05-06 Thread Igor Vaynberg
i think a better solution would be to use ajaxsubmitbutton with
defaultformprocessing=false, that way the LMC will keep the selection
and its The Right Way to do it.

-igor

On Wed, May 6, 2009 at 3:21 AM, Mikko Pukki mikko.pu...@syncrontech.com wrote:
 Hi,

 I have a case where ListMultipleChoice is on a page and model of
 choices can change. To be more spesific, selected values can be moved
 up and down on a list. When ListMultipleChoice is updated via Ajax,
 selected items do not stay selected. I thought that overriding isSelected
 on a ListMultipleChoice would be a viable option (not pretty though), because
 I already have the selected objects cached elsewhere, so determing whether
 or not an object is selected would be trivial.

 But then I thought maybe I would be better to inherit a whole new 
 implementation
 from AbstractChoice. Well, it could be done, but the class has package access
 to it, so no luck there. And if I override appendOptionHtml, it should be 
 entirely
 rewritten. And it uses private fields (renderer, and setter for that is again 
 final...)
 of AbstractChoice, so it makes things even more difficult.

 Could it be possible to change access to the AbstractChoice (is package 
 access at all necessary?)?
 Or have I missed something obvious and maybe thinking this wrong way around? 
 All I would
 like to do, is set correct objects on list as selected, but I guess that 
 there is no
 any good way doing that.


 --
 Mikko Pukki
 Syncron Tech Oy
 Laserkatu 6
 53850 Lappeenranta
 +358 400 757 178



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



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



Re: remember me at login page feature

2009-05-06 Thread James Carman
With that being said, it has worked quite well for us using Spring
Security along with wicket-auth-roles.  There really should be a
supported way to do authentication/authorization in Wicket, though.
Whenever folks ask the question about it, the canned response is it's
just an example; if you don't like it roll your own.

2009/5/6 Igor Vaynberg igor.vaynb...@gmail.com:
 if you search this list for wicket-auth-roles you will see that the
 project is meant as an example, not as something for you to base your
 project on. if some piece doesnt do what you want then roll your own
 piece. the codebase is kept simple on purpose - it has to be easy to
 read - because it is an example.

 -igor

 On Wed, May 6, 2009 at 7:02 AM, Khlystov Alexandr a...@ovservice.org wrote:

 Guys? if really nobody has implemented the auto-login via cookie, basing on
 AuthenticatedWebApplication ???

 Khlystov Alexandr пишет:

 Hello all.

 Previous answers did not helped me much. Though thanks authors for their
 replies.

 I am going to provide more detailed question:

 My App  extends AuthenticatedWebApplication {

 And I want to implement auto-login/remember me feature.
 More precisely - when user submits to browser URL for some Wicket page
 (and user is not yet logged in) he should be able to see this page without
 seeing SignInPage (if he set at previous session remember me check box at
 SignInPage).

 I can't understand how can I achive that with the
 AuthenticatedWebApplication. How can I handle redirecting user to the
 SignInPage at org.apache.wicket.authentication;AuthenticatedWebApplication
 final method: onUnauthorizedInstantiation:
 ...
   public final void onUnauthorizedInstantiation(final Component component)
   {
       // If there is a sign in page class declared, and the unauthorized
       // component is a page, but it's not the sign in page
       if (component instanceof Page)
       {
           if (!AuthenticatedWebSession.get().isSignedIn())
           {
               // Redirect to intercept page to let the user sign in
               throw new
 RestartResponseAtInterceptPageException(getSignInPageClass());
           }
           else
           {
               onUnauthorizedPage((Page)component);
           }
       }
       else
       {
           // The component was not a page, so throw an exception
           throw new
 UnauthorizedInstantiationException(component.getClass());
       }
   }
 ...

 As it is final I can't override the line:
 ...
               throw new
 RestartResponseAtInterceptPageException(getSignInPageClass());
 ...

 to make setting SignInPage optional, depending on the cookie, and if
 cookie is given from remember me checkbox - than to authenticate user just
 by login retrieved from the cookie. And do not show SignInPage and do not do
 any redirectToInterceptPage.

 Thanks in advance!

 P.S.
 I think Wicket as a project requires more detailed and features-wide
 reference documentation.

 Khlystov Alexandr пишет:

 Good day.

 Can anyone, please, give an example, or direct wicket API description
 about remember me at login page feature.

 Thanks in advance.





 --
 Khlystov Alexandr


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



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



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



Spring Security's method security and Wicket

2009-05-06 Thread Kent Larsson
Hi,

I'm having some trouble getting method security to work as expected
using Spring Security together with Wicket, I have a thread about it
over at the SpringSource forum:
http://forum.springsource.org/showthread.php?t=71397 .

Basically I have this situation:
1. Unauthenticated user submits a form, the onSubmit method calls a
method in a Spring singleton which is secured using method security by
a @Secured(NON_EXISTING_ROLE) annotation.
2. At this point, the method call is intercepted by Spring and I
_think_ I should get the option to log in here. However I do not get
this option, instead I'm shown a stack trace.

I'm really banging my head against the wall here. I just wanted to ask
here if this could have anything with the Wicket-Spring-IOC project?

I would suspect no and that I'm to blame, but I'm also having a really
hard time finding the source of the problem. If you have any tip for
my as well I would really appreciate it! ;-)

Best regards, Kent

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



Re: remember me at login page feature

2009-05-06 Thread Igor Vaynberg
we do have a supported way, its called IAuthorizationStrategy. there
are too many variations of what users need out there for us to
implement something useful because every one will try to bend it to
what they want and most likely fail and bitch about it. case and
point.

-igor

2009/5/6 James Carman jcar...@carmanconsulting.com:
 With that being said, it has worked quite well for us using Spring
 Security along with wicket-auth-roles.  There really should be a
 supported way to do authentication/authorization in Wicket, though.
 Whenever folks ask the question about it, the canned response is it's
 just an example; if you don't like it roll your own.

 2009/5/6 Igor Vaynberg igor.vaynb...@gmail.com:
 if you search this list for wicket-auth-roles you will see that the
 project is meant as an example, not as something for you to base your
 project on. if some piece doesnt do what you want then roll your own
 piece. the codebase is kept simple on purpose - it has to be easy to
 read - because it is an example.

 -igor

 On Wed, May 6, 2009 at 7:02 AM, Khlystov Alexandr a...@ovservice.org wrote:

 Guys? if really nobody has implemented the auto-login via cookie, basing on
 AuthenticatedWebApplication ???

 Khlystov Alexandr пишет:

 Hello all.

 Previous answers did not helped me much. Though thanks authors for their
 replies.

 I am going to provide more detailed question:

 My App  extends AuthenticatedWebApplication {

 And I want to implement auto-login/remember me feature.
 More precisely - when user submits to browser URL for some Wicket page
 (and user is not yet logged in) he should be able to see this page without
 seeing SignInPage (if he set at previous session remember me check box at
 SignInPage).

 I can't understand how can I achive that with the
 AuthenticatedWebApplication. How can I handle redirecting user to the
 SignInPage at org.apache.wicket.authentication;AuthenticatedWebApplication
 final method: onUnauthorizedInstantiation:
 ...
   public final void onUnauthorizedInstantiation(final Component component)
   {
       // If there is a sign in page class declared, and the unauthorized
       // component is a page, but it's not the sign in page
       if (component instanceof Page)
       {
           if (!AuthenticatedWebSession.get().isSignedIn())
           {
               // Redirect to intercept page to let the user sign in
               throw new
 RestartResponseAtInterceptPageException(getSignInPageClass());
           }
           else
           {
               onUnauthorizedPage((Page)component);
           }
       }
       else
       {
           // The component was not a page, so throw an exception
           throw new
 UnauthorizedInstantiationException(component.getClass());
       }
   }
 ...

 As it is final I can't override the line:
 ...
               throw new
 RestartResponseAtInterceptPageException(getSignInPageClass());
 ...

 to make setting SignInPage optional, depending on the cookie, and if
 cookie is given from remember me checkbox - than to authenticate user 
 just
 by login retrieved from the cookie. And do not show SignInPage and do not 
 do
 any redirectToInterceptPage.

 Thanks in advance!

 P.S.
 I think Wicket as a project requires more detailed and features-wide
 reference documentation.

 Khlystov Alexandr пишет:

 Good day.

 Can anyone, please, give an example, or direct wicket API description
 about remember me at login page feature.

 Thanks in advance.





 --
 Khlystov Alexandr


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



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



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



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



Re: Spring Security's method security and Wicket

2009-05-06 Thread Igor Vaynberg
On Wed, May 6, 2009 at 10:25 AM, Kent Larsson kent.lars...@gmail.com wrote:
 2. At this point, the method call is intercepted by Spring and I
 _think_ I should get the option to log in here. However I do not get
 this option, instead I'm shown a stack trace.

how is (2) accomplished?

-igor



 I'm really banging my head against the wall here. I just wanted to ask
 here if this could have anything with the Wicket-Spring-IOC project?

 I would suspect no and that I'm to blame, but I'm also having a really
 hard time finding the source of the problem. If you have any tip for
 my as well I would really appreciate it! ;-)

 Best regards, Kent

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



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



Re: DateTextField design issue

2009-05-06 Thread Eyal Golan
we looked the one from wicket-extensions


Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Wed, May 6, 2009 at 6:43 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 what is the full name of this class? there are two DateTextField
 classes in wicket codebase.

 -igor

 On Tue, May 5, 2009 at 9:51 AM, Eyal Golan egola...@gmail.com wrote:
  Hello,
  We use Wicket 1.3.5 and I found something annoying with the
 DateTextField.
  In the constructor of that class, the converter is created internally.
  If I want to use my own converter, I need to inherit DateTextField, add a
  converter as a member, and return it in the getConverter method.
 
  Why not have a protected method (that can be overridden) that returns the
  converter:
  Instead of:
 public DateTextField(String id, IModel model, String datePattern)
 {
 super(id, model, Date.class);
 this.datePattern = datePattern;
 *this.converter = new DateConverter()
 {
 private static final long serialVersionUID = 1L;
 
 /**
  * @see
 
 org.apache.wicket.util.convert.converters.DateConverter#getDateFormat(java.util.Locale)
  */
 public DateFormat getDateFormat(Locale locale)
 {
 return new
 SimpleDateFormat(DateTextField.this.datePattern);
 }
 };*
 }
 
  Do something like:
 public DateTextField(String id, IModel model, String datePattern)
 {
 super(id, model, Date.class);
 this.datePattern = datePattern;
 *this.converter = newDateConverter();*
 }
  and
 
  protected newDateConverter() {
  return new DateConverter()
 {
 private static final long serialVersionUID = 1L;
 
 /**
  * @see
 
 org.apache.wicket.util.convert.converters.DateConverter#getDateFormat(java.util.Locale)
  */
 public DateFormat getDateFormat(Locale locale)
 {
 return new
 SimpleDateFormat(DateTextField.this.datePattern);
 }
 };
  }
 
  BTW, I know that we can also use the newConverterLocator() in our
  application.
 
  Do you think I should open a JIRA issue with 'wish' for that?
 
 
  Eyal Golan
  egola...@gmail.com
 
  Visit: http://jvdrums.sourceforge.net/
  LinkedIn: http://www.linkedin.com/in/egolan74
 
  P  Save a tree. Please don't print this e-mail unless it's really
 necessary
 

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




Re: How to manipulate values in a data table?

2009-05-06 Thread Mathias Nilsson

If it only can hold one value then an enum would be ok.

public interface Translatable{
   public String getResourceKey();
}

public enum Status implements Translatable{
   
NOT_SENT( 0, resource.notsent ),
SENT( 1, resource.sent );

private int status;
private String resourceKey;

Status( int status, String resourceKey ){
   this.status = status;
   this.resourceKey = resourceKey;
}
 

public int getStatus(){
  return status;
}


public String getResourceKey(){
  return resourceKey;
}
}

If you use this in an DropDownChoice or want to use it in a label the
resourcekey should do the trick if the application is multilanguage
-- 
View this message in context: 
http://www.nabble.com/How-to-manipulate-values-in-a-data-table--tp23401292p23412644.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Maven setup

2009-05-06 Thread David Brown
Hello Frank, I can't answer all the questions but...

* I'm a 10+ year nearly Java only developer. I was initially very impressed 
with databinder but the only real support for databinder I could find is @: 
http://code.google.com/p/wicket-web-beans/
* I have 1.3.5 running in Eclipse (Ganymede) with Maven OK and I plan to 
upgrade to 1.3.6 as my new gig requires this framework.
* Hibernate is a great ORM gadget but it is not 100% Java so PermGen space can 
be an issue. So, as an alternative you could investigate iBatis and I think 
Wicket also does well in the DAO arena. I'm only 100 pp into the WIA book so 
obviously you will need more folks chipping in with better experience.

There are 10 kinds of people in this world: those who understand binary and 
those who don’t (Valid only for 2's complement).

- Original Message -
From: Frank Tegtmeyer frank.tegtme...@online-systemhaus.com
To: users@wicket.apache.org
Sent: Wednesday, May 6, 2009 5:47:25 AM GMT -06:00 US/Canada Central
Subject: Maven setup

Hi,

does anybody have a Wicket quickstart project updated
to the latest versions?

I am new to Java, to Maven and to Wicket of course too.
I have a background in web developing with Zope and
Django (all implemented in Python) but am forced to use
Java now. I know that the learning curve will be steep
and I got some showstoppers already :)

After reading much about many Java frameworks and some
frustrating tests with JSF I've chosen Wicket because
it fits my requirements best. I've done some tests
with databinder which promoted Maven heavily, so I
want to use Maven too.

I'm still struggling with the whole setup - the following
issues are still not clear to me:

- Maven setup - Wicket dependency doesn't work for 1.3.5
  nor for 1.3.6 although the website says so
  (data at the end of this message)
  Possibly another repository required?
- integration with Eclipse - Maven goal or Eclipse plugin
  or both?
- I want to use embedded Jetty also for production
  (running the application behind lighttpd).
  How to do deployment in an elegant way?
  There is only SSH access to my server.
- Hibernate integration - does databinder help much
  or is it better to learn Hibernate directly? I saw
  that databinder always is somewhat behind the
  current versions, so that may be an issue.

I hope these are not too stupid questions and someone will
find the time to answer them.

With kind regards,
Frank

The Maven dependency for wicket:

dependency
  groupIdwicket/groupId
  artifactIdwicket/artifactId
  version1.3.5/version
/dependency

The error:

[INFO]task-segment: [compile]
[INFO] 

[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered 
resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
Downloading: 
http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.pom
[INFO] Unable to find resource 'wicket:wicket:pom:1.3.5' in repository 
central (http://repo1.maven.org/maven2)
[INFO] artifact wicket:wicket-extensions: checking for updates from 
central
[INFO] artifact mysql:mysql-connector-java: checking for updates from 
central
[INFO] artifact org.mortbay.jetty:jetty: checking for updates from central
Downloading: 
http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.jar
[INFO] Unable to find resource 'wicket:wicket:jar:1.3.5' in repository 
central (http://repo1.maven.org/maven2)
[INFO] 

[ERROR] BUILD ERROR
[INFO] 

[INFO] Failed to resolve artifact.


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


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



Detaching models

2009-05-06 Thread Uwe Schäfer

hi

we have a problem here, which we think might be a common one, so i´d 
like to discuss.


from time to time we create models (mostly LDMs) that are not actually 
reachable by components. (yes, you can argue that this is stupid, but it 
happens where 1:1 mapping between component and model is not easy to apply)


the problem arising from there is of course that wicket does not know 
about this IModel and so wont detach() it.


yes, we could use Component.detach() as a hook to detach that LDM as 
well, but i tend to forget that.


if there were a central place to register IDetachables, life would be 
simpler. from what i´ve seen, detach is not guaranteed to be called only 
once, so we could do:


MyAbstractReadOnlyModel(){
 MyRequestCycle.get().registerForDetachment(this);}

and to

MyRequestCycle.detach(){
 super.detach();
 for(IDetachable d : this.setOfRegisteredIDetachables){
  d.detach();
 }
 this.registeredIDetachables.clear();
 ...

as well as

MyRequestCycle.registerForDetachment(IDetachable d);

wouldn´t it make sense to have something like this in the framework?
one drawback is that direct implementations of IModel could not be 
covered, but still it would be more convenient to just register them 
somewhere instead of overwriting the detach methods of their containers 
if we want them detached.


any thoughts, apart from the ones that claim this not to be a valid use 
of IModel? :)


cu uwe

--
THOMAS DAILY GmbH
Adlerstraße 19
79098 Freiburg
Deutschland
T  + 49 761 3 85 59 410
F  + 49 761 3 85 59 550
E  lar...@thomas-daily.de
www.thomas-daily.de

Geschäftsführer/Managing Directors:
Wendy Thomas, Susanne Larbig
Handelsregister Freiburg i.Br., HRB 3947




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



Lazy Open Session In View with AOP

2009-05-06 Thread Christian Helmbold

Hello,

I want to use the Open Session In View Pattern with Wicket, but I don't want to 
open a Hibernate Session for every request like the ServletFilter approach does.

I looked at the lazy-loading Open Session in View for JPA implementation from 
Wille Faler. 
http://faler.wordpress.com/2009/04/30/building-a-more-scalable-open-session-in-view/
 He uses AOP instead of a ServletFilter to intercept only those method calls 
that need an EntityManager.

My plan is to build something similar for Hibernate with Spring AOP. The 
solutions would consist of the following steps:

1. An aspect creates a new Hibernate Session, if a method is called, that needs 
one and none is already open.
2. The transaction runs.
3. The RequestCycle commits the transaction and closes the session. Or 
rollback, if an exception was thrown.

Is something wrong with it?

The Hibernate Reference says: When the transaction ends, either through commit 
or roll back, the current Session is closed automatically.
https://www.hibernate.org/42.html#A6

This means that only one transaction can be executed in one request, right? But 
what is, if I need more than one transaction per request? Since I have to hold 
the session open during rendering, because of lazy loading, I cannot commit a 
transaction if I don't know another Session will be opened immediately and not 
to be closed until the end of the request cycle. 

Hibernate typically bounds the Session to the current thread. But was is the 
current thread in a Wicket Application? Are those threads pooled? Could the 
same session be used in two requests, when no commit happened?

Thanks in advance,
Christian




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



Re: Lazy Open Session In View with AOP

2009-05-06 Thread Carlo Camerino
spring has implemented itw own opensessioninview filter.,
i dont' think that you have to crete your own

Spring has a class like this which you can declare in your web.xml
OpenSessionInViewFilter

On Thu, May 7, 2009 at 2:29 AM, Christian Helmbold
christian.helmb...@yahoo.de wrote:

 Hello,

 I want to use the Open Session In View Pattern with Wicket, but I don't want 
 to open a Hibernate Session for every request like the ServletFilter approach 
 does.

 I looked at the lazy-loading Open Session in View for JPA implementation 
 from Wille Faler. 
 http://faler.wordpress.com/2009/04/30/building-a-more-scalable-open-session-in-view/
  He uses AOP instead of a ServletFilter to intercept only those method calls 
 that need an EntityManager.

 My plan is to build something similar for Hibernate with Spring AOP. The 
 solutions would consist of the following steps:

 1. An aspect creates a new Hibernate Session, if a method is called, that 
 needs one and none is already open.
 2. The transaction runs.
 3. The RequestCycle commits the transaction and closes the session. Or 
 rollback, if an exception was thrown.

 Is something wrong with it?

 The Hibernate Reference says: When the transaction ends, either through 
 commit or roll back, the current Session is closed automatically.
 https://www.hibernate.org/42.html#A6

 This means that only one transaction can be executed in one request, right? 
 But what is, if I need more than one transaction per request? Since I have to 
 hold the session open during rendering, because of lazy loading, I cannot 
 commit a transaction if I don't know another Session will be opened 
 immediately and not to be closed until the end of the request cycle.

 Hibernate typically bounds the Session to the current thread. But was is the 
 current thread in a Wicket Application? Are those threads pooled? Could the 
 same session be used in two requests, when no commit happened?

 Thanks in advance,
 Christian




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



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



Re: Lazy Open Session In View with AOP

2009-05-06 Thread James Carman
You can try using the filter, just set the singleSession property to false.


On Wed, May 6, 2009 at 2:29 PM, Christian Helmbold
christian.helmb...@yahoo.de wrote:

 Hello,

 I want to use the Open Session In View Pattern with Wicket, but I don't want 
 to open a Hibernate Session for every request like the ServletFilter approach 
 does.

 I looked at the lazy-loading Open Session in View for JPA implementation 
 from Wille Faler. 
 http://faler.wordpress.com/2009/04/30/building-a-more-scalable-open-session-in-view/
  He uses AOP instead of a ServletFilter to intercept only those method calls 
 that need an EntityManager.

 My plan is to build something similar for Hibernate with Spring AOP. The 
 solutions would consist of the following steps:

 1. An aspect creates a new Hibernate Session, if a method is called, that 
 needs one and none is already open.
 2. The transaction runs.
 3. The RequestCycle commits the transaction and closes the session. Or 
 rollback, if an exception was thrown.

 Is something wrong with it?

 The Hibernate Reference says: When the transaction ends, either through 
 commit or roll back, the current Session is closed automatically.
 https://www.hibernate.org/42.html#A6

 This means that only one transaction can be executed in one request, right? 
 But what is, if I need more than one transaction per request? Since I have to 
 hold the session open during rendering, because of lazy loading, I cannot 
 commit a transaction if I don't know another Session will be opened 
 immediately and not to be closed until the end of the request cycle.

 Hibernate typically bounds the Session to the current thread. But was is the 
 current thread in a Wicket Application? Are those threads pooled? Could the 
 same session be used in two requests, when no commit happened?

 Thanks in advance,
 Christian




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



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



Re: Detaching models

2009-05-06 Thread Jeremy Thomerson
In 1.5 Igor is planning on doing this.  He's planning on making it
such that any IModel that your component holds as a field is
auto-detached.

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




2009/5/6 Uwe Schäfer schae...@thomas-daily.de:
 hi

 we have a problem here, which we think might be a common one, so i´d like to
 discuss.

 from time to time we create models (mostly LDMs) that are not actually
 reachable by components. (yes, you can argue that this is stupid, but it
 happens where 1:1 mapping between component and model is not easy to apply)

 the problem arising from there is of course that wicket does not know about
 this IModel and so wont detach() it.

 yes, we could use Component.detach() as a hook to detach that LDM as well,
 but i tend to forget that.

 if there were a central place to register IDetachables, life would be
 simpler. from what i´ve seen, detach is not guaranteed to be called only
 once, so we could do:

 MyAbstractReadOnlyModel(){
  MyRequestCycle.get().registerForDetachment(this);}

 and to

 MyRequestCycle.detach(){
  super.detach();
  for(IDetachable d : this.setOfRegisteredIDetachables){
  d.detach();
  }
  this.registeredIDetachables.clear();
  ...

 as well as

 MyRequestCycle.registerForDetachment(IDetachable d);

 wouldn´t it make sense to have something like this in the framework?
 one drawback is that direct implementations of IModel could not be covered,
 but still it would be more convenient to just register them somewhere
 instead of overwriting the detach methods of their containers if we want
 them detached.

 any thoughts, apart from the ones that claim this not to be a valid use of
 IModel? :)

 cu uwe

 --
 THOMAS DAILY GmbH
 Adlerstraße 19
 79098 Freiburg
 Deutschland
 T  + 49 761 3 85 59 410
 F  + 49 761 3 85 59 550
 E  lar...@thomas-daily.de
 www.thomas-daily.de

 Geschäftsführer/Managing Directors:
 Wendy Thomas, Susanne Larbig
 Handelsregister Freiburg i.Br., HRB 3947




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



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



Re: DropDownChoice with ChoiceRender problem

2009-05-06 Thread Phillip Rhodes
Thanks for the solution.
I found this post here (so the reader is getting off easy:)

http://steve-on-sakai.blogspot.com/2008/12/using-hashmap-with-dropdownchoice.html


-Original Message-
From: James Carman jcar...@carmanconsulting.com
Sent: Tuesday, May 5, 2009 12:55pm
To: users@wicket.apache.org
Subject: Re: DropDownChoice with ChoiceRender problem

On Tue, May 5, 2009 at 9:37 AM, Phillip Rhodes
spamsu...@rhoderunner.com wrote:
 I want to display Yes to the user in the dropdown.  If the user selects 
 Yes, I want address.handicapAccess string property to be set to Y

 Do you still think a map-based rendererer is the way to go?

Yes, I would do it that way.  That seems easiest to me.  I do that
stuff sometimes and I declare my map to be static:

private static MapString,String CHOICES_MAP = new HashMapString,String();
static
{
  CHOICES_MAP.put(Y, Yes);
  CHOICES_MAP.put(N, No);
  CHOICES_MAP.put(U, Unknown);
}

Then, just use your map in your renderer (I'll leave that exercise up
to the reader).  You could even use resource keys instead of
hard-coded labels.  That way, the Yes stuff would be in properties
files.  Enjoy!

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




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



Re: Maven setup

2009-05-06 Thread Dane Laverty
There's a basic installation guide for Maven, Eclipse, and Wicket on the
wiki:
http://cwiki.apache.org/WICKET/windows-guide-to-installing-wicket-on-eclipse-with-maven.html

Dane

On Wed, May 6, 2009 at 11:36 AM, David Brown
dbr...@sexingtechnologies.comwrote:

 Hello Frank, I can't answer all the questions but...

 * I'm a 10+ year nearly Java only developer. I was initially very impressed
 with databinder but the only real support for databinder I could find is @:
 http://code.google.com/p/wicket-web-beans/
 * I have 1.3.5 running in Eclipse (Ganymede) with Maven OK and I plan to
 upgrade to 1.3.6 as my new gig requires this framework.
 * Hibernate is a great ORM gadget but it is not 100% Java so PermGen space
 can be an issue. So, as an alternative you could investigate iBatis and I
 think Wicket also does well in the DAO arena. I'm only 100 pp into the WIA
 book so obviously you will need more folks chipping in with better
 experience.

 There are 10 kinds of people in this world: those who understand binary and
 those who don’t (Valid only for 2's complement).

 - Original Message -
 From: Frank Tegtmeyer frank.tegtme...@online-systemhaus.com
 To: users@wicket.apache.org
 Sent: Wednesday, May 6, 2009 5:47:25 AM GMT -06:00 US/Canada Central
 Subject: Maven setup

 Hi,

 does anybody have a Wicket quickstart project updated
 to the latest versions?

 I am new to Java, to Maven and to Wicket of course too.
 I have a background in web developing with Zope and
 Django (all implemented in Python) but am forced to use
 Java now. I know that the learning curve will be steep
 and I got some showstoppers already :)

 After reading much about many Java frameworks and some
 frustrating tests with JSF I've chosen Wicket because
 it fits my requirements best. I've done some tests
 with databinder which promoted Maven heavily, so I
 want to use Maven too.

 I'm still struggling with the whole setup - the following
 issues are still not clear to me:

 - Maven setup - Wicket dependency doesn't work for 1.3.5
  nor for 1.3.6 although the website says so
  (data at the end of this message)
  Possibly another repository required?
 - integration with Eclipse - Maven goal or Eclipse plugin
  or both?
 - I want to use embedded Jetty also for production
  (running the application behind lighttpd).
  How to do deployment in an elegant way?
  There is only SSH access to my server.
 - Hibernate integration - does databinder help much
  or is it better to learn Hibernate directly? I saw
  that databinder always is somewhat behind the
  current versions, so that may be an issue.

 I hope these are not too stupid questions and someone will
 find the time to answer them.

 With kind regards,
 Frank

 The Maven dependency for wicket:

 dependency
  groupIdwicket/groupId
  artifactIdwicket/artifactId
  version1.3.5/version
 /dependency

 The error:

 [INFO]task-segment: [compile]
 [INFO]
 
 [INFO] [resources:resources]
 [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
 resources, i.e. build is platform dependent!
 [INFO] Copying 1 resource
 Downloading:
 http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.pom
 [INFO] Unable to find resource 'wicket:wicket:pom:1.3.5' in repository
 central (http://repo1.maven.org/maven2)
 [INFO] artifact wicket:wicket-extensions: checking for updates from
 central
 [INFO] artifact mysql:mysql-connector-java: checking for updates from
 central
 [INFO] artifact org.mortbay.jetty:jetty: checking for updates from central
 Downloading:
 http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.jar
 [INFO] Unable to find resource 'wicket:wicket:jar:1.3.5' in repository
 central (http://repo1.maven.org/maven2)
 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] Failed to resolve artifact.


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


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




Re: DropDownChoice with ChoiceRender problem

2009-05-06 Thread James Carman
Darn it, Steve on Sakai! ;)  Glad to help!

On Wed, May 6, 2009 at 2:38 PM, Phillip Rhodes
spamsu...@rhoderunner.com wrote:
 Thanks for the solution.
 I found this post here (so the reader is getting off easy:)

 http://steve-on-sakai.blogspot.com/2008/12/using-hashmap-with-dropdownchoice.html


 -Original Message-
 From: James Carman jcar...@carmanconsulting.com
 Sent: Tuesday, May 5, 2009 12:55pm
 To: users@wicket.apache.org
 Subject: Re: DropDownChoice with ChoiceRender problem

 On Tue, May 5, 2009 at 9:37 AM, Phillip Rhodes
 spamsu...@rhoderunner.com wrote:
 I want to display Yes to the user in the dropdown.  If the user selects 
 Yes, I want address.handicapAccess string property to be set to Y

 Do you still think a map-based rendererer is the way to go?

 Yes, I would do it that way.  That seems easiest to me.  I do that
 stuff sometimes and I declare my map to be static:

 private static MapString,String CHOICES_MAP = new HashMapString,String();
 static
 {
  CHOICES_MAP.put(Y, Yes);
  CHOICES_MAP.put(N, No);
  CHOICES_MAP.put(U, Unknown);
 }

 Then, just use your map in your renderer (I'll leave that exercise up
 to the reader).  You could even use resource keys instead of
 hard-coded labels.  That way, the Yes stuff would be in properties
 files.  Enjoy!

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




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



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



Re: Detaching models

2009-05-06 Thread Igor Vaynberg
you can do this now, no need to wait for 1.5. simply create a
detachlistener that scans the class for imodel fields and detaches
them.

-igor

On Wed, May 6, 2009 at 11:38 AM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 In 1.5 Igor is planning on doing this.  He's planning on making it
 such that any IModel that your component holds as a field is
 auto-detached.

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




 2009/5/6 Uwe Schäfer schae...@thomas-daily.de:
 hi

 we have a problem here, which we think might be a common one, so i´d like to
 discuss.

 from time to time we create models (mostly LDMs) that are not actually
 reachable by components. (yes, you can argue that this is stupid, but it
 happens where 1:1 mapping between component and model is not easy to apply)

 the problem arising from there is of course that wicket does not know about
 this IModel and so wont detach() it.

 yes, we could use Component.detach() as a hook to detach that LDM as well,
 but i tend to forget that.

 if there were a central place to register IDetachables, life would be
 simpler. from what i´ve seen, detach is not guaranteed to be called only
 once, so we could do:

 MyAbstractReadOnlyModel(){
  MyRequestCycle.get().registerForDetachment(this);}

 and to

 MyRequestCycle.detach(){
  super.detach();
  for(IDetachable d : this.setOfRegisteredIDetachables){
  d.detach();
  }
  this.registeredIDetachables.clear();
  ...

 as well as

 MyRequestCycle.registerForDetachment(IDetachable d);

 wouldn´t it make sense to have something like this in the framework?
 one drawback is that direct implementations of IModel could not be covered,
 but still it would be more convenient to just register them somewhere
 instead of overwriting the detach methods of their containers if we want
 them detached.

 any thoughts, apart from the ones that claim this not to be a valid use of
 IModel? :)

 cu uwe

 --
 THOMAS DAILY GmbH
 Adlerstraße 19
 79098 Freiburg
 Deutschland
 T  + 49 761 3 85 59 410
 F  + 49 761 3 85 59 550
 E  lar...@thomas-daily.de
 www.thomas-daily.de

 Geschäftsführer/Managing Directors:
 Wendy Thomas, Susanne Larbig
 Handelsregister Freiburg i.Br., HRB 3947




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



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



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



AW: Lazy Open Session In View with AOP

2009-05-06 Thread Christian Helmbold

Thanks for your answer. 

I know the OpenSessionInViewFilterfrom Spring, but it opens a new Hibernate 
Session for every request even if you request an image.


- Ursprüngliche Mail 
 Von: Carlo Camerino cmcamer...@gmail.com
 An: users@wicket.apache.org
 Gesendet: Mittwoch, den 6. Mai 2009, 20:33:44 Uhr
 Betreff: Re: Lazy Open Session In View with AOP
 
 spring has implemented itw own opensessioninview filter.,
 i dont' think that you have to crete your own
 
 Spring has a class like this which you can declare in your web.xml
 OpenSessionInViewFilter





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



Re: Detaching models

2009-05-06 Thread James Carman
Refer to the injection code to find out how to do the scanning.

On Wed, May 6, 2009 at 2:47 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 you can do this now, no need to wait for 1.5. simply create a
 detachlistener that scans the class for imodel fields and detaches
 them.

 -igor

 On Wed, May 6, 2009 at 11:38 AM, Jeremy Thomerson
 jer...@wickettraining.com wrote:
 In 1.5 Igor is planning on doing this.  He's planning on making it
 such that any IModel that your component holds as a field is
 auto-detached.

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




 2009/5/6 Uwe Schäfer schae...@thomas-daily.de:
 hi

 we have a problem here, which we think might be a common one, so i´d like to
 discuss.

 from time to time we create models (mostly LDMs) that are not actually
 reachable by components. (yes, you can argue that this is stupid, but it
 happens where 1:1 mapping between component and model is not easy to apply)

 the problem arising from there is of course that wicket does not know about
 this IModel and so wont detach() it.

 yes, we could use Component.detach() as a hook to detach that LDM as well,
 but i tend to forget that.

 if there were a central place to register IDetachables, life would be
 simpler. from what i´ve seen, detach is not guaranteed to be called only
 once, so we could do:

 MyAbstractReadOnlyModel(){
  MyRequestCycle.get().registerForDetachment(this);}

 and to

 MyRequestCycle.detach(){
  super.detach();
  for(IDetachable d : this.setOfRegisteredIDetachables){
  d.detach();
  }
  this.registeredIDetachables.clear();
  ...

 as well as

 MyRequestCycle.registerForDetachment(IDetachable d);

 wouldn´t it make sense to have something like this in the framework?
 one drawback is that direct implementations of IModel could not be covered,
 but still it would be more convenient to just register them somewhere
 instead of overwriting the detach methods of their containers if we want
 them detached.

 any thoughts, apart from the ones that claim this not to be a valid use of
 IModel? :)

 cu uwe

 --
 THOMAS DAILY GmbH
 Adlerstraße 19
 79098 Freiburg
 Deutschland
 T  + 49 761 3 85 59 410
 F  + 49 761 3 85 59 550
 E  lar...@thomas-daily.de
 www.thomas-daily.de

 Geschäftsführer/Managing Directors:
 Wendy Thomas, Susanne Larbig
 Handelsregister Freiburg i.Br., HRB 3947




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



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



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



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



Re: Maven setup

2009-05-06 Thread nino martinez wael
And theres even two free books on maven

http://www.sonatype.com/products/maven/documentation/book-defguide

http://www.jroller.com/carlossg/entry/better_builds_with_maven_free

I'd skip the parts about maestro and just use hudson or continium :)



2009/5/6 Dane Laverty danelave...@gmail.com:
 There's a basic installation guide for Maven, Eclipse, and Wicket on the
 wiki:
 http://cwiki.apache.org/WICKET/windows-guide-to-installing-wicket-on-eclipse-with-maven.html

 Dane

 On Wed, May 6, 2009 at 11:36 AM, David Brown
 dbr...@sexingtechnologies.comwrote:

 Hello Frank, I can't answer all the questions but...

 * I'm a 10+ year nearly Java only developer. I was initially very impressed
 with databinder but the only real support for databinder I could find is @:
 http://code.google.com/p/wicket-web-beans/
 * I have 1.3.5 running in Eclipse (Ganymede) with Maven OK and I plan to
 upgrade to 1.3.6 as my new gig requires this framework.
 * Hibernate is a great ORM gadget but it is not 100% Java so PermGen space
 can be an issue. So, as an alternative you could investigate iBatis and I
 think Wicket also does well in the DAO arena. I'm only 100 pp into the WIA
 book so obviously you will need more folks chipping in with better
 experience.

 There are 10 kinds of people in this world: those who understand binary and
 those who don’t (Valid only for 2's complement).

 - Original Message -
 From: Frank Tegtmeyer frank.tegtme...@online-systemhaus.com
 To: users@wicket.apache.org
 Sent: Wednesday, May 6, 2009 5:47:25 AM GMT -06:00 US/Canada Central
 Subject: Maven setup

 Hi,

 does anybody have a Wicket quickstart project updated
 to the latest versions?

 I am new to Java, to Maven and to Wicket of course too.
 I have a background in web developing with Zope and
 Django (all implemented in Python) but am forced to use
 Java now. I know that the learning curve will be steep
 and I got some showstoppers already :)

 After reading much about many Java frameworks and some
 frustrating tests with JSF I've chosen Wicket because
 it fits my requirements best. I've done some tests
 with databinder which promoted Maven heavily, so I
 want to use Maven too.

 I'm still struggling with the whole setup - the following
 issues are still not clear to me:

 - Maven setup - Wicket dependency doesn't work for 1.3.5
  nor for 1.3.6 although the website says so
  (data at the end of this message)
  Possibly another repository required?
 - integration with Eclipse - Maven goal or Eclipse plugin
  or both?
 - I want to use embedded Jetty also for production
  (running the application behind lighttpd).
  How to do deployment in an elegant way?
  There is only SSH access to my server.
 - Hibernate integration - does databinder help much
  or is it better to learn Hibernate directly? I saw
  that databinder always is somewhat behind the
  current versions, so that may be an issue.

 I hope these are not too stupid questions and someone will
 find the time to answer them.

 With kind regards,
 Frank

 The Maven dependency for wicket:

 dependency
  groupIdwicket/groupId
  artifactIdwicket/artifactId
  version1.3.5/version
 /dependency

 The error:

 [INFO]    task-segment: [compile]
 [INFO]
 
 [INFO] [resources:resources]
 [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
 resources, i.e. build is platform dependent!
 [INFO] Copying 1 resource
 Downloading:
 http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.pom
 [INFO] Unable to find resource 'wicket:wicket:pom:1.3.5' in repository
 central (http://repo1.maven.org/maven2)
 [INFO] artifact wicket:wicket-extensions: checking for updates from
 central
 [INFO] artifact mysql:mysql-connector-java: checking for updates from
 central
 [INFO] artifact org.mortbay.jetty:jetty: checking for updates from central
 Downloading:
 http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.jar
 [INFO] Unable to find resource 'wicket:wicket:jar:1.3.5' in repository
 central (http://repo1.maven.org/maven2)
 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] Failed to resolve artifact.


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


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




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



Re: Maven setup

2009-05-06 Thread nino martinez wael
I really like better builds..

2009/5/6 nino martinez wael nino.martinez.w...@gmail.com:
 And theres even two free books on maven

 http://www.sonatype.com/products/maven/documentation/book-defguide

 http://www.jroller.com/carlossg/entry/better_builds_with_maven_free

 I'd skip the parts about maestro and just use hudson or continium :)



 2009/5/6 Dane Laverty danelave...@gmail.com:
 There's a basic installation guide for Maven, Eclipse, and Wicket on the
 wiki:
 http://cwiki.apache.org/WICKET/windows-guide-to-installing-wicket-on-eclipse-with-maven.html

 Dane

 On Wed, May 6, 2009 at 11:36 AM, David Brown
 dbr...@sexingtechnologies.comwrote:

 Hello Frank, I can't answer all the questions but...

 * I'm a 10+ year nearly Java only developer. I was initially very impressed
 with databinder but the only real support for databinder I could find is @:
 http://code.google.com/p/wicket-web-beans/
 * I have 1.3.5 running in Eclipse (Ganymede) with Maven OK and I plan to
 upgrade to 1.3.6 as my new gig requires this framework.
 * Hibernate is a great ORM gadget but it is not 100% Java so PermGen space
 can be an issue. So, as an alternative you could investigate iBatis and I
 think Wicket also does well in the DAO arena. I'm only 100 pp into the WIA
 book so obviously you will need more folks chipping in with better
 experience.

 There are 10 kinds of people in this world: those who understand binary and
 those who don’t (Valid only for 2's complement).

 - Original Message -
 From: Frank Tegtmeyer frank.tegtme...@online-systemhaus.com
 To: users@wicket.apache.org
 Sent: Wednesday, May 6, 2009 5:47:25 AM GMT -06:00 US/Canada Central
 Subject: Maven setup

 Hi,

 does anybody have a Wicket quickstart project updated
 to the latest versions?

 I am new to Java, to Maven and to Wicket of course too.
 I have a background in web developing with Zope and
 Django (all implemented in Python) but am forced to use
 Java now. I know that the learning curve will be steep
 and I got some showstoppers already :)

 After reading much about many Java frameworks and some
 frustrating tests with JSF I've chosen Wicket because
 it fits my requirements best. I've done some tests
 with databinder which promoted Maven heavily, so I
 want to use Maven too.

 I'm still struggling with the whole setup - the following
 issues are still not clear to me:

 - Maven setup - Wicket dependency doesn't work for 1.3.5
  nor for 1.3.6 although the website says so
  (data at the end of this message)
  Possibly another repository required?
 - integration with Eclipse - Maven goal or Eclipse plugin
  or both?
 - I want to use embedded Jetty also for production
  (running the application behind lighttpd).
  How to do deployment in an elegant way?
  There is only SSH access to my server.
 - Hibernate integration - does databinder help much
  or is it better to learn Hibernate directly? I saw
  that databinder always is somewhat behind the
  current versions, so that may be an issue.

 I hope these are not too stupid questions and someone will
 find the time to answer them.

 With kind regards,
 Frank

 The Maven dependency for wicket:

 dependency
  groupIdwicket/groupId
  artifactIdwicket/artifactId
  version1.3.5/version
 /dependency

 The error:

 [INFO]    task-segment: [compile]
 [INFO]
 
 [INFO] [resources:resources]
 [WARNING] Using platform encoding (Cp1252 actually) to copy filtered
 resources, i.e. build is platform dependent!
 [INFO] Copying 1 resource
 Downloading:
 http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.pom
 [INFO] Unable to find resource 'wicket:wicket:pom:1.3.5' in repository
 central (http://repo1.maven.org/maven2)
 [INFO] artifact wicket:wicket-extensions: checking for updates from
 central
 [INFO] artifact mysql:mysql-connector-java: checking for updates from
 central
 [INFO] artifact org.mortbay.jetty:jetty: checking for updates from central
 Downloading:
 http://mirrors.sunsite.dk/maven2/wicket/wicket/1.3.5/wicket-1.3.5.jar
 [INFO] Unable to find resource 'wicket:wicket:jar:1.3.5' in repository
 central (http://repo1.maven.org/maven2)
 [INFO]
 
 [ERROR] BUILD ERROR
 [INFO]
 
 [INFO] Failed to resolve artifact.


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


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





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

AW: Lazy Open Session In View with AOP

2009-05-06 Thread Christian Helmbold

Thanks for this hint. 

 The Spring API doc says:

If set to false, each data access operation or transaction will use its own 
session (like without Open Session in View). Each of those sessions will be 
registered for deferred close, though, actually processed at request 
completion.
http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.html#setSingleSession(boolean)

I don't understand who sessions are opened with this setting. 




- Ursprüngliche Mail 
 Von: James Carman jcar...@carmanconsulting.com
 An: users@wicket.apache.org
 Gesendet: Mittwoch, den 6. Mai 2009, 20:34:27 Uhr
 Betreff: Re: Lazy Open Session In View with AOP
 
 You can try using the filter, just set the singleSession property to false.




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



Re: Detaching models

2009-05-06 Thread Uwe Schäfer

James Carman schrieb:


Refer to the injection code to find out how to do the scanning.

you can do this now, no need to wait for 1.5. simply create a
detachlistener that scans the class for imodel fields and detaches
them.


awesome. i was not aware of this one. thanks.

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



Re: How to manipulate values in a data table?

2009-05-06 Thread Michael O'Cleirigh

Hello,

The easy way is to create a custom column and use that to convert the value.

i.e. extend ProperyColumn and override the   protected IModel? 
createLabelModel(IModelT rowModel) method such that it converts the 
inner value (0 or 1) into the string value you want.



   @SuppressWarnings(unchecked)
   protected IModel? createLabelModel(IModelT rowModel)
   {
   // here we use a wrapping model that will convert the integer 
value returned from the property model.
   return new IntegerToStringModel (PropertyModel(rowModel, 
propertyExpression), new String[] {Sent, Not Sent});

   }


// this class converts the integer to one of the defined options.
public class IntegerToStringModel extends AbstractReadOnlyModelString {

   private final IModelIntegerintegerModel;
   private final String[]options;

   /**
*
*/
   public IntegerToStringModel(IModelInteger integerModel, String[] 
options) {


   this.integerModel = integerModel;
   this.options = options;

   // TODO Auto-generated constructor stub
   }

   /*
* (non-Javadoc)
*
* @see org.apache.wicket.model.AbstractReadOnlyModel#getObject()
*/
   @Override
   public Object getObject() {

   int value = this.integerModel.getObject();

   switch (value) {
   case 0:
   return options[0];
   case 1:
   return options[1];
   default:
   return undefined;

   }
   }
}

Regards,

Mike



Hey,
I have a message class that has a status (which it is an integer)
 to indicate whether the message has been sent successfully.
Inside a data table, how to handle this integer values so instead
 of displaying 0 or 1, it displays Sent or Not Sent?
Thanks.   



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

  



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



Modifying LinkTree

2009-05-06 Thread Major Péter

Hi all,

I'm using a LinkTree in my app, which is pretty much the SimpleTree 
implementation at Wicket Ajax Examples ( 
http://www.wicket-library.com/wicket-examples/ajax/tree/simple.1 ), but 
I have to make it custom somehow. At this time the treenodes are links 
to different pages.

The things, that I need to do with the tree:
- some of the nodes are just containers, so I don't want to have a link 
to these items
- if I'm using right click - open in new tab on a node, then the new 
tab will show me the same tree (just closed), not the page that I 
originally wanted to show. (Is this a bug or feature?)
I'm quite new to Ajax, are there some good books out there about Ajax, 
from which I can learn things from the beginning?


Thanks in advance.


Best Regards,
Peter Major

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



Re: Lazy Open Session In View with AOP

2009-05-06 Thread James Carman
If you use the @Transactional annotation (or define your transactions
in the XML), Spring will take care of the transactions for you
automagically.

On Wed, May 6, 2009 at 3:05 PM, Christian Helmbold
christian.helmb...@yahoo.de wrote:

 Thanks for this hint.

  The Spring API doc says:

 If set to false, each data access operation or transaction will use its 
 own session (like without Open Session in View). Each of those sessions will 
 be registered for deferred close, though, actually processed at request 
 completion.
 http://static.springframework.org/spring/docs/2.5.x/api/org/springframework/orm/hibernate3/support/OpenSessionInViewFilter.html#setSingleSession(boolean)

 I don't understand who sessions are opened with this setting.




 - Ursprüngliche Mail 
 Von: James Carman jcar...@carmanconsulting.com
 An: users@wicket.apache.org
 Gesendet: Mittwoch, den 6. Mai 2009, 20:34:27 Uhr
 Betreff: Re: Lazy Open Session In View with AOP

 You can try using the filter, just set the singleSession property to false.




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



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



Re: Detaching models

2009-05-06 Thread Johan Compagner
Doesnt he say that the models arew really not reachable by the
components? So how would that field scanning then work? If it are
fields on components the currently the thing to do is simpel just make
sure that those fields are detached in the detach method of the
component that has those fields

On 06/05/2009, Jeremy Thomerson jer...@wickettraining.com wrote:
 In 1.5 Igor is planning on doing this.  He's planning on making it
 such that any IModel that your component holds as a field is
 auto-detached.

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




 2009/5/6 Uwe Schäfer schae...@thomas-daily.de:
 hi

 we have a problem here, which we think might be a common one, so i´d like
 to
 discuss.

 from time to time we create models (mostly LDMs) that are not actually
 reachable by components. (yes, you can argue that this is stupid, but it
 happens where 1:1 mapping between component and model is not easy to
 apply)

 the problem arising from there is of course that wicket does not know
 about
 this IModel and so wont detach() it.

 yes, we could use Component.detach() as a hook to detach that LDM as well,
 but i tend to forget that.

 if there were a central place to register IDetachables, life would be
 simpler. from what i´ve seen, detach is not guaranteed to be called only
 once, so we could do:

 MyAbstractReadOnlyModel(){
  MyRequestCycle.get().registerForDetachment(this);}

 and to

 MyRequestCycle.detach(){
  super.detach();
  for(IDetachable d : this.setOfRegisteredIDetachables){
  d.detach();
  }
  this.registeredIDetachables.clear();
  ...

 as well as

 MyRequestCycle.registerForDetachment(IDetachable d);

 wouldn´t it make sense to have something like this in the framework?
 one drawback is that direct implementations of IModel could not be
 covered,
 but still it would be more convenient to just register them somewhere
 instead of overwriting the detach methods of their containers if we want
 them detached.

 any thoughts, apart from the ones that claim this not to be a valid use of
 IModel? :)

 cu uwe

 --
 THOMAS DAILY GmbH
 Adlerstraße 19
 79098 Freiburg
 Deutschland
 T  + 49 761 3 85 59 410
 F  + 49 761 3 85 59 550
 E  lar...@thomas-daily.de
 www.thomas-daily.de

 Geschäftsführer/Managing Directors:
 Wendy Thomas, Susanne Larbig
 Handelsregister Freiburg i.Br., HRB 3947




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



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



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



Re: Spring Security's method security and Wicket

2009-05-06 Thread Kent Larsson
I don't know. I guess something like:

1. Record the request data (like with URL interception) then let the
method call fail  roll-back transactions
2. Show log in page
3. Play the recorded request and hope the call was determenistic

But maybe I just misinterpreted him. Or maybe it would work with
Spring MVC if they have this built into their architecture. But it
sounds strange so I understand why you ask.

Best regards, Kent


On Wed, May 6, 2009 at 7:46 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 On Wed, May 6, 2009 at 10:25 AM, Kent Larsson kent.lars...@gmail.com wrote:
 2. At this point, the method call is intercepted by Spring and I
 _think_ I should get the option to log in here. However I do not get
 this option, instead I'm shown a stack trace.

 how is (2) accomplished?

 -igor



 I'm really banging my head against the wall here. I just wanted to ask
 here if this could have anything with the Wicket-Spring-IOC project?

 I would suspect no and that I'm to blame, but I'm also having a really
 hard time finding the source of the problem. If you have any tip for
 my as well I would really appreciate it! ;-)

 Best regards, Kent

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



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



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



Re: Detaching models

2009-05-06 Thread Igor Vaynberg
i thought not reachable means they are not in any default model slot...dunno

-igor

On Wed, May 6, 2009 at 1:17 PM, Johan Compagner jcompag...@gmail.com wrote:
 Doesnt he say that the models arew really not reachable by the
 components? So how would that field scanning then work? If it are
 fields on components the currently the thing to do is simpel just make
 sure that those fields are detached in the detach method of the
 component that has those fields

 On 06/05/2009, Jeremy Thomerson jer...@wickettraining.com wrote:
 In 1.5 Igor is planning on doing this.  He's planning on making it
 such that any IModel that your component holds as a field is
 auto-detached.

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




 2009/5/6 Uwe Schäfer schae...@thomas-daily.de:
 hi

 we have a problem here, which we think might be a common one, so i´d like
 to
 discuss.

 from time to time we create models (mostly LDMs) that are not actually
 reachable by components. (yes, you can argue that this is stupid, but it
 happens where 1:1 mapping between component and model is not easy to
 apply)

 the problem arising from there is of course that wicket does not know
 about
 this IModel and so wont detach() it.

 yes, we could use Component.detach() as a hook to detach that LDM as well,
 but i tend to forget that.

 if there were a central place to register IDetachables, life would be
 simpler. from what i´ve seen, detach is not guaranteed to be called only
 once, so we could do:

 MyAbstractReadOnlyModel(){
  MyRequestCycle.get().registerForDetachment(this);}

 and to

 MyRequestCycle.detach(){
  super.detach();
  for(IDetachable d : this.setOfRegisteredIDetachables){
  d.detach();
  }
  this.registeredIDetachables.clear();
  ...

 as well as

 MyRequestCycle.registerForDetachment(IDetachable d);

 wouldn´t it make sense to have something like this in the framework?
 one drawback is that direct implementations of IModel could not be
 covered,
 but still it would be more convenient to just register them somewhere
 instead of overwriting the detach methods of their containers if we want
 them detached.

 any thoughts, apart from the ones that claim this not to be a valid use of
 IModel? :)

 cu uwe

 --
 THOMAS DAILY GmbH
 Adlerstraße 19
 79098 Freiburg
 Deutschland
 T  + 49 761 3 85 59 410
 F  + 49 761 3 85 59 550
 E  lar...@thomas-daily.de
 www.thomas-daily.de

 Geschäftsführer/Managing Directors:
 Wendy Thomas, Susanne Larbig
 Handelsregister Freiburg i.Br., HRB 3947




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



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



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



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



Inmethod Grid - adding / removing columns

2009-05-06 Thread Flavius

I just implemented the inmethod grid control (very cool, btw)
and I'm looking for a way to add and remove columns to the
grid using DnD.  

What I envision is a div opening above the grid with a list of
available columns.  The user can then drag the columns
onto the grid (ideally into the exact position they want
the column to be in).  In addition they could drag columns
from the grid onto this div.

It looks like the grid is using some yui functionality, so I
thought having a org.wicketstuff.yui.markup.html.sortable.SortableList
and a repeating view for the availableColumns list, or something
like that.

I don't see any exposed methods in the grid functionality to process
the drop functionality, though.

Before I go too far down this path, can somebody give me some 
insight as to how I can go about accomplishing this?

If I can just get an onDrop method to fire when moving items back
and forth, the rest should be straight forward (adding/removing the
column and refreshing the data).

Thanks very much.


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



radiochoice and propertymodel ignoring converter (wicket 1.3.5)

2009-05-06 Thread james o'brien
I have a custom converter registered for Boolean.class that converts yes
to Boolean(true) and no to Boolean(false).  When the RadioChoice loads the
converter is never called.


code

private static final ListString IRREGULAR_HEARTBEAT =
Arrays.asList(newString[] {
yes, no });

RadioChoice irregular = new RadioChoice(irregularHeartbeat,
newPropertyModel(bloodPressure,

irregularHeartbeat), IRREGULAR_HEARTBEAT).setSuffix( );


BloodPressure Object:


public Boolean isIrregularHeartbeat() {

return bloodPressure.isIrregularHeartbeat();

}

public void setIrregularHeartbeat(Boolean value) {

bloodPressure.setIrregularHeartbeat(value);

}

/code

Thanks,
--jim


Re: radiochoice and propertymodel ignoring converter (wicket 1.3.5)

2009-05-06 Thread Igor Vaynberg
that kind of conversion should go into ichoicerenderer implementation.
the converter is used to convert between browser's on/ values to
true and false.

this is the sig of the constructor from 1.4, hopefully generics will
clear up how this works for you

public RadioChoice(final String id, IModelT model, final List?
extends T choices, IChoiceRendererT renderer)

in your case T is Boolean.

-igor

On Wed, May 6, 2009 at 2:18 PM, james o'brien jobr...@spinnphr.com wrote:
 I have a custom converter registered for Boolean.class that converts yes
 to Boolean(true) and no to Boolean(false).  When the RadioChoice loads the
 converter is never called.


 code

 private static final ListString IRREGULAR_HEARTBEAT =
 Arrays.asList(newString[] {
 yes, no });

 RadioChoice irregular = new RadioChoice(irregularHeartbeat,
 newPropertyModel(bloodPressure,

 irregularHeartbeat), IRREGULAR_HEARTBEAT).setSuffix( );


 BloodPressure Object:


 public Boolean isIrregularHeartbeat() {

 return bloodPressure.isIrregularHeartbeat();

 }

 public void setIrregularHeartbeat(Boolean value) {

 bloodPressure.setIrregularHeartbeat(value);

 }

 /code

 Thanks,
 --jim


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



Re: Detaching models

2009-05-06 Thread Uwe Schäfer

Igor Vaynberg schrieb:

i thought not reachable means they are not in any default model slot...dunno


yep, that´s what i meant. sorry i wasn´t clear on that one.

using the listener to test the fields for IDetachable works pretty well. 
thanks again.



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



Re: Detaching models

2009-05-06 Thread Uwe Schäfer

Johan Compagner schrieb:

If it are
fields on components the currently the thing to do is simpel just make
sure that those fields are detached in the detach method of the
component that has those fields


sure, but this is quite easy to forget (that´s what i´m good at), so 
doing it from the Listener looks much safer to me :)


thanks, uwe

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



Re: Detaching models

2009-05-06 Thread Igor Vaynberg
the standard way to handle this is to override component's ondetach()
and call detach() on the models directly.

-igor

2009/5/6 Uwe Schäfer u...@thomas-daily.de:
 Johan Compagner schrieb:

 If it are
 fields on components the currently the thing to do is simpel just make
 sure that those fields are detached in the detach method of the
 component that has those fields

 sure, but this is quite easy to forget (that´s what i´m good at), so doing
 it from the Listener looks much safer to me :)

 thanks, uwe

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



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



Re: Detaching models

2009-05-06 Thread Johan Compagner
And for detecting if you did detach everything you could use a
serializable checker and/or specific object checker that will test
your complete page after it is detached. (or should be detached)

On 07/05/2009, Uwe Schäfer u...@thomas-daily.de wrote:
 Johan Compagner schrieb:
 If it are
 fields on components the currently the thing to do is simpel just make
 sure that those fields are detached in the detach method of the
 component that has those fields

 sure, but this is quite easy to forget (that´s what i´m good at), so
 doing it from the Listener looks much safer to me :)

 thanks, uwe

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



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



Re: remember me at login page feature

2009-05-06 Thread Khlystov Alexandr


Thanks, Igor.

Now it is getting clear. Unfortunaотлиly I can't
distinguish library to use from library to use and
modify. I mean since I'm quite new to wicket, it is questionable
step to modify wicket API, because I don't know what else I need can be
based on this functionality.

 if you search this list for
wicket-auth-roles you will see that the
 project is meant as an
example, not as something for you to base your
 project on. if
some piece doesnt do what you want then roll your own
 piece. the
codebase is kept simple on purpose - it has to be easy to
 read -
because it is an example.
 
 -igor
 

On Wed, May 6, 2009 at 7:02 AM, Khlystov Alexandr
a...@ovservice.org
 wrote:


Guys? if really nobody has implemented the auto-login via cookie,
basing
 on
 AuthenticatedWebApplication ???

 Khlystov Alexandr пишет:

 Hello all.

 Previous
answers did not helped me much. Though thanks authors for
 their
 replies.

 I am going to provide more detailed question:

 My App  extends
AuthenticatedWebApplication {

 And I
want to implement auto-login/remember me feature.
 More
precisely - when user submits to browser URL for some Wicket page
 (and user is not yet logged in) he should be able to see
this page
 without
 seeing SignInPage
(if he set at previous session remember me check
 box at
 SignInPage).

 I can't understand how can I achive that with the
 AuthenticatedWebApplication. How can I handle redirecting
user to the
 SignInPage at

org.apache.wicket.authentication;AuthenticatedWebApplication
 final method: onUnauthorizedInstantiation:
 ...
   public final void
onUnauthorizedInstantiation(final Component

component)
   {
   // If there is a
sign in page class declared, and the
 unauthorized
   // component is a page, but it's not the sign in
page
   if (component instanceof Page)
   {
   if
(!AuthenticatedWebSession.get().isSignedIn())
  
{
   // Redirect to intercept page to let the
user sign in
   throw new

RestartResponseAtInterceptPageException(getSignInPageClass());
   }
   else
   {
  
onUnauthorizedPage((Page)component);
   }
   }
   else
 
 {
   // The component was not a page, so throw
an exception
   throw new

UnauthorizedInstantiationException(component.getClass());
   }
   }
 ...

 As it is final I can't override the
line:
 ...
   throw new

RestartResponseAtInterceptPageException(getSignInPageClass());
 ...

 to make setting
SignInPage optional, depending on the cookie, and if

cookie is given from remember me checkbox - than to
authenticate user
 just
 by login
retrieved from the cookie. And do not show SignInPage and do
 not do
 any
redirectToInterceptPage.


Thanks in advance!

 P.S.
 I think Wicket as a project requires more detailed and
features-wide
 reference documentation.

 Khlystov Alexandr пишет:

 Good day.

 Can anyone, please, give an
example, or direct wicket API description
 about
remember me at login page feature.

 Thanks in advance.






--
 Khlystov Alexandr



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


 

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


-- 
___
Best regards, Khlystov Alexandr.
mailto:
a...@ovservice.org


Re: remember me at login page feature

2009-05-06 Thread Igor Vaynberg
you can take the entire wicket-auth-roles source and paste it into
your project, then start hacking away.

-igor

On Wed, May 6, 2009 at 9:11 PM, Khlystov Alexandr a...@ovservice.org wrote:


 Thanks, Igor.

 Now it is getting clear. Unfortunaотлиly I can't
 distinguish library to use from library to use and
 modify. I mean since I'm quite new to wicket, it is questionable
 step to modify wicket API, because I don't know what else I need can be
 based on this functionality.

 if you search this list for
 wicket-auth-roles you will see that the
 project is meant as an
 example, not as something for you to base your
 project on. if
 some piece doesnt do what you want then roll your own
 piece. the
 codebase is kept simple on purpose - it has to be easy to
 read -
 because it is an example.

 -igor


 On Wed, May 6, 2009 at 7:02 AM, Khlystov Alexandr
 a...@ovservice.org
 wrote:


 Guys? if really nobody has implemented the auto-login via cookie,
 basing
 on
 AuthenticatedWebApplication ???

 Khlystov Alexandr пишет:

 Hello all.

 Previous
 answers did not helped me much. Though thanks authors for
 their
 replies.

 I am going to provide more detailed question:

 My App  extends
 AuthenticatedWebApplication {

 And I
 want to implement auto-login/remember me feature.
 More
 precisely - when user submits to browser URL for some Wicket page
 (and user is not yet logged in) he should be able to see
 this page
 without
 seeing SignInPage
 (if he set at previous session remember me check
 box at
 SignInPage).

 I can't understand how can I achive that with the
 AuthenticatedWebApplication. How can I handle redirecting
 user to the
 SignInPage at

 org.apache.wicket.authentication;AuthenticatedWebApplication
 final method: onUnauthorizedInstantiation:
 ...
   public final void
 onUnauthorizedInstantiation(final Component

 component)
   {
       // If there is a
 sign in page class declared, and the
 unauthorized
       // component is a page, but it's not the sign in
 page
       if (component instanceof Page)
       {
           if
 (!AuthenticatedWebSession.get().isSignedIn())

 {
               // Redirect to intercept page to let the
 user sign in
               throw new

 RestartResponseAtInterceptPageException(getSignInPageClass());
           }
           else
           {

 onUnauthorizedPage((Page)component);
           }
       }
       else

  {
           // The component was not a page, so throw
 an exception
           throw new

 UnauthorizedInstantiationException(component.getClass());
       }
   }
 ...

 As it is final I can't override the
 line:
 ...
               throw new

 RestartResponseAtInterceptPageException(getSignInPageClass());
 ...

 to make setting
 SignInPage optional, depending on the cookie, and if

 cookie is given from remember me checkbox - than to
 authenticate user
 just
 by login
 retrieved from the cookie. And do not show SignInPage and do
 not do
 any
 redirectToInterceptPage.


 Thanks in advance!

 P.S.
 I think Wicket as a project requires more detailed and
 features-wide
 reference documentation.

 Khlystov Alexandr пишет:

 Good day.

 Can anyone, please, give an
 example, or direct wicket API description
 about
 remember me at login page feature.

 Thanks in advance.






 --
 Khlystov Alexandr



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




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





 --
 ___
 Best regards, Khlystov Alexandr.
 mailto:
 a...@ovservice.org


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



non-existent Springbean lazy beans only work when name specified

2009-05-06 Thread Antony Stubbs

I think I've found a potential bug/ area for improvement.

We are setting up pure unit tests for a component, and in this test  
case, although the component declares several @SpringBean's, only 1 is  
used. Our tests all work fine when we run them against our test  
spring context, but I wanted to do something more isolated...


So, in our custom injector, we only inject the, let's call it,  
TemplatesDao object. The other 'dao's or whatever, remain un-attended  
to.


This runs fine, in one case, where we specify the names of the beans -  
i.e. @SpringBean(name=templateDao), @SpringBean(name=peopleDao),  
etc, where we ignore the peopleDao bean for example. The fields are  
all set to lazy proxy's, and the actual resolution of the bean only  
happens on first access - so, our peopleDao is never looked up (which  
wouldn't work, because it's not there), and our templateDao get's  
looked up successfully.


However, if we do not specify the name of the bean - i.e. with have  
another bean @SpringBean of type RoomsDao. When the wicket code goes  
to setup this field's lazy initialiser, it fails. It turns down the  
wrong road at:

SpringBeanLocator:
singletonCache =  
Boolean.valueOf(getSpringContext().isSingleton(getBeanName()));

which leads to the:
String[] names =  
BeanFactoryUtils.beanNamesForTypeIncludingAncestors(ctx, clazz);
This of course calls the getBeanName(). And because we didn't specify  
a name, the injector tries to ask Spring for it - which of course  
doesn't work, because no bean of that type actually exists in the  
conext.


IMO the treatment of named vs unnamed @SringBeans is thus sort of  
inconsistent, and would be useful for us to be able to not worry about  
unnamed bean types not existing. Is there a way to avoid this call  
into the Spring context?


One of the work arounds we can use for this, is to add a mock  
implementation of that class into the test application context, so  
spring is able to find a bean of that type. But I'd prefer not to have  
to :)


The other work around, is to not use the SpringComponentInjector, and  
instead setup our own ComponentInjector which only cares about the one  
panel we're testing:

@Override
public void onInstantiation(Component component) {
if (component instanceof ProfileDetailPanel) {
ProfileDetailPanel p = (ProfileDetailPanel) component;
p.setProfileManager( mockProfileManager );
}
}


I wanted to get some thoughts, before I posted a Jira.

Regards,
Antony Stubbs,
NZ
http://friendfeed.com/astubbs