Re: wicket menu

2009-09-22 Thread Ernesto Reinaldo Barreiro
Hi,
The only difference I see between their page and TestMenu page is

!--[if lte IE 7]
style type=text/css
html .jquerycssmenu{height: 1%;} /*Holly Hack for IE7 and below*/
/style
![endif]--

So, I just added
head
wicket:head
!--[if lte IE 7]
style type=text/css
html .jquerycssmenu{height: 1%;} /*Holly Hack for IE7 and below*/
/style
![endif]--
/wicket:head
/head

to TestMenu page Can you check, please, if that fixes the problem?

Best,

Ernesto

On Mon, Sep 21, 2009 at 5:41 PM, T Ames tamesw...@gmail.com wrote:

 Hmmm.   The demo version on the dynamicdrive site works ok in my IE6.



 On Mon, Sep 21, 2009 at 11:10 AM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

  Thanks for the feedback!
  Just one question... I can't see the problems you are mentioning on my
  (MultipleIEs) IE6. On the other hand if I add the lines you mention then
 I
  get those sub-menus displaced to the left... 4 pixels. So, it might be
 that
  this is somethings that doesn't show up on my simulated IE6? So, I
 first
  committed the changes you proposed but later I rolled them back... as I
  can't see the problems myself.
 
  Maybe we should report this in here
 
 
 
 http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/
 
  As I'm just building a wrapper for what they have done
 
  Best,
 
  Ernesto
 
  On Mon, Sep 21, 2009 at 4:32 PM, T Ames tamesw...@gmail.com wrote:
 
   I just downloaded and tried.
  
   Works good in FF 3.0.14
  
   If you are using IE6, you will get a 4 pixel space on a secondary list.
   This
   causes issues when you slide the mouse in this tiny space. In the Test
   example, this is the list that would show when hovering over Two-2-1.
  
   For IE6, I can fix by adding another layer in the CSS - see Fix IE6
 sub
   menu list.  The use of the _ in front of the left: is only visible
  for
   IE6
  
  
   /*All subsequent sub menu levels vertical offset after 1st level sub
 menu
   */
   .jqueryslidemenu ul li ul li ul{
top: 0;
   }
  
   /*Fix IE6 sub menu list   */
   .jqueryslidemenu ul li ul li ul li{
   _left: -4px; /* IE6 only */
   }
  
  
   On Mon, Sep 21, 2009 at 9:52 AM, Ernesto Reinaldo Barreiro 
   reier...@gmail.com wrote:
  
Hi Joeri,
Good to hear that it worked for you! In the mean time I did some
  clean-up
to
make the component more configurable... If you get the chance to
  improve
it,
and if you are allowed to do so, it would nice if you also share the
modifications... So, that others can benefit too.
   
I also have had problems with SVN and eclipse (I guess because a
 stupid
proxy in between) but after some struggle I manage to get it
  working
   
Best,
   
Ernesto
   
On Mon, Sep 21, 2009 at 3:38 PM, Boydens Joeri (OZ) 
  joeri.boyd...@oz.be
wrote:
   
 Hi Ernesto,

 I downloaded your files and it's working fine!  It's indeed very
 easy
   to
 create such a menu if the javascript exists !

 I'll have a look how we can integrate it in our new project!

 Thanks
 Joeri


 Ps: i had problems with the google svn... maybe it's my eclipse
   settings
 but I downloaded the files manually..


 -Oorspronkelijk bericht-
 Van: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
 Verzonden: maandag 21 september 2009 15:08
 Aan: users@wicket.apache.org
 Onderwerp: Re: wicket menu

 Hi Joeri,
 I just implemented the menu you mentioned


  
 http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css
 _menu_2/

 in here


  
 http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src
 /com/antilia/web/dynamicdrive

 If you want to give it a try... get those sources on that package
 and
 mount
 the test page


  
 http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src
 /com/antilia/web/dynamicdrive/test/TestMenu.java

 On you application... Feel free to modify the code as you need...

 It is so easy to create components in Wicket (moreover, when
 someone
 else
 has done the dirty JavaScript work;-)

 Best,

 Ernesto


 
  
 http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/sr
 c/com/antilia/web/dynamicdrive

 On Mon, Sep 21, 2009 at 11:03 AM, Boydens Joeri (OZ)
 joeri.boyd...@oz.bewrote:

  Hi,
 
 
 
  We are changing from Struts to Wicket, in our Struts application
 we
 used
  Struts-Menu.  Now I've searched the wicket mailing list but I
   couldn't
  find any descent menu.
 
 
 
  Is there a Wicket menu available, where can I find it ? Or should
 I
  write my own?
 
 
 
  I've seen some code based on YUI, but I can't find that anymore
 in
   the
  svn.
 
 
 
  Joeri
 
 


 

Form Fiels Not updating

2009-09-22 Thread Martijn Lindhout
Hi All,

I created a MasterDetailView, with a MasterView and a DetailView. In code:

add(new MasterDetailView(markupId, new MembersTable(), new MemberForm());

MembersTable is a subclass of MasterView and MemberForm of DetailView.

The detailview uses PropertyModels, new PropertyModel(model, email);

When somebody clicks in the table on 'edit', I load the modelobject to edit,
and do a detailView.getModel().setObject(  new model object here).

I can not change the model itself, therefore I do a
getModel().setObject(...)

The problem is that the form fields do not change when clicking on two
different rows in de MasterView and doing the getModel().setObject().

What do I wrong?


Re: + key as alternative for tab key

2009-09-22 Thread Nicolas Melendez
In every field information goes to the server to validate and then go back?
Seems dificult to implement.please, tell us your experience when your are
done
NM


On Mon, Sep 21, 2009 at 3:28 PM, Pedro Santos pedros...@gmail.com wrote:

 Good question, pretty much javascript work. I'm curios know your final
 solution.

 One fine solution is to create an subclass of
 AjaxFormComponentUpdatingBehavior to onchange event. On this behavior you
 can put your javascript rules. Take a look at OnChangeAjaxBehavior to see
 how it could be done.

 On Mon, Sep 21, 2009 at 10:03 AM, Boydens Joeri (OZ) joeri.boyd...@oz.be
 wrote:

  Hi,
 
 
 
  We are rewriting an old fat client application to a more elegant web
  application based on Wicket.  In the requirements they state that the
  users of the fat client application do all input with the right side of
  their keyboard and want to keep it that way.
 
 
 
  One special requirement is that navigating between fields should be done
  with the ' + ' symbol on the right hand keypad instead of the 'tab' key.
  When navigating between fields there is also happing validation on the
  server side, so an ajax call will be necessary.
 
 
 
  How would you do this in an elegant and generic way ?
 
 
 
  Joeri
 
 
 
 
 
 
 
 



Re: wicket menu

2009-09-22 Thread T Ames
Yes, I did try the holly hack with a wicket:head and tried inserting the
html .jquerycssmenu{height: 1%;}  directly into the css.  Neither made any
difference.

I also noticed that they were using an older version of jquery 1.2.6
although I am not sure that would matter.



On Tue, Sep 22, 2009 at 3:26 AM, Ernesto Reinaldo Barreiro 
reier...@gmail.com wrote:

 Hi,
 The only difference I see between their page and TestMenu page is

 !--[if lte IE 7]
 style type=text/css
 html .jquerycssmenu{height: 1%;} /*Holly Hack for IE7 and below*/
 /style
 ![endif]--

 So, I just added
 head
 wicket:head
 !--[if lte IE 7]
 style type=text/css
 html .jquerycssmenu{height: 1%;} /*Holly Hack for IE7 and below*/
 /style
 ![endif]--
 /wicket:head
 /head

 to TestMenu page Can you check, please, if that fixes the problem?

 Best,

 Ernesto

 On Mon, Sep 21, 2009 at 5:41 PM, T Ames tamesw...@gmail.com wrote:

  Hmmm.   The demo version on the dynamicdrive site works ok in my IE6.
 
 
 
  On Mon, Sep 21, 2009 at 11:10 AM, Ernesto Reinaldo Barreiro 
  reier...@gmail.com wrote:
 
   Thanks for the feedback!
   Just one question... I can't see the problems you are mentioning on my
   (MultipleIEs) IE6. On the other hand if I add the lines you mention
 then
  I
   get those sub-menus displaced to the left... 4 pixels. So, it might be
  that
   this is somethings that doesn't show up on my simulated IE6? So, I
  first
   committed the changes you proposed but later I rolled them back... as I
   can't see the problems myself.
  
   Maybe we should report this in here
  
  
  
 
 http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/
  
   As I'm just building a wrapper for what they have done
  
   Best,
  
   Ernesto
  
   On Mon, Sep 21, 2009 at 4:32 PM, T Ames tamesw...@gmail.com wrote:
  
I just downloaded and tried.
   
Works good in FF 3.0.14
   
If you are using IE6, you will get a 4 pixel space on a secondary
 list.
This
causes issues when you slide the mouse in this tiny space. In the
 Test
example, this is the list that would show when hovering over Two-2-1.
   
For IE6, I can fix by adding another layer in the CSS - see Fix IE6
  sub
menu list.  The use of the _ in front of the left: is only
 visible
   for
IE6
   
   
/*All subsequent sub menu levels vertical offset after 1st level sub
  menu
*/
.jqueryslidemenu ul li ul li ul{
 top: 0;
}
   
/*Fix IE6 sub menu list   */
.jqueryslidemenu ul li ul li ul li{
_left: -4px; /* IE6 only */
}
   
   
On Mon, Sep 21, 2009 at 9:52 AM, Ernesto Reinaldo Barreiro 
reier...@gmail.com wrote:
   
 Hi Joeri,
 Good to hear that it worked for you! In the mean time I did some
   clean-up
 to
 make the component more configurable... If you get the chance to
   improve
 it,
 and if you are allowed to do so, it would nice if you also share
 the
 modifications... So, that others can benefit too.

 I also have had problems with SVN and eclipse (I guess because a
  stupid
 proxy in between) but after some struggle I manage to get it
   working

 Best,

 Ernesto

 On Mon, Sep 21, 2009 at 3:38 PM, Boydens Joeri (OZ) 
   joeri.boyd...@oz.be
 wrote:

  Hi Ernesto,
 
  I downloaded your files and it's working fine!  It's indeed very
  easy
to
  create such a menu if the javascript exists !
 
  I'll have a look how we can integrate it in our new project!
 
  Thanks
  Joeri
 
 
  Ps: i had problems with the google svn... maybe it's my eclipse
settings
  but I downloaded the files manually..
 
 
  -Oorspronkelijk bericht-
  Van: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
  Verzonden: maandag 21 september 2009 15:08
  Aan: users@wicket.apache.org
  Onderwerp: Re: wicket menu
 
  Hi Joeri,
  I just implemented the menu you mentioned
 
 
   
  http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css
  _menu_2/
 
  in here
 
 
   
  http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src
  /com/antilia/web/dynamicdrive
 
  If you want to give it a try... get those sources on that package
  and
  mount
  the test page
 
 
   
  http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src
  /com/antilia/web/dynamicdrive/test/TestMenu.java
 
  On you application... Feel free to modify the code as you need...
 
  It is so easy to create components in Wicket (moreover, when
  someone
  else
  has done the dirty JavaScript work;-)
 
  Best,
 
  Ernesto
 
 
  
   
  http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/sr
  c/com/antilia/web/dynamicdrive
 
  On Mon, Sep 21, 2009 at 11:03 AM, Boydens Joeri (OZ)
  

Re: wicket menu

2009-09-22 Thread Ernesto Reinaldo Barreiro
Then, I don't know what's the problem As, said I can't see this
happening on my IE6...
Another thing we could try is making a static page using jquery-1.3.2.min.js
and see if this is the issue...  so that, we are sure it is not Wicket
related.
Best,

Ernesto

On Tue, Sep 22, 2009 at 2:49 PM, T Ames tamesw...@gmail.com wrote:

 Yes, I did try the holly hack with a wicket:head and tried inserting the
 html .jquerycssmenu{height: 1%;}  directly into the css.  Neither made any
 difference.

 I also noticed that they were using an older version of jquery 1.2.6
 although I am not sure that would matter.



 On Tue, Sep 22, 2009 at 3:26 AM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

  Hi,
  The only difference I see between their page and TestMenu page is
 
  !--[if lte IE 7]
  style type=text/css
  html .jquerycssmenu{height: 1%;} /*Holly Hack for IE7 and below*/
  /style
  ![endif]--
 
  So, I just added
  head
  wicket:head
  !--[if lte IE 7]
  style type=text/css
  html .jquerycssmenu{height: 1%;} /*Holly Hack for IE7 and below*/
  /style
  ![endif]--
  /wicket:head
  /head
 
  to TestMenu page Can you check, please, if that fixes the problem?
 
  Best,
 
  Ernesto
 
  On Mon, Sep 21, 2009 at 5:41 PM, T Ames tamesw...@gmail.com wrote:
 
   Hmmm.   The demo version on the dynamicdrive site works ok in my IE6.
  
  
  
   On Mon, Sep 21, 2009 at 11:10 AM, Ernesto Reinaldo Barreiro 
   reier...@gmail.com wrote:
  
Thanks for the feedback!
Just one question... I can't see the problems you are mentioning on
 my
(MultipleIEs) IE6. On the other hand if I add the lines you mention
  then
   I
get those sub-menus displaced to the left... 4 pixels. So, it might
 be
   that
this is somethings that doesn't show up on my simulated IE6? So, I
   first
committed the changes you proposed but later I rolled them back... as
 I
can't see the problems myself.
   
Maybe we should report this in here
   
   
   
  
 
 http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/
   
As I'm just building a wrapper for what they have done
   
Best,
   
Ernesto
   
On Mon, Sep 21, 2009 at 4:32 PM, T Ames tamesw...@gmail.com wrote:
   
 I just downloaded and tried.

 Works good in FF 3.0.14

 If you are using IE6, you will get a 4 pixel space on a secondary
  list.
 This
 causes issues when you slide the mouse in this tiny space. In the
  Test
 example, this is the list that would show when hovering over
 Two-2-1.

 For IE6, I can fix by adding another layer in the CSS - see Fix
 IE6
   sub
 menu list.  The use of the _ in front of the left: is only
  visible
for
 IE6


 /*All subsequent sub menu levels vertical offset after 1st level
 sub
   menu
 */
 .jqueryslidemenu ul li ul li ul{
  top: 0;
 }

 /*Fix IE6 sub menu list   */
 .jqueryslidemenu ul li ul li ul li{
 _left: -4px; /* IE6 only */
 }


 On Mon, Sep 21, 2009 at 9:52 AM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

  Hi Joeri,
  Good to hear that it worked for you! In the mean time I did some
clean-up
  to
  make the component more configurable... If you get the chance to
improve
  it,
  and if you are allowed to do so, it would nice if you also share
  the
  modifications... So, that others can benefit too.
 
  I also have had problems with SVN and eclipse (I guess because a
   stupid
  proxy in between) but after some struggle I manage to get it
working
 
  Best,
 
  Ernesto
 
  On Mon, Sep 21, 2009 at 3:38 PM, Boydens Joeri (OZ) 
joeri.boyd...@oz.be
  wrote:
 
   Hi Ernesto,
  
   I downloaded your files and it's working fine!  It's indeed
 very
   easy
 to
   create such a menu if the javascript exists !
  
   I'll have a look how we can integrate it in our new project!
  
   Thanks
   Joeri
  
  
   Ps: i had problems with the google svn... maybe it's my eclipse
 settings
   but I downloaded the files manually..
  
  
   -Oorspronkelijk bericht-
   Van: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
   Verzonden: maandag 21 september 2009 15:08
   Aan: users@wicket.apache.org
   Onderwerp: Re: wicket menu
  
   Hi Joeri,
   I just implemented the menu you mentioned
  
  

  
 http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css
   _menu_2/
  
   in here
  
  

  
 http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src
   /com/antilia/web/dynamicdrive
  
   If you want to give it a try... get those sources on that
 package
   and
   mount
   the test page
  
  

  
 http://code.google.com/p/antilia/source/browse/trunk/com.antilia.ext/src
   

Re: Is it the best way to code a Link depending on a condition

2009-09-22 Thread Nicolas Melendez
Jeremy:you say 2 - don't call setEnabled() - override isEnabled

why is better override isEnable then setEnable?

thanks NM

On Mon, Sep 21, 2009 at 9:44 AM, cmoulliard cmoulli...@gmail.com wrote:


 Joseph,

 Can you explain a little bit what you mean by provide it with attribute
 (IModelString) ?

private Label labelTitle;
public static Label createLabelTitle(String title) {
 return new Label(title,new Model( title ));
}

 -- becomes

private Label labelTitle;
public static Label createLabelTitle(String title) {
return new Label(title,new PropertyModel( ModelClass, title
 ));
}

 Is it right what I create ?


 Joseph Pachod wrote:
 
  cmoulliard wrote:
  What I have done to avoid to repeat the creation of the labels is to
  define
  and use static method
 
   private Label labelTitle;
   public static Label getLabelTitle(String title) {
   return new Label(title,new Model( title ));
   }
 
  I personally would name this method createLabelTitle(String title) or
  getNewLabelTitle(String title), for explicitness.
 
  Furthermore, I would directly provide it with a final IModelString
  title attribute, not to dictate how the data has to be provided
  (dynamic or not for example).
 
  In the end, this method is fine for just a label, but for anything more
  complex a panel would be the way to go I would say. The main exception
  here I see right now is the case of pages.
 
  For example, if we're speaking of a page title, then I would define it
  in my base page and make an abstract String getTitle() method in the
  base page so I'm sure everyone set it up later on. I would do the same
  if it's a specific kind of structured page, for example an abstract
  class ContentHoldingPage extend TheBasePage.
 
  ++
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 


 -
 Charles Moulliard
 SOA Architect

 My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/
 --
 View this message in context:
 http://www.nabble.com/Is-it-the-best-way-to-code-a-Link-depending-on-a-condition-tp25488603p25530206.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: wicket menu

2009-09-22 Thread T Ames
Found it.  Oddly enough, it is the jquery version.

I removed the ResourceReference to JQUERY in MenuBar.java and stuck the
script directly into the head tag of TestMenu.html :

script type=text/javascript src=
http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js;/script

I also removed the -4px hack in the css.  Works in my IE6 now without the
hack or the holly hack for that matter.



On Tue, Sep 22, 2009 at 9:00 AM, Ernesto Reinaldo Barreiro 
reier...@gmail.com wrote:

 Then, I don't know what's the problem As, said I can't see this
 happening on my IE6...
 Another thing we could try is making a static page using
 jquery-1.3.2.min.js
 and see if this is the issue...  so that, we are sure it is not Wicket
 related.
 Best,

 Ernesto

 On Tue, Sep 22, 2009 at 2:49 PM, T Ames tamesw...@gmail.com wrote:

  Yes, I did try the holly hack with a wicket:head and tried inserting the
  html .jquerycssmenu{height: 1%;}  directly into the css.  Neither made
 any
  difference.
 
  I also noticed that they were using an older version of jquery 1.2.6
  although I am not sure that would matter.
 
 
 
  On Tue, Sep 22, 2009 at 3:26 AM, Ernesto Reinaldo Barreiro 
  reier...@gmail.com wrote:
 
   Hi,
   The only difference I see between their page and TestMenu page is
  
   !--[if lte IE 7]
   style type=text/css
   html .jquerycssmenu{height: 1%;} /*Holly Hack for IE7 and below*/
   /style
   ![endif]--
  
   So, I just added
   head
   wicket:head
   !--[if lte IE 7]
   style type=text/css
   html .jquerycssmenu{height: 1%;} /*Holly Hack for IE7 and below*/
   /style
   ![endif]--
   /wicket:head
   /head
  
   to TestMenu page Can you check, please, if that fixes the problem?
  
   Best,
  
   Ernesto
  
   On Mon, Sep 21, 2009 at 5:41 PM, T Ames tamesw...@gmail.com wrote:
  
Hmmm.   The demo version on the dynamicdrive site works ok in my IE6.
   
   
   
On Mon, Sep 21, 2009 at 11:10 AM, Ernesto Reinaldo Barreiro 
reier...@gmail.com wrote:
   
 Thanks for the feedback!
 Just one question... I can't see the problems you are mentioning on
  my
 (MultipleIEs) IE6. On the other hand if I add the lines you mention
   then
I
 get those sub-menus displaced to the left... 4 pixels. So, it might
  be
that
 this is somethings that doesn't show up on my simulated IE6? So,
 I
first
 committed the changes you proposed but later I rolled them back...
 as
  I
 can't see the problems myself.

 Maybe we should report this in here



   
  
 
 http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/

 As I'm just building a wrapper for what they have done

 Best,

 Ernesto

 On Mon, Sep 21, 2009 at 4:32 PM, T Ames tamesw...@gmail.com
 wrote:

  I just downloaded and tried.
 
  Works good in FF 3.0.14
 
  If you are using IE6, you will get a 4 pixel space on a secondary
   list.
  This
  causes issues when you slide the mouse in this tiny space. In the
   Test
  example, this is the list that would show when hovering over
  Two-2-1.
 
  For IE6, I can fix by adding another layer in the CSS - see Fix
  IE6
sub
  menu list.  The use of the _ in front of the left: is only
   visible
 for
  IE6
 
 
  /*All subsequent sub menu levels vertical offset after 1st level
  sub
menu
  */
  .jqueryslidemenu ul li ul li ul{
   top: 0;
  }
 
  /*Fix IE6 sub menu list   */
  .jqueryslidemenu ul li ul li ul li{
  _left: -4px; /* IE6 only */
  }
 
 
  On Mon, Sep 21, 2009 at 9:52 AM, Ernesto Reinaldo Barreiro 
  reier...@gmail.com wrote:
 
   Hi Joeri,
   Good to hear that it worked for you! In the mean time I did
 some
 clean-up
   to
   make the component more configurable... If you get the chance
 to
 improve
   it,
   and if you are allowed to do so, it would nice if you also
 share
   the
   modifications... So, that others can benefit too.
  
   I also have had problems with SVN and eclipse (I guess because
 a
stupid
   proxy in between) but after some struggle I manage to get it
 working
  
   Best,
  
   Ernesto
  
   On Mon, Sep 21, 2009 at 3:38 PM, Boydens Joeri (OZ) 
 joeri.boyd...@oz.be
   wrote:
  
Hi Ernesto,
   
I downloaded your files and it's working fine!  It's indeed
  very
easy
  to
create such a menu if the javascript exists !
   
I'll have a look how we can integrate it in our new project!
   
Thanks
Joeri
   
   
Ps: i had problems with the google svn... maybe it's my
 eclipse
  settings
but I downloaded the files manually..
   
   
-Oorspronkelijk bericht-
Van: Ernesto Reinaldo Barreiro [mailto:reier...@gmail.com]
Verzonden: 

Re: wicket menu

2009-09-22 Thread T Ames
I downloaded jquery-1.2.6.min.js and replaced the ResourceReference with
that.  Set everything else back to original and now it is working.




On Tue, Sep 22, 2009 at 9:25 AM, T Ames tamesw...@gmail.com wrote:

 Found it.  Oddly enough, it is the jquery version.

 I removed the ResourceReference to JQUERY in MenuBar.java and stuck the
 script directly into the head tag of TestMenu.html :

 script type=text/javascript src=
 http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js;/script

 I also removed the -4px hack in the css.  Works in my IE6 now without the
 hack or the holly hack for that matter.




 On Tue, Sep 22, 2009 at 9:00 AM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

 Then, I don't know what's the problem As, said I can't see this
 happening on my IE6...
 Another thing we could try is making a static page using
 jquery-1.3.2.min.js
 and see if this is the issue...  so that, we are sure it is not Wicket
 related.
 Best,

 Ernesto

 On Tue, Sep 22, 2009 at 2:49 PM, T Ames tamesw...@gmail.com wrote:

  Yes, I did try the holly hack with a wicket:head and tried inserting the
  html .jquerycssmenu{height: 1%;}  directly into the css.  Neither made
 any
  difference.
 
  I also noticed that they were using an older version of jquery 1.2.6
  although I am not sure that would matter.
 
 
 
  On Tue, Sep 22, 2009 at 3:26 AM, Ernesto Reinaldo Barreiro 
  reier...@gmail.com wrote:
 
   Hi,
   The only difference I see between their page and TestMenu page is
  
   !--[if lte IE 7]
   style type=text/css
   html .jquerycssmenu{height: 1%;} /*Holly Hack for IE7 and below*/
   /style
   ![endif]--
  
   So, I just added
   head
   wicket:head
   !--[if lte IE 7]
   style type=text/css
   html .jquerycssmenu{height: 1%;} /*Holly Hack for IE7 and below*/
   /style
   ![endif]--
   /wicket:head
   /head
  
   to TestMenu page Can you check, please, if that fixes the problem?
  
   Best,
  
   Ernesto
  
   On Mon, Sep 21, 2009 at 5:41 PM, T Ames tamesw...@gmail.com wrote:
  
Hmmm.   The demo version on the dynamicdrive site works ok in my
 IE6.
   
   
   
On Mon, Sep 21, 2009 at 11:10 AM, Ernesto Reinaldo Barreiro 
reier...@gmail.com wrote:
   
 Thanks for the feedback!
 Just one question... I can't see the problems you are mentioning
 on
  my
 (MultipleIEs) IE6. On the other hand if I add the lines you
 mention
   then
I
 get those sub-menus displaced to the left... 4 pixels. So, it
 might
  be
that
 this is somethings that doesn't show up on my simulated IE6? So,
 I
first
 committed the changes you proposed but later I rolled them back...
 as
  I
 can't see the problems myself.

 Maybe we should report this in here



   
  
 
 http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/

 As I'm just building a wrapper for what they have done

 Best,

 Ernesto

 On Mon, Sep 21, 2009 at 4:32 PM, T Ames tamesw...@gmail.com
 wrote:

  I just downloaded and tried.
 
  Works good in FF 3.0.14
 
  If you are using IE6, you will get a 4 pixel space on a
 secondary
   list.
  This
  causes issues when you slide the mouse in this tiny space. In
 the
   Test
  example, this is the list that would show when hovering over
  Two-2-1.
 
  For IE6, I can fix by adding another layer in the CSS - see Fix
  IE6
sub
  menu list.  The use of the _ in front of the left: is only
   visible
 for
  IE6
 
 
  /*All subsequent sub menu levels vertical offset after 1st level
  sub
menu
  */
  .jqueryslidemenu ul li ul li ul{
   top: 0;
  }
 
  /*Fix IE6 sub menu list   */
  .jqueryslidemenu ul li ul li ul li{
  _left: -4px; /* IE6 only */
  }
 
 
  On Mon, Sep 21, 2009 at 9:52 AM, Ernesto Reinaldo Barreiro 
  reier...@gmail.com wrote:
 
   Hi Joeri,
   Good to hear that it worked for you! In the mean time I did
 some
 clean-up
   to
   make the component more configurable... If you get the chance
 to
 improve
   it,
   and if you are allowed to do so, it would nice if you also
 share
   the
   modifications... So, that others can benefit too.
  
   I also have had problems with SVN and eclipse (I guess because
 a
stupid
   proxy in between) but after some struggle I manage to get it
 working
  
   Best,
  
   Ernesto
  
   On Mon, Sep 21, 2009 at 3:38 PM, Boydens Joeri (OZ) 
 joeri.boyd...@oz.be
   wrote:
  
Hi Ernesto,
   
I downloaded your files and it's working fine!  It's indeed
  very
easy
  to
create such a menu if the javascript exists !
   
I'll have a look how we can integrate it in our new project!
   
Thanks
Joeri
   
   
Ps: i had problems with the google 

Re: wicket menu

2009-09-22 Thread Ernesto Reinaldo Barreiro
Maybe a generic solution is to include both jquery versions, sniff  the
browser version and if it is IE6 then serve jquery-1.2.6.min.js... Or try to
find out why new jquery does  not work. Maybe this has been reported on the
original site?
Best,

Ernesto

On Tue, Sep 22, 2009 at 3:25 PM, T Ames tamesw...@gmail.com wrote:

 Found it.  Oddly enough, it is the jquery version.

 I removed the ResourceReference to JQUERY in MenuBar.java and stuck the
 script directly into the head tag of TestMenu.html :

 script type=text/javascript src=
 http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js;/script

 I also removed the -4px hack in the css.  Works in my IE6 now without the
 hack or the holly hack for that matter.



 On Tue, Sep 22, 2009 at 9:00 AM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

  Then, I don't know what's the problem As, said I can't see this
  happening on my IE6...
  Another thing we could try is making a static page using
  jquery-1.3.2.min.js
  and see if this is the issue...  so that, we are sure it is not Wicket
  related.
  Best,
 
  Ernesto
 
  On Tue, Sep 22, 2009 at 2:49 PM, T Ames tamesw...@gmail.com wrote:
 
   Yes, I did try the holly hack with a wicket:head and tried inserting
 the
   html .jquerycssmenu{height: 1%;}  directly into the css.  Neither made
  any
   difference.
  
   I also noticed that they were using an older version of jquery 1.2.6
   although I am not sure that would matter.
  
  
  
   On Tue, Sep 22, 2009 at 3:26 AM, Ernesto Reinaldo Barreiro 
   reier...@gmail.com wrote:
  
Hi,
The only difference I see between their page and TestMenu page is
   
!--[if lte IE 7]
style type=text/css
html .jquerycssmenu{height: 1%;} /*Holly Hack for IE7 and below*/
/style
![endif]--
   
So, I just added
head
wicket:head
!--[if lte IE 7]
style type=text/css
html .jquerycssmenu{height: 1%;} /*Holly Hack for IE7 and below*/
/style
![endif]--
/wicket:head
/head
   
to TestMenu page Can you check, please, if that fixes the
 problem?
   
Best,
   
Ernesto
   
On Mon, Sep 21, 2009 at 5:41 PM, T Ames tamesw...@gmail.com wrote:
   
 Hmmm.   The demo version on the dynamicdrive site works ok in my
 IE6.



 On Mon, Sep 21, 2009 at 11:10 AM, Ernesto Reinaldo Barreiro 
 reier...@gmail.com wrote:

  Thanks for the feedback!
  Just one question... I can't see the problems you are mentioning
 on
   my
  (MultipleIEs) IE6. On the other hand if I add the lines you
 mention
then
 I
  get those sub-menus displaced to the left... 4 pixels. So, it
 might
   be
 that
  this is somethings that doesn't show up on my simulated IE6?
 So,
  I
 first
  committed the changes you proposed but later I rolled them
 back...
  as
   I
  can't see the problems myself.
 
  Maybe we should report this in here
 
 
 

   
  
 
 http://www.dynamicdrive.com/style/csslibrary/item/jquery_multi_level_css_menu_2/
 
  As I'm just building a wrapper for what they have done
 
  Best,
 
  Ernesto
 
  On Mon, Sep 21, 2009 at 4:32 PM, T Ames tamesw...@gmail.com
  wrote:
 
   I just downloaded and tried.
  
   Works good in FF 3.0.14
  
   If you are using IE6, you will get a 4 pixel space on a
 secondary
list.
   This
   causes issues when you slide the mouse in this tiny space. In
 the
Test
   example, this is the list that would show when hovering over
   Two-2-1.
  
   For IE6, I can fix by adding another layer in the CSS - see
 Fix
   IE6
 sub
   menu list.  The use of the _ in front of the left: is only
visible
  for
   IE6
  
  
   /*All subsequent sub menu levels vertical offset after 1st
 level
   sub
 menu
   */
   .jqueryslidemenu ul li ul li ul{
top: 0;
   }
  
   /*Fix IE6 sub menu list   */
   .jqueryslidemenu ul li ul li ul li{
   _left: -4px; /* IE6 only */
   }
  
  
   On Mon, Sep 21, 2009 at 9:52 AM, Ernesto Reinaldo Barreiro 
   reier...@gmail.com wrote:
  
Hi Joeri,
Good to hear that it worked for you! In the mean time I did
  some
  clean-up
to
make the component more configurable... If you get the chance
  to
  improve
it,
and if you are allowed to do so, it would nice if you also
  share
the
modifications... So, that others can benefit too.
   
I also have had problems with SVN and eclipse (I guess
 because
  a
 stupid
proxy in between) but after some struggle I manage to get it
  working
   
Best,
   
Ernesto
   
On Mon, Sep 21, 2009 at 3:38 PM, Boydens Joeri (OZ) 
  joeri.boyd...@oz.be
wrote:
   
 Hi Ernesto,

 I downloaded your files and it's 

ClassCastException in ListMultipleChoice

2009-09-22 Thread Sadhna Ahuja
Hello,

 

I have a ListMultipleChoice component in my form and I get the following
exception when I select an option and submit the form:

 

Caused by: java.lang.ClassCastException: java.lang.String cannot be cast
to java.util.Collection

  at
org.apache.wicket.markup.html.form.ListMultipleChoice.updateModel(ListMu
ltipleChoice.java:325)

  at
org.apache.wicket.markup.html.form.Form$20.validate(Form.java:1837)

  at
org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(
Form.java:165)

  at
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPost
OrderHelper(FormComponent.java:421)

  at
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPost
OrderHelper(FormComponent.java:408)

  at
org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPost
Order(FormComponent.java:385)

  at
org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(For
m.java:1060)

  at
org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModel
s(Form.java:1829)

  at
org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.j
ava:1796)

  at org.apache.wicket.markup.html.form.Form.process(Form.java:865)

  at
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:807)

  ... 53 more

 

Could someone please point out if I'm missing something? Here's the
relevant pieces of my code:

--

ListMultipleChoice searchPymntApplCd = new
ListMultipleChoice(

searchPymntApplCd,

new AbstractReadOnlyModel() {

public Object getObject() {

return getPaymentApplOptions(paymentAppls);
//This returns ArrayListPaymentApplOption

}},

new IChoiceRenderer() {

public Object getDisplayValue(Object object) {

PaymentApplOption option =
(PaymentApplOption) object;

return option.getPymntApplDesc();

}

public String getIdValue(Object object, int
index) {

if
(PaymentApplOption.class.isInstance(object)) {

PaymentApplOption option =
(PaymentApplOption) object;

return option.getPymntApplCd();

}

return null;

}

}).setMaxRows(5);

searchPymntApplCd.setRequired(false);

searchPymntApplCd.setType(Collection.class);

add(searchPymntApplCd);

 

---

public class PaymentApplOption implements Serializable {

 

private String pymntApplCd;

private String pymntApplDesc;

...

}

 

Thanks.

 

 

 



Multiple choice checkboxes

2009-09-22 Thread Sadhna Ahuja
Is there a way to have multiple choice checkboxes? From what I read on
the forums, I could only have a ListMultipleChoice.

 

But I need to have multiple choice checkboxes. Any examples on how I
could achieve that?

 

Thanks.

 

 

 

 



Form Processing problem on pages with Border - Wicket 1.4.1

2009-09-22 Thread Flavius
I am migrating a project from 1.3.6 to 1.4.1.  I've run into a problem and
I'm not sure if this is a bug or not.

Most of the pages have a border and the border has a DropDownChoice in it
(as well as other components).  Technically it's in a panel in the border.

The Form objects are typically children of the border, like

add(border);
border.add(inputForm);

When the form is submitted, the DropDownChoice's value is being reset.  I've
traced through the code and it looks like the root of the cause is in
Form#internalUpdateFormComponentModels.

This is checking if there is a border and, if yes, then visiting all the
components of the border.

The internalUpdateFormComponentModels method in 1.3.6 didn't look for the
border and visit it's components.  It's not obvious to me why this needs to
be done now in 1.4.

So ultimately FormComponent#visitComponentsPostOrderHelper is being called
for all components whether they are inside the form or not.

It's returning visitor.component(component), which calls Form#component and
that calls ((IFormModelUpdateListener)component).updateModel();

I looked through the nabble logs and noticed this entry here:
http://www.nabble.com/Form-processing-issues-and-questions-%28particularly-r
elated-to-Border-and-ListMultipleChoice%29-td25251849.html#a25251849


Is there something I need to do here?  I'm not seeing any way of telling the
Form not to visit the Border's controls, and again, I'm not sure why it's
doing this.

I'd greatly appreciate any insight that can be offered.


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



Re: Form Processing problem on pages with Border - Wicket 1.4.1

2009-09-22 Thread Pedro Santos
The internalUpdateFormComponentModels method in 1.3.6 didn't look for the
border and visit it's components.  It's not obvious to me why this needs to
be done now in 1.4.

The objective is to notify form's event to generic containers...

When the form is submitted, the DropDownChoice's value is being reset.

you can implement the updateModel() of your DropDownChoice and implement the
behavior you are expecting, or you can require on JIRA that the wicket form
component stop notifying your components on generic containers.
http://issues.apache.org/jira/browse/WICKET-1853



On Tue, Sep 22, 2009 at 10:46 AM, Flavius flav...@silverlion.com wrote:

 I am migrating a project from 1.3.6 to 1.4.1.  I've run into a problem and
 I'm not sure if this is a bug or not.

 Most of the pages have a border and the border has a DropDownChoice in it
 (as well as other components).  Technically it's in a panel in the border.

 The Form objects are typically children of the border, like

 add(border);
 border.add(inputForm);

 When the form is submitted, the DropDownChoice's value is being reset.
  I've
 traced through the code and it looks like the root of the cause is in
 Form#internalUpdateFormComponentModels.

 This is checking if there is a border and, if yes, then visiting all the
 components of the border.

 The internalUpdateFormComponentModels method in 1.3.6 didn't look for the
 border and visit it's components.  It's not obvious to me why this needs to
 be done now in 1.4.

 So ultimately FormComponent#visitComponentsPostOrderHelper is being called
 for all components whether they are inside the form or not.

 It's returning visitor.component(component), which calls Form#component and
 that calls ((IFormModelUpdateListener)component).updateModel();

 I looked through the nabble logs and noticed this entry here:

 http://www.nabble.com/Form-processing-issues-and-questions-%28particularly-r
 elated-to-Border-and-ListMultipleChoice%29-td25251849.html#a25251849http://www.nabble.com/Form-processing-issues-and-questions-%28particularly-r%0Aelated-to-Border-and-ListMultipleChoice%29-td25251849.html#a25251849


 Is there something I need to do here?  I'm not seeing any way of telling
 the
 Form not to visit the Border's controls, and again, I'm not sure why it's
 doing this.

 I'd greatly appreciate any insight that can be offered.


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




Re: Multiple choice checkboxes

2009-09-22 Thread Dipu
take a look at checkGroup and check, looks like that is what you are after.

please don't do duplicate posts on the list, that would ony help in
annoying the, happy to help, regular repliers on this list

-dipu


On Tue, Sep 22, 2009 at 2:37 PM, Sadhna Ahuja sadhna.ah...@nisc.coop wrote:
 Is there a way to have multiple choice checkboxes? From what I read on
 the forums, I could only have a ListMultipleChoice.



 But I need to have multiple choice checkboxes. Any examples on how I
 could achieve that?



 Thanks.











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



Re: Form Processing problem on pages with Border - Wicket 1.4.1

2009-09-22 Thread Pedro Santos
I mean override the updateModel :P


On Tue, Sep 22, 2009 at 11:03 AM, Pedro Santos pedros...@gmail.com wrote:

 The internalUpdateFormComponentModels method in 1.3.6 didn't look for the
 border and visit it's components.  It's not obvious to me why this needs to
 be done now in 1.4.

 The objective is to notify form's event to generic containers...

 When the form is submitted, the DropDownChoice's value is being reset.

 you can implement the updateModel() of your DropDownChoice and implement
 the behavior you are expecting, or you can require on JIRA that the wicket
 form component stop notifying your components on generic containers.
 http://issues.apache.org/jira/browse/WICKET-1853




 On Tue, Sep 22, 2009 at 10:46 AM, Flavius flav...@silverlion.com wrote:

 I am migrating a project from 1.3.6 to 1.4.1.  I've run into a problem and
 I'm not sure if this is a bug or not.

 Most of the pages have a border and the border has a DropDownChoice in it
 (as well as other components).  Technically it's in a panel in the border.

 The Form objects are typically children of the border, like

 add(border);
 border.add(inputForm);

 When the form is submitted, the DropDownChoice's value is being reset.
  I've
 traced through the code and it looks like the root of the cause is in
 Form#internalUpdateFormComponentModels.

 This is checking if there is a border and, if yes, then visiting all the
 components of the border.

 The internalUpdateFormComponentModels method in 1.3.6 didn't look for the
 border and visit it's components.  It's not obvious to me why this needs
 to
 be done now in 1.4.

 So ultimately FormComponent#visitComponentsPostOrderHelper is being called
 for all components whether they are inside the form or not.

 It's returning visitor.component(component), which calls Form#component
 and
 that calls ((IFormModelUpdateListener)component).updateModel();

 I looked through the nabble logs and noticed this entry here:

 http://www.nabble.com/Form-processing-issues-and-questions-%28particularly-r
 elated-to-Border-and-ListMultipleChoice%29-td25251849.html#a25251849http://www.nabble.com/Form-processing-issues-and-questions-%28particularly-r%0Aelated-to-Border-and-ListMultipleChoice%29-td25251849.html#a25251849


 Is there something I need to do here?  I'm not seeing any way of telling
 the
 Form not to visit the Border's controls, and again, I'm not sure why it's
 doing this.

 I'd greatly appreciate any insight that can be offered.


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





Re: ClassCastException in ListMultipleChoice

2009-09-22 Thread Igor Vaynberg
your model object should be a collection instead of a string because
this component allows selection of multiple values.

-igor

On Tue, Sep 22, 2009 at 6:37 AM, Sadhna Ahuja sadhna.ah...@nisc.coop wrote:
 Hello,



 I have a ListMultipleChoice component in my form and I get the following
 exception when I select an option and submit the form:



 Caused by: java.lang.ClassCastException: java.lang.String cannot be cast
 to java.util.Collection

      at
 org.apache.wicket.markup.html.form.ListMultipleChoice.updateModel(ListMu
 ltipleChoice.java:325)

      at
 org.apache.wicket.markup.html.form.Form$20.validate(Form.java:1837)

      at
 org.apache.wicket.markup.html.form.Form$ValidationVisitor.formComponent(
 Form.java:165)

      at
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPost
 OrderHelper(FormComponent.java:421)

      at
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPost
 OrderHelper(FormComponent.java:408)

      at
 org.apache.wicket.markup.html.form.FormComponent.visitFormComponentsPost
 Order(FormComponent.java:385)

      at
 org.apache.wicket.markup.html.form.Form.visitFormComponentsPostOrder(For
 m.java:1060)

      at
 org.apache.wicket.markup.html.form.Form.internalUpdateFormComponentModel
 s(Form.java:1829)

      at
 org.apache.wicket.markup.html.form.Form.updateFormComponentModels(Form.j
 ava:1796)

      at org.apache.wicket.markup.html.form.Form.process(Form.java:865)

      at
 org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:807)

      ... 53 more



 Could someone please point out if I'm missing something? Here's the
 relevant pieces of my code:

 --

            ListMultipleChoice searchPymntApplCd = new
 ListMultipleChoice(

                searchPymntApplCd,

                    new AbstractReadOnlyModel() {

                        public Object getObject() {

                            return getPaymentApplOptions(paymentAppls);
 //This returns ArrayListPaymentApplOption

                        }},

                    new IChoiceRenderer() {

                        public Object getDisplayValue(Object object) {

                            PaymentApplOption option =
 (PaymentApplOption) object;

                            return option.getPymntApplDesc();

                        }

                        public String getIdValue(Object object, int
 index) {

                            if
 (PaymentApplOption.class.isInstance(object)) {

                                PaymentApplOption option =
 (PaymentApplOption) object;

                                return option.getPymntApplCd();

                            }

                            return null;

                        }

                    }).setMaxRows(5);

            searchPymntApplCd.setRequired(false);

            searchPymntApplCd.setType(Collection.class);

            add(searchPymntApplCd);



 ---

 public class PaymentApplOption implements Serializable {



    private String pymntApplCd;

    private String pymntApplDesc;

    ...

 }



 Thanks.









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



How add a further authentication confirm

2009-09-22 Thread Domenico Reggiori
Dear users,
I'm using wicket 1.3.6 version.
I need to add a further authentication mechanism to some Link or Form  I 
need to be able to force authentication every time on certain links and 
buttons when they are pressed.
This behavior must be configurable dinamically, I would like to be able to 
control the forced authentication of my links and buttons in a unique point, 
I would like to avoid having to modify each point individually.
I try to achieve this objective extending a WaspAuthorizationStrategy , 
overriding isActionAuthorized(Component component, Action action). This 
method allows me to add a new Validator when I find  a matching form 
component, but apparently it is not applicable for Link components: I tried 
to add a new Behavior to them but any effort got the Runtime Exception 





!--
@page { margin: 0.79in }
P { margin-bottom: 0.08in; text-align: justify }
P.western { font-size: 11pt }
P.cjk { font-size: 10pt }
--


“Cannot
modify component hierarchy after render phase has started”.
Do you know a better position to add this behavior dinamically in the 
lifecycle of the application to avoid this runtime Exception?


[Migrating to Wicket 1.4.1] Problem submitting FormTester

2009-09-22 Thread Martin Bigio
Hi, I've been having problems migrating Wicket 1.4-RC4 to 1.4.1. Some of our
wicket-tests are failing and producing errors due to a form submission
issue.

For example:

.java:
public class Prueba extends PageTemplate {
public Prueba() {
add(new FormVoid(form).add(new Button(submit, null) {
@Override
public void onSubmit() {
System.out.println(submit listener);
}
}));
}
}

.html:
wicket:extend
form wicket:id=form
input type=submit wicket:id=submit /
/form
/wicket:extend

test:
@Test
public void render(){
tester.startPage(Prueba.class);
tester.assertRenderedPage(Prueba.class);
FormTester formTester = tester.newFormTester(form);
formTester.submit(submit);
tester.assertRenderedPage(Prueba.class); // This line produces
AssertionFailedError: expected:Prueba but was:Home

stacktrace:

 junit.framework.AssertionFailedError: expected:Prueba but was:Home
at
org.apache.wicket.util.tester.WicketTester.assertResult(WicketTester.java:580)
at
org.apache.wicket.util.tester.WicketTester.assertRenderedPage(WicketTester.java:528)
at ar.edu.itba.it.dev.sga.PruebaTest.render(PruebaTest.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at
org.springframework.test.context.junit4.SpringTestMethod.invoke(SpringTestMethod.java:160)
at
org.springframework.test.context.junit4.SpringMethodRoadie.runTestMethod(SpringMethodRoadie.java:233)
at
org.springframework.test.context.junit4.SpringMethodRoadie$RunBeforesThenTestThenAfters.run(SpringMethodRoadie.java:333)
at
org.springframework.test.context.junit4.SpringMethodRoadie.runWithRepetitions(SpringMethodRoadie.java:217)
at
org.springframework.test.context.junit4.SpringMethodRoadie.runTest(SpringMethodRoadie.java:197)
at
org.springframework.test.context.junit4.SpringMethodRoadie.run(SpringMethodRoadie.java:143)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:160)
at
org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
at
org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
at
org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
at
org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
at
org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:97)
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


Debugging the formTester.submit I could see that when triying to resolve the
target because the page parameter path is empty the WebRequestCycleProcessor
decides to resolve to the home page (line 173). I have no problem when
submiting forms using AJAX components.

Thanks, Martin.


parameters encryption

2009-09-22 Thread tubin gen
Is there any setting in Application  or any base class  through which
parameters can be encrypted and decrypted  behind the scenes  , so that I
wont  do this for every   page ?


Re: parameters encryption

2009-09-22 Thread Igor Vaynberg
org.apache.wicket.protocol.http.request.CryptedUrlWebRequestCodingStrategy

-igor

On Tue, Sep 22, 2009 at 9:43 AM, tubin gen fachh...@gmail.com wrote:
 Is there any setting in Application  or any base class  through which
 parameters can be encrypted and decrypted  behind the scenes  , so that I
 wont  do this for every   page ?


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



Re: + key as alternative for tab key

2009-09-22 Thread Jeremy Thomerson
It's very easy to implement with Wicket - just add ajax form submitting
behavior to desired fields, and in the behavior, repaint the feedback form,
etc...  Although, it can be server intensive obviously.

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



On Tue, Sep 22, 2009 at 7:25 AM, Nicolas Melendez nmelen...@getsense.com.ar
 wrote:

 In every field information goes to the server to validate and then go back?
 Seems dificult to implement.please, tell us your experience when your are
 done
 NM


 On Mon, Sep 21, 2009 at 3:28 PM, Pedro Santos pedros...@gmail.com wrote:

  Good question, pretty much javascript work. I'm curios know your final
  solution.
 
  One fine solution is to create an subclass of
  AjaxFormComponentUpdatingBehavior to onchange event. On this behavior you
  can put your javascript rules. Take a look at OnChangeAjaxBehavior to see
  how it could be done.
 
  On Mon, Sep 21, 2009 at 10:03 AM, Boydens Joeri (OZ) 
 joeri.boyd...@oz.be
  wrote:
 
   Hi,
  
  
  
   We are rewriting an old fat client application to a more elegant web
   application based on Wicket.  In the requirements they state that the
   users of the fat client application do all input with the right side of
   their keyboard and want to keep it that way.
  
  
  
   One special requirement is that navigating between fields should be
 done
   with the ' + ' symbol on the right hand keypad instead of the 'tab'
 key.
   When navigating between fields there is also happing validation on the
   server side, so an ajax call will be necessary.
  
  
  
   How would you do this in an elegant and generic way ?
  
  
  
   Joeri
  
  
  
  
  
  
  
  
 



508 ajaxdefaultdatatablepanel

2009-09-22 Thread tubin gen
I am using lot of ajaxdefaultdatatable and our application should be 508 ,
is there a way to create the sortable columns from this panel 508 ?
here the code I use to create a columns



new PropertyColumnWFStgAuditEntity(new ModelString(Audit
Number),stgAuditGeneral.auditNumber, stgAuditGeneral.auditNumber);


in this   PropertyColumn or any method inside I can override to add 508
description ?


form with inheritance

2009-09-22 Thread Sam Barrow

I am trying to create a form for a domain object called Shipment. A
Shipment contains a Payment object. Payment is an abstract class, with
subclasses CashPayment, CheckPayment, etc.

What would be the best way to create a form to represent this? I'm
assuming I will use some type tabs with panels for the different types.



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



Re: Is it the best way to code a Link depending on a condition

2009-09-22 Thread Jeremy Thomerson
It's the same reason you shouldn't use new Label(id
object.getSomeText());.  See this example:

public MyPage () {
  Person p = getPersonFromSomewhere();
  Label l = new Label(numberOfPhoneNumbers, p.getPhoneNumbers().size());
  l.setVisible(p.getPhoneNumbers().size()  0);
  new Link(addPhoneNumber) {
onClick() {
  p.addPhoneNumber(123-456-7890);
}
  }
}

When you add the phone number, it would not show up.  Not only would your
label not be able to get the new value for the size of the phone numbers,
but it would also not change it's visibility.  Why?  Because you statically
set both of those in the constructor.  They can't change unless you go to a
completely new instance of the page.  But clicking that link (or performing
some ajax operation) won't create a new page - they'll use the one you're
already on.

Synopsis: You should use models and override isVisible because they always
retrieve the latest information for every render.

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



On Tue, Sep 22, 2009 at 8:18 AM, Nicolas Melendez nmelen...@getsense.com.ar
 wrote:

 Jeremy:you say 2 - don't call setEnabled() - override isEnabled

 why is better override isEnable then setEnable?

 thanks NM

 On Mon, Sep 21, 2009 at 9:44 AM, cmoulliard cmoulli...@gmail.com wrote:

 
  Joseph,
 
  Can you explain a little bit what you mean by provide it with attribute
  (IModelString) ?
 
 private Label labelTitle;
 public static Label createLabelTitle(String title) {
  return new Label(title,new Model( title ));
 }
 
  -- becomes
 
 private Label labelTitle;
 public static Label createLabelTitle(String title) {
 return new Label(title,new PropertyModel( ModelClass,
 title
  ));
 }
 
  Is it right what I create ?
 
 
  Joseph Pachod wrote:
  
   cmoulliard wrote:
   What I have done to avoid to repeat the creation of the labels is to
   define
   and use static method
  
private Label labelTitle;
public static Label getLabelTitle(String title) {
return new Label(title,new Model( title ));
}
  
   I personally would name this method createLabelTitle(String title) or
   getNewLabelTitle(String title), for explicitness.
  
   Furthermore, I would directly provide it with a final IModelString
   title attribute, not to dictate how the data has to be provided
   (dynamic or not for example).
  
   In the end, this method is fine for just a label, but for anything more
   complex a panel would be the way to go I would say. The main exception
   here I see right now is the case of pages.
  
   For example, if we're speaking of a page title, then I would define it
   in my base page and make an abstract String getTitle() method in the
   base page so I'm sure everyone set it up later on. I would do the same
   if it's a specific kind of structured page, for example an abstract
   class ContentHoldingPage extend TheBasePage.
  
   ++
  
   -
   To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
   For additional commands, e-mail: users-h...@wicket.apache.org
  
  
  
 
 
  -
  Charles Moulliard
  SOA Architect
 
  My Blog :  http://cmoulliard.blogspot.com/
 http://cmoulliard.blogspot.com/
  --
  View this message in context:
 
 http://www.nabble.com/Is-it-the-best-way-to-code-a-Link-depending-on-a-condition-tp25488603p25530206.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: form with inheritance

2009-09-22 Thread Igor Vaynberg
http://wicketinaction.com/2008/10/creating-pluggable-applications-with-wicket-and-spring/

-igor

On Tue, Sep 22, 2009 at 12:16 PM, Sam Barrow s...@sambarrow.com wrote:

 I am trying to create a form for a domain object called Shipment. A
 Shipment contains a Payment object. Payment is an abstract class, with
 subclasses CashPayment, CheckPayment, etc.

 What would be the best way to create a form to represent this? I'm
 assuming I will use some type tabs with panels for the different types.



 -
 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



Validate refreshingview

2009-09-22 Thread Hakan . Steisjo

Hi,

I've a problem where I hope someone can point me in the right direction. I
have a page which holds a form, an ajaxsubmitlink, and a panel containing
formcomponents. The panel also holds two other panels, where one of the
panels holds a refreshingview to which the user can add items, using a
textfield in the same panel. Is there a way to add a validator to the panel
or refreshingview that in the validate phase can check that the user has
added atleast one item to the refreshingview?

I can make this check in the onSubmit function of the ajaxsubmitlink in the
page, but that causes problems in the second nested panel when the user has
failed to add an item. The submit then won't result in any database
activity and I've read somewhere that Wicket clones the modelobject on a
submit. This causes values entered in the second nested panel to disappear.

I hope someone can provide me with some help, thanks.

-Håkan


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



Re: Validate refreshingview

2009-09-22 Thread Igor Vaynberg
you can use embedded forms, afair onsubmit of an inner form is called
before onsubmit of outer.

-igor

On Tue, Sep 22, 2009 at 1:12 PM,  hakan.stei...@foxt.com wrote:

 Hi,

 I've a problem where I hope someone can point me in the right direction. I
 have a page which holds a form, an ajaxsubmitlink, and a panel containing
 formcomponents. The panel also holds two other panels, where one of the
 panels holds a refreshingview to which the user can add items, using a
 textfield in the same panel. Is there a way to add a validator to the panel
 or refreshingview that in the validate phase can check that the user has
 added atleast one item to the refreshingview?

 I can make this check in the onSubmit function of the ajaxsubmitlink in the
 page, but that causes problems in the second nested panel when the user has
 failed to add an item. The submit then won't result in any database
 activity and I've read somewhere that Wicket clones the modelobject on a
 submit. This causes values entered in the second nested panel to disappear.

 I hope someone can provide me with some help, thanks.

 -Håkan


 -
 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



Stateless Applications and Wicket

2009-09-22 Thread Ricardo Mayerhofer
It would be very nice to see better support for stateless applications 
in wicket. Some topics that come to my mind right now are:

- Ajax,
- PagingNavigator,
- Dropdown onSelectionChange. It works fine if I overide 
getStatelessHint to return true and there is no enclosing form. If there 
is a ancolsing form the following message appears: Attempt to access 
unknown request listener interface IOnChangeListener. Pehaps it could 
get fixed, and stateless hint always returns true for this one. May I 
open a Jira issue for this?


I know that many have said that if you are building this kind of 
application perhaps wicket is not for you. But IMO even considering that 
wicket was not initially built with this kind of problem in mind, he is 
better in this field than many frameworks out there. That's why we've 
choosen wicket to develop a high traffic stateless website, and he's 
doing well, except for some issues during development, like the points 
listed above. We are now using jquery as a complement to wicket, but 
surely it would be much easier if we could count on wicket ajax for example.


Ricardo

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