[Wicket-user] Dynamic message in Javascript's alert box

2005-11-05 Thread yongbl
Hi,

I am using Wicket 1.1. I wantedthe _javascript_'s alert box to show some dynamic message like below, which I can do easily with scriplet.

function check(x, y, z){
 .. alert('%= name%' );
 ..
}

Is there a way of accomplishing the same thing in Wicket?

Regards,
James Yong
		Do you Yahoo!? 
New and Improved Yahoo! Mail - 1GB free storage!

[Wicket-user] Re: Wicket 1.1 line endings bug?

2005-11-05 Thread jan_bar
I don't know what is the best solutions. For me the pain is in JUnit tests
when I compare byte to byte the rendered results with expected results. It
should not break because of changed line endings. I have to write comparator
that will take different line endings into account.

Jan

Juergen Donnerstag [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I think it can be solved at all. What ever the OS of the container is,
each client might have a different OS with line endings. Because of
this, I gues that all browser are able to handle any line endings
properly. If that is true, than it is only a question of which OS we
use for building the release. For consistency reasons, IMO we should
stay with Windows.

Juergen

On 11/4/05, Martijn Dashorst [EMAIL PROTECTED] wrote:
 And to add to that, I don't think the different line endings rendering
 can be solved. When I build the release on laptop, Mac and Linux users
 will have different line endings when rendering.

 There is only one solution to this: everybody build their own release
 directly from CVS, and does this for all components. Another one would
 be to have our output stream convert the line endings to the current
 platform. But I don't know if that is good for performance.

 Martijn


 On 11/4/05, Martijn Dashorst [EMAIL PROTECTED] wrote:
  Anyhow, now I'm confused. Should I make the next (1.1.x) release with
  my Mac or with my laptop? Doing it on my mac gives you consistent
  results comparing with 1.1. Doing it on my laptop gives you PC line
  endings.
 
  Martijn
 
  On 11/3/05, jan_bar [EMAIL PROTECTED] wrote:
   Hi,
  
   I compared results of rendered page from Wicket 1.1-rc2 and final 1.1.
In
   one page the 1.1 version mixes unix and microsoft line endings (it
worked
   well with 1.1-rc). Is this know bug?
  
   Jan
  
  
  
  
  
   ---
   SF.Net email is sponsored by:
   Tame your development challenges with Apache's Geronimo App Server.
Download
   it for free - -and be entered to win a 42 plasma tv or your very own
   Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  --
  Living a wicket life...
 
  Martijn Dashorst - http://www.jroller.com/page/dashorst
 
  Wicket 1.1 is out: http://wicket.sourceforge.net/wicket-1.1
 


 --
 Living a wicket life...

 Martijn Dashorst - http://www.jroller.com/page/dashorst

 Wicket 1.1 is out: http://wicket.sourceforge.net/wicket-1.1


 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server.
Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php





---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: Wicket 1.1 line endings bug?

2005-11-05 Thread Juergen Donnerstag
Are you using DiffPrint which we use for core unit tests?  May be we
just have to extend this class

Juergen

On 11/5/05, jan_bar [EMAIL PROTECTED] wrote:
 I don't know what is the best solutions. For me the pain is in JUnit tests
 when I compare byte to byte the rendered results with expected results. It
 should not break because of changed line endings. I have to write comparator
 that will take different line endings into account.

 Jan

 Juergen Donnerstag [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 I think it can be solved at all. What ever the OS of the container is,
 each client might have a different OS with line endings. Because of
 this, I gues that all browser are able to handle any line endings
 properly. If that is true, than it is only a question of which OS we
 use for building the release. For consistency reasons, IMO we should
 stay with Windows.

 Juergen

 On 11/4/05, Martijn Dashorst [EMAIL PROTECTED] wrote:
  And to add to that, I don't think the different line endings rendering
  can be solved. When I build the release on laptop, Mac and Linux users
  will have different line endings when rendering.
 
  There is only one solution to this: everybody build their own release
  directly from CVS, and does this for all components. Another one would
  be to have our output stream convert the line endings to the current
  platform. But I don't know if that is good for performance.
 
  Martijn
 
 
  On 11/4/05, Martijn Dashorst [EMAIL PROTECTED] wrote:
   Anyhow, now I'm confused. Should I make the next (1.1.x) release with
   my Mac or with my laptop? Doing it on my mac gives you consistent
   results comparing with 1.1. Doing it on my laptop gives you PC line
   endings.
  
   Martijn
  
   On 11/3/05, jan_bar [EMAIL PROTECTED] wrote:
Hi,
   
I compared results of rendered page from Wicket 1.1-rc2 and final 1.1.
 In
one page the 1.1 version mixes unix and microsoft line endings (it
 worked
well with 1.1-rc). Is this know bug?
   
Jan
   
   
   
   
   
---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server.
 Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
   --
   Living a wicket life...
  
   Martijn Dashorst - http://www.jroller.com/page/dashorst
  
   Wicket 1.1 is out: http://wicket.sourceforge.net/wicket-1.1
  
 
 
  --
  Living a wicket life...
 
  Martijn Dashorst - http://www.jroller.com/page/dashorst
 
  Wicket 1.1 is out: http://wicket.sourceforge.net/wicket-1.1
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App Server.
 Download
  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php





 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] The Wicktor Situation (AJAX DropDownChoice)

2005-11-05 Thread Martijn Dashorst
Hi Ralf,

Is this wicket 1.1 based?

Our company could actually end up using this one pretty soon :-)

Martijn


On 11/5/05, Ralf Ebert [EMAIL PROTECTED] wrote:
 Hi,

 for porting an existing web application to Wicket I needed to refresh
 the contents of DropDownChoice without a new request (for speedy
 selection). As this is a common technique for selecting categories
 (things like Computer - Hardware - RAM - DDR or Branch / Company /
 Person) I decided to create a reusable Wicket component exactly for
 this. And as having Wicket saved my a lot of time the last weeks I
 thought I should contribute that back. Well, here are the facts:

 - I did a component called WicktorDropDownChoice. It's exactly the
 same as Wickets original DropDownChoice except for a little method
 called connectListForAjaxRefresh(WicktorDropDownChoice choice).
 Every list that is connected somehow this way gets reloaded
 automatically using JavaScript / AJAX at runtime
 - It works for the current version of IE, Firefox and Safari but it
 doesn't have a non-JavaScript fallback. So if you want to use it for
 a public web application some work is still needed
 - You can download it from http://www.dreivier.net/wicktor.zip , it
 includes the component sources and a simple example page
 - Little extra: WicktorCheckBox and HideableWebMarkupContainer. You
 can connect the HideableWebMarkupContainer to the WicktorCheckBox and
 the container gets shown/hidden by state state of the checkbox at the
 client side. Warning: these two work, but I'm not very proud about
 the way they work. I have the feeling this could be done in a more
 elegant way... Any ideas?
 - Yes, I'm sorry for the stupid name. Wicktor is my wicket-test
 project for playing around with wicket.
 - Any feedback/ideas is highly appreciated.

 Good night :)

 Regards,
 Ralf Ebert


 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



--
Living a wicket life...

Martijn Dashorst - http://www.jroller.com/page/dashorst

Wicket 1.1 is out: http://wicket.sourceforge.net/wicket-1.1


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] The Wicktor Situation (AJAX DropDownChoice)

2005-11-05 Thread Ralf Ebert

Hi Martijn,


Is this wicket 1.1 based?
yes, it is. I actually forgot to mention that it's Java 5.0 as well  
(I'm already so used to generics / enums / features like @Overwrite).  
But this should be easy to port to 1.4 if needed.



Our company could actually end up using this one pretty soon :-)
You're welcome... I hope the it doesn't work without javascript  
thing doesn't matter for this... (it wasn't an issue for me and this  
will be easy once the selection notifications work together with form  
components)


Regards,
Ralf


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket:link always throws me an class not found exception

2005-11-05 Thread Manuel Corrales
Well, i solved the problem. Th thing is i kind of lie to Igor ;)
because the classes was on none package. I mean they was on the root of
my web projecto. I create a package and moved in there, and now works
fine. Thanks for your help.On 11/5/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
May we have the stack trace and may be the (stripped down) sources aswell. Thanks
JuergenOn 11/5/05, Manuel Corrales [EMAIL PROTECTED] wrote: Yes, the class is on the same package. As soon as i can i post some code and
 the error description. Any other idea of what can be??I've tried the examples and work perfect. Have no clue. Thanks. On 11/4/05, Igor Vaynberg 
[EMAIL PROTECTED]  wrote:  Is the class in the same package?  -Igor  On 11/4/05, Manuel Corrales 
[EMAIL PROTECTED]  wrote:   I have a link like this on a page, but it keeps telling me that Bienvenido class does not exists. pwicket:linka href=""
Bienvenido.htmlVolver/a/wicket:link/p The class Bienvenido exists and the page too (in fact, it was the page i came from) should i implement something special on this class or in the
 html?? Thanks.---SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: 
http://sourceforge.net/geronimo.php___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] extending WebSession

2005-11-05 Thread Manuel Corrales
Hi, i want to extends WebSession and do a simple session managment like
in the SignIn examples. The thing is that when i try do get a session
like this:

MySession session = (MySession)getSession();

the casting thorws me an error.

What am i doing wrong? Is this the way of manage sessions correctly??

Thanks


Re: [Wicket-user] extending WebSession

2005-11-05 Thread Juergen Donnerstag
What kind of exception? ClassCastException? If yes, than you most
likely don't use application.getSessionFactory8) to create a session
of type MySession.

Juergen

On 11/5/05, Manuel Corrales [EMAIL PROTECTED] wrote:
 Hi, i want to extends WebSession and do a simple session managment like in
 the SignIn examples. The thing is that when i try do get a session like
 this:

  MySession session = (MySession)getSession();

  the casting thorws me an error.

  What am i doing wrong? Is this the way of manage sessions correctly??

  Thanks



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] extending WebSession

2005-11-05 Thread Manuel Corrales
Yes, i get ClassCastException and no, i am not using
getSessionFactory(). How should i use the factory, can you point me to
some example code? Thanks very very much for your quick answer!!On 11/5/05, Juergen Donnerstag [EMAIL PROTECTED]
 wrote:What kind of exception? ClassCastException? If yes, than you mostlikely don't use 
application.getSessionFactory8) to create a sessionof type MySession.JuergenOn 11/5/05, Manuel Corrales [EMAIL PROTECTED] wrote: Hi, i want to extends WebSession and do a simple session managment like in
 the SignIn examples. The thing is that when i try do get a session like this:MySession session = (MySession)getSession();the casting thorws me an error.What am i doing wrong? Is this the way of manage sessions correctly??
Thanks---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] extending WebSession

2005-11-05 Thread Juergen Donnerstag
Please see SignInApplication.java

Juergen

On 11/5/05, Manuel Corrales [EMAIL PROTECTED] wrote:
 Yes, i get ClassCastException and no, i am not using getSessionFactory().
 How should i use the factory, can you point me to some example code? Thanks
 very very much for your quick answer!!


 On 11/5/05, Juergen Donnerstag [EMAIL PROTECTED]  wrote:
 
  What kind of exception? ClassCastException? If yes, than you most
  likely don't use application.getSessionFactory8) to create a session
  of type MySession.
 
  Juergen
 
  On 11/5/05, Manuel Corrales [EMAIL PROTECTED] wrote:
   Hi, i want to extends WebSession and do a simple session managment like
 in
   the SignIn examples. The thing is that when i try do get a session like
   this:
  
MySession session = (MySession)getSession();
  
the casting thorws me an error.
  
What am i doing wrong? Is this the way of manage sessions correctly??
  
Thanks
  
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App Server.
 Download
  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] extending WebSession

2005-11-05 Thread Manuel Corrales
Thank very very much. Works like a charm. Sorry for the dumb question, i am just starting with wicket. Thanks again.On 11/5/05, Juergen Donnerstag 
[EMAIL PROTECTED] wrote:
Please see SignInApplication.javaJuergenOn 11/5/05, Manuel Corrales [EMAIL PROTECTED] wrote: Yes, i get ClassCastException and no, i am not using getSessionFactory().
 How should i use the factory, can you point me to some example code? Thanks very very much for your quick answer!! On 11/5/05, Juergen Donnerstag 
[EMAIL PROTECTED]  wrote:   What kind of exception? ClassCastException? If yes, than you most  likely don't use application.getSessionFactory8) to create a session
  of type MySession.   Juergen   On 11/5/05, Manuel Corrales [EMAIL PROTECTED] wrote:   Hi, i want to extends WebSession and do a simple session managment like
 in   the SignIn examples. The thing is that when i try do get a session like   this:MySession session = (MySession)getSession();  
  the casting thorws me an error.What am i doing wrong? Is this the way of manage sessions correctly??Thanks  
---  SF.Net email is sponsored by:  Tame your development challenges with Apache's Geronimo App Server. Download
  it for free - -and be entered to win a 42 plasma tv or your very own  Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php
  ___  Wicket-user mailing list  Wicket-user@lists.sourceforge.net  
https://lists.sourceforge.net/lists/listinfo/wicket-user ---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



[Wicket-user] Re: Dynamic text in Javascript's alert box

2005-11-05 Thread James Yong
yongbl i_yongbl at yahoo.com.sg writes:

 
 
 Hi,
  
 I am using Wicket 1.1. I wanted the Javascript's alert box to show some 
dynamic message like below, which I can do easily with scriplet.
  
 function check(x, y, z){
    ..   alert(  '%= name %'  );
    ..
 }
  
 Is there a way of accomplishing the same thing in Wicket?
  
 Regards,
 James Yong
 
 

Do let me know even if mine is a silly question :-(
In JSP, I can put %=name% inside javascipt
and in Freemarker, ${name}.
How can I approach with Wicket?

Thanks.







---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: Dynamic text in Javascript's alert box

2005-11-05 Thread Juergen Donnerstag
Well, Wicket is not a templating engine like velocity or freemarker
but wicket supports them. Please see wicket-contrib-freemarker and
wicket-contrib-velocity, both are projects in wicket-stuff.

Juergen

On 11/5/05, James Yong [EMAIL PROTECTED] wrote:
 yongbl i_yongbl at yahoo.com.sg writes:

 
 
  Hi,
 
  I am using Wicket 1.1. I wantedthe Javascript's alert box to show some
 dynamic message like below, which I can do easily with scriplet.
 
  function check(x, y, z){
  .. alert('%= name%' );
  ..
  }
 
  Is there a way of accomplishing the same thing in Wicket?
 
  Regards,
  James Yong
 
 

 Do let me know even if mine is a silly question :-(
 In JSP, I can put %=name% inside javascipt
 and in Freemarker, ${name}.
 How can I approach with Wicket?

 Thanks.







 ---
 SF.Net email is sponsored by:
 Tame your development challenges with Apache's Geronimo App Server. Download
 it for free - -and be entered to win a 42 plasma tv or your very own
 Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Dynamic message in Javascript's alert box

2005-11-05 Thread Ralf Ebert

Hi,

I am using Wicket 1.1. I wanted the Javascript's alert box to show  
some dynamic message like below, which I can do easily with scriplet.


function check(x, y, z)
{
   ..
   alert(  '%= name %'  );
   ..
}

Is there a way of accomplishing the same thing in Wicket?
well, there is no easy way to accomplish this in a way which is well  
integrated with Wicket components/resource loading mechanisms. The  
thing which comes closest to that is implementing a custom  
WebMarkupContainer, attaching that to a script tag and generating  
the appropriate function in java. Of course you can roughly do the  
same thing using the freemarker / velocity components as Juergen  
suggested.


btw, are you trying to do form validation using browser-side  
JavaScript? (your example seems to come from something like that).


Regards,
Ralf


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: Dynamic text in Javascript's alert box

2005-11-05 Thread Eelco Hillenius
Yeah, there's no scripting in Wicket. Everything has to be full
components etc. What you can do however, is create a component that
generates the whole javascript for you, e.g. working with string
replacements. Best way to start with that is looking at the sources of
some Wicket component, like label, and experiment a bit with it.

Eelco


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Validations

2005-11-05 Thread Manuel Corrales
Hi, here i go, for my third question of the day (Thats the bad thing of a real nice community, one can get dense asking :)).

I have a form and i added some RequiredTextFileds, if i understand
correctly, if i do not enter data on that field, an error should appear
on a feedback or something like that??
The thing is that i get an exception:

Caused by: java.util.MissingResourceException: Unable to find resource: RequiredValidatori am missing something? How can i set the error message displayed?Sorry for so much questions.




Re: [Wicket-user] Validation messages

2005-11-05 Thread Sven Meier

Hello Juergen,

I've taken a short look on your code in the CVS :

DefaultValidatorResourceKeyFactory.java:

*  public* String newKey(IValidator validator, FormComponent formComponent)
 {
*return* formComponent.getId() + *.* + Classes.name(validator.getClass());
 }

ComponentStringResourceLoader.java:
 ...
 /// Build search stack
/  Stack searchStack = *new* Stack();
 searchStack.push(component);   
 String prefixKey = component.getId() + *.* + key;

I'm wondering if this leads to a duplicated ID of the validated 
component in prefixId? e.g.


 form1.text1.text1.RequiredValidator

But maybe I'm wrong - so I'll better give it a try on Monday.

Thanks

Sven

Juergen Donnerstag wrote:


Repetition: Message retrieval for the following scenario -
form-panel-textfield - is currently not supported

Let's say that we have the following component hierarchy:
APage
-BForm id=b
--XPanel id=x
   RequiredTextField id=foo
--YPanel id=y
   RequiredTextField id=foo

Sven made a suggestion on how to change which is not 100% compliant. I
worked a bit on it and I think I found a solution. An example:

The Page looks like
add(new Label(label));

Form form1 = new Form(form1);
add(form1);
form1.add(new MyTextField(text1, input-1));
form1.add(new MyTextField(text2, input-2));

Form form2 = new Form(form2);
add(form2);

Panel panel1 = new Panel(panel1);
form2.add(panel1);
panel1.add(new MyTextField(text3, input-3));
panel1.add(new MyTextField(text4, input-4));

Panel panel2 = new Panel(panel2);
form2.add(panel2);
panel2.add(new MyTextField(text5, input-5));
panel2.add(new MyTextField(text6, input-6));

And the properties file:

# Default message
RequiredValidator = Default message: ${label} required

# A Textfield with label
form1.text1 = text1label
form1.text1.RequiredValidator = ${label} is required

# A TextField without label. label should default to the formComponent's id
form1.text2.RequiredValidator = ${label} is required

# This one is wrong. Because the panel id is missing
form2.text3.RequiredValidator = wrong: text is missing

# Must be like
form2.panel1.text3.RequiredValidator = ok: text is missing

form2.panel1.text4 = Text4Label
form2.panel1.text4.RequiredValidator = ok: ${label} is missing

form2.panel2.text5.RequiredValidator = ok: text555 is missing
#form2.panel2.text6.RequiredValidator = ok: text555 is missing

form2.text5.RequiredValidator = wrong: text555 is missing
form2.text6.RequiredValidator = wrong: text555 is missing

form2.panel1.text5.RequiredValidator = wrong: text555 is missing
form2.panel1.text6.RequiredValidator = wrong: text555 is missing

I think it is 100% compliant now, solves the panel problem and as
suggested by Sven adds one more (IMO useful) feature; useful for
self-contained, re-usable components. The key (e.g.
text6.RequiredValidator) is prepended with the relativ path (virtual
root component is the component associated with the properties files).
His english is better than mine and his examples probably as well.

I'll check it in tonight.

Juergen



On 10/29/05, Sven Meier [EMAIL PROTECTED] wrote:
 


I've opened a bug, see:

http://sourceforge.net/tracker/index.php?func=detailaid=1339904group_id=119783atid=684975

Sven

Juergen Donnerstag wrote:

   


Did you open a bug or RFE already? If not, please do so, otherwise
there is always a risk that it'll be forgotten.

Juergen

On 10/27/05, Martijn Dashorst [EMAIL PROTECTED] wrote:


 


+1, if it doesn't break stuff.

Martijn


On 10/27/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:


   


Would you please open a bug for it. Thanks.

As long as long as no one else on the list is against fixing it that
way, I'll try and put it into 1.1.

Juergen

On 10/27/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:


 


Looks to me you are right. We didn't think about a Panel being a child
of a Form. I guess it was our assumption that FormComponents are
always a direct child of a Form.


 


Nested panels inside the same form was the first thing I checked when


   


evaluating Wicket. It's a very handy solution to break large forms into
logical units.


   


I'm currently not able to look into the code. Do we traverse up the
component tree already, like you do?


 


Yes, code is taken from the current ComponentStringResourceLoader


   


(sorry,  I erroneously referred to
DefaultComponentStringResourceLoader). I only introduced
the variable 'hierarchicalKey'.


   


Isn't there a risk that due to equal ids, users get messages which
were not meant to be for that component.


 


Well, Wicket ensures that a path of a component is always unambiguous,


  

Re: [Wicket-user] Validations

2005-11-05 Thread Andrew Berman
See the Wicket-Examples and here: http://www.wicket-wiki.org.uk/wiki/index.php/Validation_Messages.You need to have the error message in a resource file which your exception tells me you don't.
On 11/5/05, Manuel Corrales [EMAIL PROTECTED] wrote:
Hi, here i go, for my third question of the day (Thats the bad thing of a real nice community, one can get dense asking :)).

I have a form and i added some RequiredTextFileds, if i understand
correctly, if i do not enter data on that field, an error should appear
on a feedback or something like that??
The thing is that i get an exception:

Caused by: java.util.MissingResourceException: Unable to find resource: RequiredValidatori am missing something? How can i set the error message displayed?Sorry for so much questions.






[Wicket-user] Wicket 1.1 in Maven 1 Repository

2005-11-05 Thread Eduardo Rocha
Will someone upload wicket-*-1.1.jar to ibiblio?


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: Dynamic message in Javascript's alert box

2005-11-05 Thread James Yong
Igor Vaynberg igor.vaynberg at gmail.com writes:

 
 
 you can use the label component to inject any kind of markup you want.
 just be sure to call setRenderBodyOnly(true) on it so that it doesnt
 render its span tags.
 ie
 function check(x, y, z){
    ..   alert(  'span wicket:id=jsmessage/span'  );
    ..
 }
 
 and in java
 add(new Label(jsmessage, my javascript message).setRenderBodyOnly(true));
 -Igor
 
Hi Igor,

This is what I wanted to know. Thank you very much.

Regards,
James





---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user