how to Store wicket fields(TextField) to XML File?

2010-03-07 Thread sravan g
Hi All,
 Any one Have idea about how to Store wicket fields(TextField) to XML
File?

Thanks,
Saravanakumar G.


How to Store Wicket to XML File?

2010-03-07 Thread sravan g
Hi All,
 Any one Have idea about how to Store wicket fields(TextField) to XML
File?

Thanks,
Saravanakumar G.


Re: Example of configuring JCaptcha within Wicket?

2010-03-07 Thread Eelco Hillenius
It's been a while, so I don't know how well it works with recent
versions (and whether I would do things differently today), but
there's a few pages on this in Wicket In Action. You can find example
source code here:
http://code.google.com/p/wicketinaction/source/browse/trunk/book-wicket-in-action/src/java/wicket/in/action/chapter09/jcaptcha/?r=110

Eelco

On Sun, Mar 7, 2010 at 11:53 AM, David Chang  wrote:
> Anybody used the JCaptcha tool? How did you do the customization? The 
> out-of-box config sucks.
>
> Could you please share your config and how to?
>
> Cheers!
>
>
>
>
>
>
> -
> 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: Where to put an application's configuration parameters?

2010-03-07 Thread James Carman
And if you want live redeployment, you could use jrebel and their spring
plugin.  I think it will reload beans based on property file changes

On Mar 7, 2010 7:17 PM, "Riyad Kalla"  wrote:

James,

Thanks for the link.

-R

On Sun, Mar 7, 2010 at 4:50 PM, James Carman wrote:


> If you want to see how I did it with spring config, you can check out my
> advanced wicket demo a...


Re: tomcat session replication

2010-03-07 Thread Igor Vaynberg
this problem effects any webapp that uses the http session. usually
this is handled the following way

lets say you have two nodes A and B

when starting an upgrade node A is taken offline and all sessions are
migrated to B
node A is then upgraded and brought back up with the loadbalancer is
configured to only send new sessions to A while B is being "starved"
of new sessions. once all sessions on B are expired B is taken offline
and upgraded at which point it is returned into rotation.

-igor

On Sun, Mar 7, 2010 at 4:10 PM, Douglas Ferguson
 wrote:
> Hmm.. yeah.. that even seems like it could not be fool proof.
>
> I.E. Wicket checks that components are serializable not Externalizable.
>
> I'm curious if anybody that is running wicket in a cluster has experienced 
> this, or how you deal with deploying changes to the signature of a component.
>
> D/
>
>
>
> On Mar 7, 2010, at 2:42 PM, James Carman wrote:
>
>> You can implement Externalizable and manage it all yourself.
>>
>> On Sun, Mar 7, 2010 at 3:39 PM, Douglas Ferguson
>>  wrote:
>>> How do you prevent developers from renaming fields on components.
>>> That seems really dangerous.
>>>
>>> i.e. what seems like a simple refactor to correct a spelling mistake could 
>>> result in sessions not being deserialized.
>>>
>>> D/
>>>
>>> On Mar 6, 2010, at 11:10 AM, Igor Vaynberg wrote:
>>>
 not with java serialization afaik

 -igor

 On Sat, Mar 6, 2010 at 6:52 AM, Douglas Ferguson
  wrote:
> I can't deal with removing fields or changing method 
> signatures/implementations?
>
> D/
>
> On Mar 6, 2010, at 12:58 AM, Igor Vaynberg wrote:
>
>> as long as all you do is add fields you are ok...
>>
>> -igor
>>
>> On Fri, Mar 5, 2010 at 8:16 PM, Douglas Ferguson
>>  wrote:
>>> So as long as the serial I'd is the same the classlader won't care the
>>> fields don't match?
>>>
>>> Douglas Ferguson
>>> 512-293-7279
>>> Sent from my iPhone
>>>
>>> On Mar 5, 2010, at 3:37 PM, "Igor Vaynberg" 
>>> wrote:
>>>
 in the wicket code we override serial ids to 1, you should do the same
 in your code.

 -igor

 On Fri, Mar 5, 2010 at 12:15 PM, Douglas Ferguson
  wrote:
> I'm  considering a 0 downtime deployment but am concerned with the
> amount of state in the wicket session.
>
> This is the scenario that concerns me.
>
> 1) There are 2 tomcats running
> 2) A change is made to a serializable object and the serial version
> id is updated
> 3) 1 tomcat instance is taken down for updating
> 4) tomcat instance comes back up with new object and now tries to
> update state from other tomcat and the wicket session has a
> reference to the old version of the serializable.
>
> On Mar 5, 2010, at 12:18 PM, Igor Vaynberg wrote:
>
>> yes
>>
>> -igor
>>
>> On Fri, Mar 5, 2010 at 10:02 AM, Douglas Ferguson
>>  wrote:
>>> Has anybody had success with wicket using tomcat's session
>>> replication?
>>>
>>> D/
>>>
>>> ---
>>> --
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> ---
>> --
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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

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

 

Re: Where to put an application's configuration parameters?

2010-03-07 Thread Riyad Kalla
James,

Thanks for the link.

-R

On Sun, Mar 7, 2010 at 4:50 PM, James Carman wrote:

> If you want to see how I did it with spring config, you can check out my
> advanced wicket demo app at:
>
> http://svn.carmanconsulting.com/public/wicket-advanced/trunk
>
> On Mar 7, 2010 5:41 PM, "David Chang"  wrote:
>
> James and Riyad,
>
> Thanks for your input. I really appreciate it. Wicket is great, but I still
> feel a little elusive.
>
> Regards.
>
>
>
> --- On Sun, 3/7/10, James Carman  wrote:
>
> > From: James Carman 
>
> > Subject: Re: Where to put an application's configuration parameters?
> > To: us...@wicket.apache.org...
> > Date: Sunday, March 7, 2010, 3:26 PM
>
> > Why not use Spring *with* Wicket?
> >
> > On Sun, Mar 7, 2010 at 3:15 PM, David Chang 


Re: tomcat session replication

2010-03-07 Thread Douglas Ferguson
Hmm.. yeah.. that even seems like it could not be fool proof.

I.E. Wicket checks that components are serializable not Externalizable. 

I'm curious if anybody that is running wicket in a cluster has experienced 
this, or how you deal with deploying changes to the signature of a component. 

D/



On Mar 7, 2010, at 2:42 PM, James Carman wrote:

> You can implement Externalizable and manage it all yourself.
> 
> On Sun, Mar 7, 2010 at 3:39 PM, Douglas Ferguson
>  wrote:
>> How do you prevent developers from renaming fields on components.
>> That seems really dangerous.
>> 
>> i.e. what seems like a simple refactor to correct a spelling mistake could 
>> result in sessions not being deserialized.
>> 
>> D/
>> 
>> On Mar 6, 2010, at 11:10 AM, Igor Vaynberg wrote:
>> 
>>> not with java serialization afaik
>>> 
>>> -igor
>>> 
>>> On Sat, Mar 6, 2010 at 6:52 AM, Douglas Ferguson
>>>  wrote:
 I can't deal with removing fields or changing method 
 signatures/implementations?
 
 D/
 
 On Mar 6, 2010, at 12:58 AM, Igor Vaynberg wrote:
 
> as long as all you do is add fields you are ok...
> 
> -igor
> 
> On Fri, Mar 5, 2010 at 8:16 PM, Douglas Ferguson
>  wrote:
>> So as long as the serial I'd is the same the classlader won't care the
>> fields don't match?
>> 
>> Douglas Ferguson
>> 512-293-7279
>> Sent from my iPhone
>> 
>> On Mar 5, 2010, at 3:37 PM, "Igor Vaynberg" 
>> wrote:
>> 
>>> in the wicket code we override serial ids to 1, you should do the same
>>> in your code.
>>> 
>>> -igor
>>> 
>>> On Fri, Mar 5, 2010 at 12:15 PM, Douglas Ferguson
>>>  wrote:
 I'm  considering a 0 downtime deployment but am concerned with the
 amount of state in the wicket session.
 
 This is the scenario that concerns me.
 
 1) There are 2 tomcats running
 2) A change is made to a serializable object and the serial version
 id is updated
 3) 1 tomcat instance is taken down for updating
 4) tomcat instance comes back up with new object and now tries to
 update state from other tomcat and the wicket session has a
 reference to the old version of the serializable.
 
 On Mar 5, 2010, at 12:18 PM, Igor Vaynberg wrote:
 
> yes
> 
> -igor
> 
> On Fri, Mar 5, 2010 at 10:02 AM, Douglas Ferguson
>  wrote:
>> Has anybody had success with wicket using tomcat's session
>> replication?
>> 
>> D/
>> 
>> ---
>> --
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> ---
> --
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>> 
>> 
>> -
>> 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: Where to put an application's configuration parameters?

2010-03-07 Thread James Carman
If you want to see how I did it with spring config, you can check out my
advanced wicket demo app at:

http://svn.carmanconsulting.com/public/wicket-advanced/trunk

On Mar 7, 2010 5:41 PM, "David Chang"  wrote:

James and Riyad,

Thanks for your input. I really appreciate it. Wicket is great, but I still
feel a little elusive.

Regards.



--- On Sun, 3/7/10, James Carman  wrote:

> From: James Carman 

> Subject: Re: Where to put an application's configuration parameters?
> To: us...@wicket.apache.org...
> Date: Sunday, March 7, 2010, 3:26 PM

> Why not use Spring *with* Wicket?
>
> On Sun, Mar 7, 2010 at 3:15 PM, David Chang 

Re: Where to put an application's configuration parameters?

2010-03-07 Thread David Chang
James and Riyad, 

Thanks for your input. I really appreciate it. Wicket is great, but I still 
feel a little elusive.

Regards.



--- On Sun, 3/7/10, James Carman  wrote:

> From: James Carman 
> Subject: Re: Where to put an application's configuration parameters?
> To: users@wicket.apache.org
> Date: Sunday, March 7, 2010, 3:26 PM
> Why not use Spring *with* Wicket?
> 
> On Sun, Mar 7, 2010 at 3:15 PM, David Chang 
> wrote:
> > Hi, I am new in Wicket.
> >
> > I did Spring web applications before and I usually put
> an app's configuration parameters in the application context
> file.
> >
> > I would like to know the best practice in Wichet for
> setting parameters such as SMTP server, LDAP server, etc.
> Where should I put them? I dont feel WebApplication is a
> good place. Put them in an old java properties file? I want
> these parameters can be changed without touching source
> code.
> >
> > 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
> 
> 


  

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



Re: Where to put an application's configuration parameters?

2010-03-07 Thread David Chang
Jeremy, thanks for chiming. I read your transition from Spring to Wicket long 
time ago. 
Best, David

--- On Sun, 3/7/10, Jeremy Thomerson  wrote:

> From: Jeremy Thomerson 
> Subject: Re: Where to put an application's configuration parameters?
> To: users@wicket.apache.org
> Date: Sunday, March 7, 2010, 5:28 PM
> I use Spring IoC and do all of my app
> configuration with Spring still.  I
> just use Wicket for the webapp portion.  There's no
> reason Wicket should
> know about these SMTP / LDAP config values - all of that
> should be service
> layer or below.
> 
> --
> Jeremy Thomerson
> http://www.wickettraining.com
> 
> 
> 
> On Sun, Mar 7, 2010 at 2:15 PM, David Chang 
> wrote:
> 
> > Hi, I am new in Wicket.
> >
> > I did Spring web applications before and I usually put
> an app's
> > configuration parameters in the application context
> file.
> >
> > I would like to know the best practice in Wichet for
> setting parameters
> > such as SMTP server, LDAP server, etc. Where should I
> put them? I dont feel
> > WebApplication is a good place. Put them in an old
> java properties file? I
> > want these parameters can be changed without touching
> source code.
> >
> > 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



Re: Where to put an application's configuration parameters?

2010-03-07 Thread Jeremy Thomerson
I use Spring IoC and do all of my app configuration with Spring still.  I
just use Wicket for the webapp portion.  There's no reason Wicket should
know about these SMTP / LDAP config values - all of that should be service
layer or below.

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



On Sun, Mar 7, 2010 at 2:15 PM, David Chang  wrote:

> Hi, I am new in Wicket.
>
> I did Spring web applications before and I usually put an app's
> configuration parameters in the application context file.
>
> I would like to know the best practice in Wichet for setting parameters
> such as SMTP server, LDAP server, etc. Where should I put them? I dont feel
> WebApplication is a good place. Put them in an old java properties file? I
> want these parameters can be changed without touching source code.
>
> Thanks!
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: How to increase the width of the AjaxEditableLabel editor? @L

2010-03-07 Thread Alec Swan
Just to follow up on my previous post.

Does anybody know if it's possible to increase the number of characters
displayed in the AjaxEditableLabel editor input text field?

Thanks.

On Tue, Feb 23, 2010 at 11:36 AM, Alec Swan  wrote:

> I noticed that when the user clicks on AjaxEditableLabel to edit the text
> the width of the edited area is reduced to 30 or so characters.
>
> How can I change the width of AjaxEditableLabel editor?
>
> Thanks.
>


Re: tomcat session replication

2010-03-07 Thread James Carman
You can implement Externalizable and manage it all yourself.

On Sun, Mar 7, 2010 at 3:39 PM, Douglas Ferguson
 wrote:
> How do you prevent developers from renaming fields on components.
> That seems really dangerous.
>
> i.e. what seems like a simple refactor to correct a spelling mistake could 
> result in sessions not being deserialized.
>
> D/
>
> On Mar 6, 2010, at 11:10 AM, Igor Vaynberg wrote:
>
>> not with java serialization afaik
>>
>> -igor
>>
>> On Sat, Mar 6, 2010 at 6:52 AM, Douglas Ferguson
>>  wrote:
>>> I can't deal with removing fields or changing method 
>>> signatures/implementations?
>>>
>>> D/
>>>
>>> On Mar 6, 2010, at 12:58 AM, Igor Vaynberg wrote:
>>>
 as long as all you do is add fields you are ok...

 -igor

 On Fri, Mar 5, 2010 at 8:16 PM, Douglas Ferguson
  wrote:
> So as long as the serial I'd is the same the classlader won't care the
> fields don't match?
>
> Douglas Ferguson
> 512-293-7279
> Sent from my iPhone
>
> On Mar 5, 2010, at 3:37 PM, "Igor Vaynberg" 
> wrote:
>
>> in the wicket code we override serial ids to 1, you should do the same
>> in your code.
>>
>> -igor
>>
>> On Fri, Mar 5, 2010 at 12:15 PM, Douglas Ferguson
>>  wrote:
>>> I'm  considering a 0 downtime deployment but am concerned with the
>>> amount of state in the wicket session.
>>>
>>> This is the scenario that concerns me.
>>>
>>> 1) There are 2 tomcats running
>>> 2) A change is made to a serializable object and the serial version
>>> id is updated
>>> 3) 1 tomcat instance is taken down for updating
>>> 4) tomcat instance comes back up with new object and now tries to
>>> update state from other tomcat and the wicket session has a
>>> reference to the old version of the serializable.
>>>
>>> On Mar 5, 2010, at 12:18 PM, Igor Vaynberg wrote:
>>>
 yes

 -igor

 On Fri, Mar 5, 2010 at 10:02 AM, Douglas Ferguson
  wrote:
> Has anybody had success with wicket using tomcat's session
> replication?
>
> D/
>
> ---
> --
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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

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

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

>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
>
> -
> 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: tomcat session replication

2010-03-07 Thread Douglas Ferguson
How do you prevent developers from renaming fields on components.
That seems really dangerous.

i.e. what seems like a simple refactor to correct a spelling mistake could 
result in sessions not being deserialized.

D/

On Mar 6, 2010, at 11:10 AM, Igor Vaynberg wrote:

> not with java serialization afaik
> 
> -igor
> 
> On Sat, Mar 6, 2010 at 6:52 AM, Douglas Ferguson
>  wrote:
>> I can't deal with removing fields or changing method 
>> signatures/implementations?
>> 
>> D/
>> 
>> On Mar 6, 2010, at 12:58 AM, Igor Vaynberg wrote:
>> 
>>> as long as all you do is add fields you are ok...
>>> 
>>> -igor
>>> 
>>> On Fri, Mar 5, 2010 at 8:16 PM, Douglas Ferguson
>>>  wrote:
 So as long as the serial I'd is the same the classlader won't care the
 fields don't match?
 
 Douglas Ferguson
 512-293-7279
 Sent from my iPhone
 
 On Mar 5, 2010, at 3:37 PM, "Igor Vaynberg" 
 wrote:
 
> in the wicket code we override serial ids to 1, you should do the same
> in your code.
> 
> -igor
> 
> On Fri, Mar 5, 2010 at 12:15 PM, Douglas Ferguson
>  wrote:
>> I'm  considering a 0 downtime deployment but am concerned with the
>> amount of state in the wicket session.
>> 
>> This is the scenario that concerns me.
>> 
>> 1) There are 2 tomcats running
>> 2) A change is made to a serializable object and the serial version
>> id is updated
>> 3) 1 tomcat instance is taken down for updating
>> 4) tomcat instance comes back up with new object and now tries to
>> update state from other tomcat and the wicket session has a
>> reference to the old version of the serializable.
>> 
>> On Mar 5, 2010, at 12:18 PM, Igor Vaynberg wrote:
>> 
>>> yes
>>> 
>>> -igor
>>> 
>>> On Fri, Mar 5, 2010 at 10:02 AM, Douglas Ferguson
>>>  wrote:
 Has anybody had success with wicket using tomcat's session
 replication?
 
 D/
 
 ---
 --
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
>>> 
>>> ---
>>> --
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Where to put an application's configuration parameters?

2010-03-07 Thread Riyad Kalla
David,

Given your requirements, I'd recomment putting them in a properties file
along side your custom WebApplication class for your particular application
and then inside of the WebApp's init method, reading in the properties file
and storing the information in the WebApplication.get/setMetaData methods to
store that free-formed information:
http://wicket.apache.org/docs/1.4/org/apache/wicket/Application.html#getMetaData(org.apache.wicket.MetaDataKey)

You
could be fancy and spin off a thread that checks every 10 mins for changes
to the files and re-sets the metadata info if you want to be able to change
that data while the app is running without a restart. Either way, it's just
a plain properties file.

Best,
Riyad

On Sun, Mar 7, 2010 at 1:15 PM, David Chang  wrote:

> Hi, I am new in Wicket.
>
> I did Spring web applications before and I usually put an app's
> configuration parameters in the application context file.
>
> I would like to know the best practice in Wichet for setting parameters
> such as SMTP server, LDAP server, etc. Where should I put them? I dont feel
> WebApplication is a good place. Put them in an old java properties file? I
> want these parameters can be changed without touching source code.
>
> Thanks!
>
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Where to put an application's configuration parameters?

2010-03-07 Thread James Carman
Why not use Spring *with* Wicket?

On Sun, Mar 7, 2010 at 3:15 PM, David Chang  wrote:
> Hi, I am new in Wicket.
>
> I did Spring web applications before and I usually put an app's configuration 
> parameters in the application context file.
>
> I would like to know the best practice in Wichet for setting parameters such 
> as SMTP server, LDAP server, etc. Where should I put them? I dont feel 
> WebApplication is a good place. Put them in an old java properties file? I 
> want these parameters can be changed without touching source code.
>
> 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



Where to put an application's configuration parameters?

2010-03-07 Thread David Chang
Hi, I am new in Wicket. 

I did Spring web applications before and I usually put an app's configuration 
parameters in the application context file. 

I would like to know the best practice in Wichet for setting parameters such as 
SMTP server, LDAP server, etc. Where should I put them? I dont feel 
WebApplication is a good place. Put them in an old java properties file? I want 
these parameters can be changed without touching source code.

Thanks!


  

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



Example of configuring JCaptcha within Wicket?

2010-03-07 Thread David Chang
Anybody used the JCaptcha tool? How did you do the customization? The 
out-of-box config sucks.

Could you please share your config and how to?

Cheers!




  

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



Re: Setting selected value for DropDownChoice

2010-03-07 Thread Vit Rozkovec
This may help you with your problem: 
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html#hashCode%28%29


And this as well (in case you use Hibernate, but may be applicable to 
other frameworks too): https://www.hibernate.org/109.html


Regards
Vitek


Sigmar Muuga wrote:

I got it working with ISO2.
Thanks Vit, I got your idea, I'll investigate later, why it didnt work with
ID.

On Sun, Mar 7, 2010 at 7:35 PM, Sigmar Muuga  wrote:

  

Actually it works even randomly now, when I change the values:S

I've read docs and books and still have no idea with that :S DropDownChoice
has hard API design problems IMHO...


On Sun, Mar 7, 2010 at 7:18 PM, Sigmar Muuga  wrote:



Still not working actually, got another problem.
When I select the item with ID 241, I get item with ID 239.

My country pojo is like this:
import lombok.Data;

@Data
public class Country extends BaseModel {

private static final long serialVersionUID = 1L;

private long id;
private String iso2;
private String iso3;
private String nameShort;
private String nameLong;

@Override
public String toString() {
return nameShort;
}

@Override
public boolean equals(Object o) {
if (o != null) {
if (o instanceof Country) {
return id == ((Country) o).getId();
}
}
return false;
}

}

Weird.


On Sun, Mar 7, 2010 at 7:05 PM, Vit Rozkovec wrote:

  

Hallo,
try something like this:


List countryList = generalDAO.findAllCountries();
Country country = getSelectedCountryByISO3(141, countryList);
inal DropDownChoice countryId = new
DropDownChoice("countryId",
new Model(country), countryList);
  add(countryId);

You must pass the model, which contains the element you want to select.

Vitek


Sigmar Muuga wrote:



Hello, I am trying to use one of the hardest part in Wicket:
DropDownChoice

the code looks like this:

   List countryList = generalDAO.findAllCountries();
   Country country = getSelectedCountryByISO3(141, countryList);
   final DropDownChoice countryId = new
DropDownChoice("countryId",
new PropertyModel(country, "id"), countryList);
   add(countryId);

I want to select an item, and set it selected on my dropdown, but its
not
selected. How to set the selected value for it?


Sigmar



  

-
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: Setting selected value for DropDownChoice

2010-03-07 Thread Martin Grigorov
you need Country#hashcode()

On Sun, 2010-03-07 at 19:46 +0200, Sigmar Muuga wrote:
> I got it working with ISO2.
> Thanks Vit, I got your idea, I'll investigate later, why it didnt work with
> ID.
> 
> On Sun, Mar 7, 2010 at 7:35 PM, Sigmar Muuga  wrote:
> 
> > Actually it works even randomly now, when I change the values:S
> >
> > I've read docs and books and still have no idea with that :S DropDownChoice
> > has hard API design problems IMHO...
> >
> >
> > On Sun, Mar 7, 2010 at 7:18 PM, Sigmar Muuga  wrote:
> >
> >> Still not working actually, got another problem.
> >> When I select the item with ID 241, I get item with ID 239.
> >>
> >> My country pojo is like this:
> >> import lombok.Data;
> >>
> >> @Data
> >> public class Country extends BaseModel {
> >>
> >> private static final long serialVersionUID = 1L;
> >>
> >> private long id;
> >> private String iso2;
> >> private String iso3;
> >> private String nameShort;
> >> private String nameLong;
> >>
> >> @Override
> >> public String toString() {
> >> return nameShort;
> >> }
> >>
> >> @Override
> >> public boolean equals(Object o) {
> >> if (o != null) {
> >> if (o instanceof Country) {
> >> return id == ((Country) o).getId();
> >> }
> >> }
> >> return false;
> >> }
> >>
> >> }
> >>
> >> Weird.
> >>
> >>
> >> On Sun, Mar 7, 2010 at 7:05 PM, Vit Rozkovec wrote:
> >>
> >>> Hallo,
> >>> try something like this:
> >>>
> >>>
> >>> List countryList = generalDAO.findAllCountries();
> >>> Country country = getSelectedCountryByISO3(141, countryList);
> >>> inal DropDownChoice countryId = new
> >>> DropDownChoice("countryId",
> >>> new Model(country), countryList);
> >>>   add(countryId);
> >>>
> >>> You must pass the model, which contains the element you want to select.
> >>>
> >>> Vitek
> >>>
> >>>
> >>> Sigmar Muuga wrote:
> >>>
>  Hello, I am trying to use one of the hardest part in Wicket:
>  DropDownChoice
> 
>  the code looks like this:
> 
> List countryList = generalDAO.findAllCountries();
> Country country = getSelectedCountryByISO3(141, countryList);
> final DropDownChoice countryId = new
>  DropDownChoice("countryId",
>  new PropertyModel(country, "id"), countryList);
> add(countryId);
> 
>  I want to select an item, and set it selected on my dropdown, but its
>  not
>  selected. How to set the selected value for it?
> 
> 
>  Sigmar
> 
> 
> 
> >>>
> >>>
> >>> -
> >>> 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: Setting selected value for DropDownChoice

2010-03-07 Thread Sigmar Muuga
I got it working with ISO2.
Thanks Vit, I got your idea, I'll investigate later, why it didnt work with
ID.

On Sun, Mar 7, 2010 at 7:35 PM, Sigmar Muuga  wrote:

> Actually it works even randomly now, when I change the values:S
>
> I've read docs and books and still have no idea with that :S DropDownChoice
> has hard API design problems IMHO...
>
>
> On Sun, Mar 7, 2010 at 7:18 PM, Sigmar Muuga  wrote:
>
>> Still not working actually, got another problem.
>> When I select the item with ID 241, I get item with ID 239.
>>
>> My country pojo is like this:
>> import lombok.Data;
>>
>> @Data
>> public class Country extends BaseModel {
>>
>> private static final long serialVersionUID = 1L;
>>
>> private long id;
>> private String iso2;
>> private String iso3;
>> private String nameShort;
>> private String nameLong;
>>
>> @Override
>> public String toString() {
>> return nameShort;
>> }
>>
>> @Override
>> public boolean equals(Object o) {
>> if (o != null) {
>> if (o instanceof Country) {
>> return id == ((Country) o).getId();
>> }
>> }
>> return false;
>> }
>>
>> }
>>
>> Weird.
>>
>>
>> On Sun, Mar 7, 2010 at 7:05 PM, Vit Rozkovec wrote:
>>
>>> Hallo,
>>> try something like this:
>>>
>>>
>>> List countryList = generalDAO.findAllCountries();
>>> Country country = getSelectedCountryByISO3(141, countryList);
>>> inal DropDownChoice countryId = new
>>> DropDownChoice("countryId",
>>> new Model(country), countryList);
>>>   add(countryId);
>>>
>>> You must pass the model, which contains the element you want to select.
>>>
>>> Vitek
>>>
>>>
>>> Sigmar Muuga wrote:
>>>
 Hello, I am trying to use one of the hardest part in Wicket:
 DropDownChoice

 the code looks like this:

List countryList = generalDAO.findAllCountries();
Country country = getSelectedCountryByISO3(141, countryList);
final DropDownChoice countryId = new
 DropDownChoice("countryId",
 new PropertyModel(country, "id"), countryList);
add(countryId);

 I want to select an item, and set it selected on my dropdown, but its
 not
 selected. How to set the selected value for it?


 Sigmar



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


Re: Setting selected value for DropDownChoice

2010-03-07 Thread Sigmar Muuga
Actually it works even randomly now, when I change the values:S

I've read docs and books and still have no idea with that :S DropDownChoice
has hard API design problems IMHO...

On Sun, Mar 7, 2010 at 7:18 PM, Sigmar Muuga  wrote:

> Still not working actually, got another problem.
> When I select the item with ID 241, I get item with ID 239.
>
> My country pojo is like this:
> import lombok.Data;
>
> @Data
> public class Country extends BaseModel {
>
> private static final long serialVersionUID = 1L;
>
> private long id;
> private String iso2;
> private String iso3;
> private String nameShort;
> private String nameLong;
>
> @Override
> public String toString() {
> return nameShort;
> }
>
> @Override
> public boolean equals(Object o) {
> if (o != null) {
> if (o instanceof Country) {
> return id == ((Country) o).getId();
> }
> }
> return false;
> }
>
> }
>
> Weird.
>
>
> On Sun, Mar 7, 2010 at 7:05 PM, Vit Rozkovec  wrote:
>
>> Hallo,
>> try something like this:
>>
>>
>> List countryList = generalDAO.findAllCountries();
>> Country country = getSelectedCountryByISO3(141, countryList);
>> inal DropDownChoice countryId = new
>> DropDownChoice("countryId",
>> new Model(country), countryList);
>>   add(countryId);
>>
>> You must pass the model, which contains the element you want to select.
>>
>> Vitek
>>
>>
>> Sigmar Muuga wrote:
>>
>>> Hello, I am trying to use one of the hardest part in Wicket:
>>> DropDownChoice
>>>
>>> the code looks like this:
>>>
>>>List countryList = generalDAO.findAllCountries();
>>>Country country = getSelectedCountryByISO3(141, countryList);
>>>final DropDownChoice countryId = new
>>> DropDownChoice("countryId",
>>> new PropertyModel(country, "id"), countryList);
>>>add(countryId);
>>>
>>> I want to select an item, and set it selected on my dropdown, but its not
>>> selected. How to set the selected value for it?
>>>
>>>
>>> Sigmar
>>>
>>>
>>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>


Re: Setting selected value for DropDownChoice

2010-03-07 Thread Sigmar Muuga
Still not working actually, got another problem.
When I select the item with ID 241, I get item with ID 239.

My country pojo is like this:
import lombok.Data;

@Data
public class Country extends BaseModel {

private static final long serialVersionUID = 1L;

private long id;
private String iso2;
private String iso3;
private String nameShort;
private String nameLong;

@Override
public String toString() {
return nameShort;
}

@Override
public boolean equals(Object o) {
if (o != null) {
if (o instanceof Country) {
return id == ((Country) o).getId();
}
}
return false;
}

}

Weird.

On Sun, Mar 7, 2010 at 7:05 PM, Vit Rozkovec  wrote:

> Hallo,
> try something like this:
>
>
> List countryList = generalDAO.findAllCountries();
> Country country = getSelectedCountryByISO3(141, countryList);
> inal DropDownChoice countryId = new
> DropDownChoice("countryId",
> new Model(country), countryList);
>   add(countryId);
>
> You must pass the model, which contains the element you want to select.
>
> Vitek
>
>
> Sigmar Muuga wrote:
>
>> Hello, I am trying to use one of the hardest part in Wicket:
>> DropDownChoice
>>
>> the code looks like this:
>>
>>List countryList = generalDAO.findAllCountries();
>>Country country = getSelectedCountryByISO3(141, countryList);
>>final DropDownChoice countryId = new
>> DropDownChoice("countryId",
>> new PropertyModel(country, "id"), countryList);
>>add(countryId);
>>
>> I want to select an item, and set it selected on my dropdown, but its not
>> selected. How to set the selected value for it?
>>
>>
>> Sigmar
>>
>>
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Setting selected value for DropDownChoice

2010-03-07 Thread Vit Rozkovec

Hallo,
try something like this:

List countryList = generalDAO.findAllCountries();
Country country = getSelectedCountryByISO3(141, countryList);
inal DropDownChoice countryId = new 
DropDownChoice("countryId",
new Model(country), countryList);
   add(countryId);

You must pass the model, which contains the element you want to select.

Vitek

Sigmar Muuga wrote:

Hello, I am trying to use one of the hardest part in Wicket: DropDownChoice

the code looks like this:

List countryList = generalDAO.findAllCountries();
Country country = getSelectedCountryByISO3(141, countryList);
final DropDownChoice countryId = new DropDownChoice("countryId",
new PropertyModel(country, "id"), countryList);
add(countryId);

I want to select an item, and set it selected on my dropdown, but its not
selected. How to set the selected value for it?


Sigmar

  



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



Setting selected value for DropDownChoice

2010-03-07 Thread Sigmar Muuga
Hello, I am trying to use one of the hardest part in Wicket: DropDownChoice

the code looks like this:

List countryList = generalDAO.findAllCountries();
Country country = getSelectedCountryByISO3(141, countryList);
final DropDownChoice countryId = new DropDownChoice("countryId",
new PropertyModel(country, "id"), countryList);
add(countryId);

I want to select an item, and set it selected on my dropdown, but its not
selected. How to set the selected value for it?


Sigmar


Re: Customize generating javascript in wicket

2010-03-07 Thread Martin Makundi
Something like this might work:

public class GenericTailJavaScriptBehavior extends AbstractBehavior {
  private final String javaScript;
  /**
   * @param javaScript
   */
  public GenericTailJavaScriptBehavior(String javaScript) {
this.javaScript = javaScript;
  }
  /**
   * @see 
org.apache.wicket.behavior.AbstractBehavior#onRendered(org.apache.wicket.Component)
   */
  @Override
  public void onRendered(Component component) {
super.onRendered(component);
JavascriptUtils.writeOpenTag(component.getResponse());
component.getResponse().write(javaScript);
JavascriptUtils.writeCloseTag(component.getResponse());
  }
}


2010/3/6 marioosh.net :
> How to force wicket to generate javascript at the end of html, not inline ?
> I'm using SortableListView and addContainment method, but containtment
> option doesn't work.
>
> I think not work because of that "important note" - from scriptaculous docs: "
> containment
> Enables dragging and dropping between Sortables. Takes an array of
> elements or element-ids (of the containers). Important note: To ensure
> that two way dragging between containers is possible, place all
> Sortable.create calls after the container elements."
>
> --
> Greetings,
> marioosh
>
> -
> 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