Re: Panel not updated on modelchange

2008-03-13 Thread deletethisprofile

Running Panel.detach from onselectionchanged in the radiogroup didn't help. 

It seems like the panels is updated, but labels in the panel is not. 
The labels are added like this: add(new Label(name, new
PropertyModel(getModelObject(), name)));

Ole-Harald




igor.vaynberg wrote:
 
 sounds like your model is not detachable or being cached somewhere
 
 perhaps you are loading the panel's model somewhere before it is
 updated. like panel { isvisible() { return getmodelobject().isempty();
 }
 
 try calling panel.detach() == which will also detach the panel's model
 
 -igor
 
 
 On Wed, Mar 12, 2008 at 10:29 AM, deletethisprofile
 [EMAIL PROTECTED] wrote:

  Non-ajax.

  Ole-Harald




  Eelco Hillenius wrote:
  
   Ajax or non-ajax?
  
   Eelco
  
   On Wed, Mar 12, 2008 at 9:40 AM, deletethisprofile
   [EMAIL PROTECTED] wrote:
  
Hi
  
I have a panel with an AbstractReadOnlyModel that i want to change
 when
   i
select an radiobutton on another panel. The radiobuttons are in a
   radiogroup
with a properymodel to the same object that I have in the
AbstractReadOnlyModel. But when I select the radiobuttons the
   modelobject is
changed but panel is not updated. I have have tried triggering an
   modeupdate
on the panel when when a radiobutten is selected but the panel is
 not
updated. If I go to another page on the selection of a radiobutton
 the
   panel
updates correctly, But I want i to update even the page dont change.
Any Ideas on how can I make that happend?
  
  
Ole-Harald
--
View this message in context:
  
 http://www.nabble.com/Panel-not-updated-on-modelchange-tp16007420p16007420.html
Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  

  --
  View this message in context:
 http://www.nabble.com/Panel-not-updated-on-modelchange-tp16007420p16009871.html


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


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


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

-- 
View this message in context: 
http://www.nabble.com/Panel-not-updated-on-modelchange-tp16007420p16023202.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



object sharing between pages

2008-03-13 Thread Frank van Lankvelt
Hi,

please excuse my newbie question; is it correct that pages cannot share
objects?  (any pointers on the subject of wickets serialization would be
greatly appreciated)

I want to provide some feedback to the main page from a modal-window,
and now do this by putting meta-data in the session.  Is there a cleaner
way to do this?

thanks, Frank

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



Re: London Wicket Training at Easter ... still 4 places left

2008-03-13 Thread jweekend

Thanks for the feedback and questions so far ... for immediate answers to
most course/training related questions, take a look at the 
http://jweekend.com/dev/Faq/ FAQ  as well. 

Regards - Cemal
http://jWeekend.co.uk jWeekend.co.uk 

Al and I are preparing for the London Wicket course coming up next week.
This  http://jweekend.com/dev/JW035/ 2 day intensive Wicket course  has
evolved very nicely since we delivered the very first one (to a single
student!, from Belgium) in 2007. Students on all our Wicket courses since
then have been very generous with their praise and many have been enquiring
about a follow-on course which we will consider developing for the summer if
there is enough interest ( http://jweekend.com/dev/ContactUsBody/ drop us a
line ).We have 4 places left for the course on Friday and Saturday next
week, so  http://jweekend.com/dev/BookingPage/ book early  if you would like
to join us for 2 days of intensive Wicket training.Our students also get a
MEAPs edition of Martijn

jweekend wrote:
 
 Al and I are preparing for the London Wicket course coming up next week. 
 This  http://jweekend.com/dev/JW035/ 2 day intensive Wicket course  has
 evolved very nicely since we delivered the very first one (to a single
 student!, from Belgium) in 2007. Students on all our Wicket courses since
 then have been very generous with their praise and many have been
 enquiring about a follow-on course which we will consider developing for
 the summer if there is enough interest (
 http://jweekend.com/dev/ContactUsBody/ drop us a line ).
 We have 4 places left for the course on Friday and Saturday next week, so 
 http://jweekend.com/dev/BookingPage/ book early  if you would like to join
 us for 2 days of intensive Wicket training.
 Our students also get a MEAPs edition of Martijn  Eelco's 
 http://manning.com/dashorst/ Wicket In Action  (which is now pretty
 complete and really complements the wiki etc well ...) courtesy of
 jWeekend. If you are travelling far (still some 80% of our students travel
 from abroad), we can also try to help you fix some suitable accommodation. 
 Regards - Cemal
  http://jWeekend.co.uk   http://jWeekend.co.uk 
 

-- 
View this message in context: 
http://www.nabble.com/London-Wicket-Training-at-Easter-...-still-4-places-left-tp16015858p16024482.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Adding javascript in html

2008-03-13 Thread Juha Alatalo

Hi,

we just started using version 1.3.2 and noticed that references to 
js-files without wicket:id doesn't work any more. They were working in 
1.3.1.


code:
wicket:head
script type=text/javascript 
src=/syncrontech/common/gate/component/GateConfirm.js/script

/wicket:head

log:
192.168.2.155 - st [13/Mar/2008:09:29:03 +] GET 
/wicket//syncrontech/common/gate/component/GateConfirm.js? HTTP/1.1 404 
1123


I know that we can (and probably should) start using for example 
CompressedResourceReference


new CompressedResourceReference(GateConfirmPanel.class, GateConfirm.js);
+
add(HeaderContributor.forJavaScript(GATE_CONFIRM_JS));

However is this a bug in 1.3.2?

- Juha


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



Re: object sharing between pages

2008-03-13 Thread Johan Compagner
the problem is that if you have 2 page that share the same object instance
and 1 of the pages get serialized and then deserialized
The object instance is not the same anymore

For example this still works:

Object A instance

PageA has that instance.

PageA creates PageB and passes that instance (and itself)
PageB is rendered
Action executed on PageB
PageB sets an internal variable on Object A
and then sets PageA as te response page.

This only works if the session is not replicated and the Action on B is
executed on a different machine.

But if somebody  goes from PageB to PageC and then uses the back button to
get to B and then executes the action
The shared instance is not shared anymore (just as session replication)

So the best thing is that you shouldnt depend on shared variablen.



On Thu, Mar 13, 2008 at 10:42 AM, Maurice Marrink [EMAIL PROTECTED] wrote:

 Why shouldn't pages share objects?
 pushing object x from page a to page b to modify x and then return to
 either the same or another instance of page a is just fine.
 You can also wrap object x in a model and use that same model on
 different pages / components.

 Maurice

 On Thu, Mar 13, 2008 at 10:14 AM, Frank van Lankvelt
 [EMAIL PROTECTED] wrote:
  Hi,
 
   please excuse my newbie question; is it correct that pages cannot share
   objects?  (any pointers on the subject of wickets serialization would
 be
   greatly appreciated)
 
   I want to provide some feedback to the main page from a modal-window,
   and now do this by putting meta-data in the session.  Is there a
 cleaner
   way to do this?
 
   thanks, Frank
 
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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




RE: StringResourceModel labels within values

2008-03-13 Thread i ii

thank you for help! which way is better? my own component or srm model that 
gets from localizer?

 Date: Wed, 12 Mar 2008 13:57:10 -0700
 From: [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Subject: Re: StringResourceModel labels within values
 
 but will that work recusively? :)
 
 -igor
 
 
 On Wed, Mar 12, 2008 at 1:44 PM, Johan Compagner [EMAIL PROTECTED] wrote:
  I think if you just give SRM a model that again gets the values from
   the localizer then it should work fine.
 
 
 
 
   On 3/12/08, i ii [EMAIL PROTECTED] wrote:
   
is there way to do something like:
   
.properties file:
   
some.label=Some Label
some.text=Some Text
some.key=This text will have ${some.label} and ${some.text}
   
 
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


Re: StringResourceModel labels within values

2008-03-13 Thread Johan Compagner
if you use again StringResourceModels in the model that you give to your
outer StringResourceModel :)

johan



On Wed, Mar 12, 2008 at 9:57 PM, Igor Vaynberg [EMAIL PROTECTED]
wrote:

 but will that work recusively? :)

 -igor


 On Wed, Mar 12, 2008 at 1:44 PM, Johan Compagner [EMAIL PROTECTED]
 wrote:
  I think if you just give SRM a model that again gets the values from
   the localizer then it should work fine.
 
 
 
 
   On 3/12/08, i ii [EMAIL PROTECTED] wrote:
   
is there way to do something like:
   
.properties file:
   
some.label=Some Label
some.text=Some Text
some.key=This text will have ${some.label} and ${some.text}
   
 
-
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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




PageParameter question

2008-03-13 Thread Thijs

I'm having troubles with pageparameters.

when I use Page.getPageParameters() they are always null untill I call 
super(paramters) in my constructor.

But when I then add a BookmarkablePageLink I get very strange behavior.
See the following example code:

   public HomePage(final PageParameters parameters) {
 super(parameters);
 ArrayList list = new ArrayList();
 list.add(aaa);
 list.add(bbb);
 list.add(ccc);
 list.add(ddd);
 add(new ListView(test, list ){
   protected void populateItem(ListItem item) {
 PageParameters p = item.getPage().getPageParameters();   // 
getPage().getPageParameters();

 if(p==null) p = new PageParameters();
 String key = (String)item.getModelObject();
 p.add(key, key);
 BookmarkablePageLink lnk = new BookmarkablePageLink(link, 
HomePage.class, p);
 item.add(lnk);
   }  
 });

   }

this results in a page that constructs links that look like:
li wicket:id=test
   a href=?key=aaa wicket:id=link test /a
/li
li wicket:id=test
   a href=?key=mp;key=bbb wicket:id=link  test  /a
/li
li wicket:id=test
   a href=?key=mp;key=bbbamp;key=ccc wicket:id=link  test /a
/li
li wicket:id=test
   a href=?key=mp;key=bbbamp;key=cccamp;key=ddd 
wicket:id=link  test   /a

/li

As you can see the pageparameters are added to the previously created 
pageparameters.
While I was expecting that every link had it's own key, and that when I 
click the link, the previous parameters would be added to the new link.
Debugging shows that for every loop over populateItem, 
getPage().getPageParameters() returns the newly created PageParameters 
instead of the current PageParameters.


Am I doing something wrong?

Thijs


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



Re: PageParameter question

2008-03-13 Thread Martijn Dashorst
Why don't you create a new PageParameters object in each populateItem?

Martijn

On 3/13/08, Thijs [EMAIL PROTECTED] wrote:
 I'm having troubles with pageparameters.

  when I use Page.getPageParameters() they are always null untill I call
  super(paramters) in my constructor.
  But when I then add a BookmarkablePageLink I get very strange behavior.
  See the following example code:

 public HomePage(final PageParameters parameters) {
   super(parameters);
   ArrayList list = new ArrayList();
   list.add(aaa);
   list.add(bbb);
   list.add(ccc);
   list.add(ddd);
   add(new ListView(test, list ){
 protected void populateItem(ListItem item) {
   PageParameters p = item.getPage().getPageParameters();   //
  getPage().getPageParameters();
   if(p==null) p = new PageParameters();
   String key = (String)item.getModelObject();
   p.add(key, key);
   BookmarkablePageLink lnk = new BookmarkablePageLink(link,
  HomePage.class, p);
   item.add(lnk);
 }
   });
 }

  this results in a page that constructs links that look like:
  li wicket:id=test
 a href=?key=aaa wicket:id=link test /a
  /li
  li wicket:id=test
 a href=?key=mp;key=bbb wicket:id=link  test  /a
  /li
  li wicket:id=test
 a href=?key=mp;key=bbbamp;key=ccc wicket:id=link  test /a
  /li
  li wicket:id=test
 a href=?key=mp;key=bbbamp;key=cccamp;key=ddd
  wicket:id=link  test   /a
  /li

  As you can see the pageparameters are added to the previously created
  pageparameters.
  While I was expecting that every link had it's own key, and that when I
  click the link, the previous parameters would be added to the new link.
  Debugging shows that for every loop over populateItem,
  getPage().getPageParameters() returns the newly created PageParameters
  instead of the current PageParameters.

  Am I doing something wrong?

  Thijs


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




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

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



Re: StringResourceModel labels within values

2008-03-13 Thread Sebastiaan van Erk
At one point I wanted to do interpolation in constant strings, so I just 
used the property interpolator directly:


PropertyVariableInterpolator.interpolate(value, modelObject);

You can use that to build a model that recursively interpolates until 
there are no more ${...} occurrences in the value.


Regards,
Sebastiaan

i ii wrote:

thank you for help! which way is better? my own component or srm model that 
gets from localizer?


Date: Wed, 12 Mar 2008 13:57:10 -0700
From: [EMAIL PROTECTED]
To: users@wicket.apache.org
Subject: Re: StringResourceModel labels within values

but will that work recusively? :)

-igor


On Wed, Mar 12, 2008 at 1:44 PM, Johan Compagner [EMAIL PROTECTED] wrote:

I think if you just give SRM a model that again gets the values from
 the localizer then it should work fine.




 On 3/12/08, i ii [EMAIL PROTECTED] wrote:
 
  is there way to do something like:
 
  .properties file:
 
  some.label=Some Label
  some.text=Some Text
  some.key=This text will have ${some.label} and ${some.text}
 

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



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





smime.p7s
Description: S/MIME Cryptographic Signature


Re: object sharing between pages

2008-03-13 Thread Sebastiaan van Erk

Maurice Marrink wrote:

Assuming B has a reference to Page A, wont A be Serialized with B,
when you go to C, and both still share the same serialized object?


When B is serialized, so is A, and serialization makes sure the 
instances to your object are kept shared


But when A is serialized alone (and if A does not have a reference to 
B), then when A is deserialized you'll have a copy of the instance you 
gave to B and the reference is no longer shared.



 So the best thing is that you shouldnt depend on shared variablen.


Ok so there are a lot of gotchas :)


Yep!


Maurice

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



smime.p7s
Description: S/MIME Cryptographic Signature


Re: PageParameter question

2008-03-13 Thread Thijs


because I want to use the already existing parameters and add them to 
the link.


Thijs

Martijn Dashorst schreef:

Why don't you create a new PageParameters object in each populateItem?

Martijn

On 3/13/08, Thijs [EMAIL PROTECTED] wrote:
  

I'm having troubles with pageparameters.

 when I use Page.getPageParameters() they are always null untill I call
 super(paramters) in my constructor.
 But when I then add a BookmarkablePageLink I get very strange behavior.
 See the following example code:

public HomePage(final PageParameters parameters) {
  super(parameters);
  ArrayList list = new ArrayList();
  list.add(aaa);
  list.add(bbb);
  list.add(ccc);
  list.add(ddd);
  add(new ListView(test, list ){
protected void populateItem(ListItem item) {
  PageParameters p = item.getPage().getPageParameters();   //
 getPage().getPageParameters();
  if(p==null) p = new PageParameters();
  String key = (String)item.getModelObject();
  p.add(key, key);
  BookmarkablePageLink lnk = new BookmarkablePageLink(link,
 HomePage.class, p);
  item.add(lnk);
}
  });
}

 this results in a page that constructs links that look like:
 li wicket:id=test
a href=?key=aaa wicket:id=link test /a
 /li
 li wicket:id=test
a href=?key=mp;key=bbb wicket:id=link  test  /a
 /li
 li wicket:id=test
a href=?key=mp;key=bbbamp;key=ccc wicket:id=link  test /a
 /li
 li wicket:id=test
a href=?key=mp;key=bbbamp;key=cccamp;key=ddd
 wicket:id=link  test   /a
 /li

 As you can see the pageparameters are added to the previously created
 pageparameters.
 While I was expecting that every link had it's own key, and that when I
 click the link, the previous parameters would be added to the new link.
 Debugging shows that for every loop over populateItem,
 getPage().getPageParameters() returns the newly created PageParameters
 instead of the current PageParameters.

 Am I doing something wrong?

 Thijs


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






  



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



Re: IntelliJ WicketForge issue: NPE when trying to use New Wicket Page to create both Java and markup

2008-03-13 Thread Kurt R. Hoehn
That can happen if the html directory is different then the source
directory and the html directory has not been created yet. 

-kurt

On Tue, 2008-03-11 at 08:25 -0500, Nick Heudecker wrote:
 I'll dig into it today.  Thanks for the report.
 
 On Tue, Mar 11, 2008 at 6:40 AM, Kevin Murphy [EMAIL PROTECTED]
 wrote:
 
  This is not a high-priority issue, but it seems that it should be pretty
  trivial for the maintainer to fix.
 
  What steps will reproduce the problem?
 
  1. Add New Wicket Page to Project View Popup Menu via Customizations
  2. Right-click on a folder containing Wicket source files, and choose
  New/New Wicket Page
  3. Check Create associated markup file
  4. Click OK
  5. NPE error
 
  What is the expected output? What do you see instead?
 
  The Java file is created.  The HTML file is not.
 
  What version of the product are you using? On what operating system?
 
  WicketForge 0.3.1 with IntelliJ IDEA 7.0.3
 
 
  Regards,
  Kevin
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 


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



Re: PageParameter question

2008-03-13 Thread Martijn Dashorst
So why don't you expect the loop to add them to the existing parameters?

Martijn

On 3/13/08, Thijs [EMAIL PROTECTED] wrote:

  because I want to use the already existing parameters and add them to
  the link.

  Thijs

  Martijn Dashorst schreef:

  Why don't you create a new PageParameters object in each populateItem?
  
   Martijn
  
   On 3/13/08, Thijs [EMAIL PROTECTED] wrote:
  
   I'm having troubles with pageparameters.
  
when I use Page.getPageParameters() they are always null untill I call
super(paramters) in my constructor.
But when I then add a BookmarkablePageLink I get very strange behavior.
See the following example code:
  
   public HomePage(final PageParameters parameters) {
 super(parameters);
 ArrayList list = new ArrayList();
 list.add(aaa);
 list.add(bbb);
 list.add(ccc);
 list.add(ddd);
 add(new ListView(test, list ){
   protected void populateItem(ListItem item) {
 PageParameters p = item.getPage().getPageParameters();   //
getPage().getPageParameters();
 if(p==null) p = new PageParameters();
 String key = (String)item.getModelObject();
 p.add(key, key);
 BookmarkablePageLink lnk = new BookmarkablePageLink(link,
HomePage.class, p);
 item.add(lnk);
   }
 });
   }
  
this results in a page that constructs links that look like:
li wicket:id=test
   a href=?key=aaa wicket:id=link test /a
/li
li wicket:id=test
   a href=?key=mp;key=bbb wicket:id=link  test  /a
/li
li wicket:id=test
   a href=?key=mp;key=bbbamp;key=ccc wicket:id=link  test 
 /a
/li
li wicket:id=test
   a href=?key=mp;key=bbbamp;key=cccamp;key=ddd
wicket:id=link  test   /a
/li
  
As you can see the pageparameters are added to the previously created
pageparameters.
While I was expecting that every link had it's own key, and that when I
click the link, the previous parameters would be added to the new link.
Debugging shows that for every loop over populateItem,
getPage().getPageParameters() returns the newly created PageParameters
instead of the current PageParameters.
  
Am I doing something wrong?
  
Thijs
  
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
  
  
  


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




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

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



RE: StringResourceModel labels within values

2008-03-13 Thread i ii

how will this work with example i gave? i'm not sure how to get some.label and 
some.text back into some.key? would i use something like 

StringResourceModel srm = new StringResourceModel(some.key, this, null);
PropertyVariableInterpolator.interpolate(some.label, srm);

not sure that works :(

 Date: Thu, 13 Mar 2008 12:17:09 +0100
 From: [EMAIL PROTECTED]
 To: users@wicket.apache.org
 Subject: Re: StringResourceModel labels within values
 
 At one point I wanted to do interpolation in constant strings, so I just 
 used the property interpolator directly:
 
 PropertyVariableInterpolator.interpolate(value, modelObject);
 
 You can use that to build a model that recursively interpolates until 
 there are no more ${...} occurrences in the value.
 
 Regards,
 Sebastiaan
 
 i ii wrote:
  thank you for help! which way is better? my own component or srm model that 
  gets from localizer?
  
  Date: Wed, 12 Mar 2008 13:57:10 -0700
  From: [EMAIL PROTECTED]
  To: users@wicket.apache.org
  Subject: Re: StringResourceModel labels within values
 
  but will that work recusively? :)
 
  -igor
 
 
  On Wed, Mar 12, 2008 at 1:44 PM, Johan Compagner [EMAIL PROTECTED] wrote:
  I think if you just give SRM a model that again gets the values from
   the localizer then it should work fine.
 
 
 
 
   On 3/12/08, i ii [EMAIL PROTECTED] wrote:
   
is there way to do something like:
   
.properties file:
   
some.label=Some Label
some.text=Some Text
some.key=This text will have ${some.label} and ${some.text}
   
 
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
  


Re: object sharing between pages

2008-03-13 Thread Frank van Lankvelt
  Assuming B has a reference to Page A, wont A be Serialized with B,
  when you go to C, and both still share the same serialized object?
 When B is serialized, so is A, and serialization makes sure the 
 instances to your object are kept shared
 
how can this be?  Aren't different pages written to different streams
and thereby incapable of sharing objects?

 But when A is serialized alone (and if A does not have a reference to 
 B), then when A is deserialized you'll have a copy of the instance you 
 gave to B and the reference is no longer shared.
 
   So the best thing is that you shouldnt depend on shared variablen.
  
  Ok so there are a lot of gotchas :)
 
 Yep!
 
ok, I'll go ahead with storing the object in the session directly (as
meta-data) and use models in the pages to access this object.

cheers, Frank

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

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



Re: Customising Radio Buttons with JS and CSS

2008-03-13 Thread richardwilko

Instead of using RadioChoice use a RadioGroup, i think there are examples
here: http://wicketstuff.org/wicket13/forminput/

This allows you to customise the ui of your radio's much more than a
RadioGroup does and should aid you in your jazziness

Richard


Ballist1c wrote:
 
 Hey guys,
 
 I got a funky idea for the UI.
 
 I have a form that consists of set static radio choices and I am looking
 to add a bit of zing with it.
 
 Rather than having the radio button with text, i want to jazz it up with
 having a 100x100px tile with an image on it representing each of the radio
 choices. The functionality i want to capture is only one option can be
 selected at any one time, so clicking on another tile will de-select what
 is currently selected and select the new tile.
 
 I am a bit stuck with this one, I am attempting to re-write the radio
 choice object but im not having much luck with that so far.
 

-- 
View this message in context: 
http://www.nabble.com/Customising-Radio-Buttons-with-JS-and-CSS-tp16015072p16024767.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: object sharing between pages

2008-03-13 Thread Sebastiaan van Erk

Sebastiaan van Erk wrote:

Maurice Marrink wrote:

Assuming B has a reference to Page A, wont A be Serialized with B,
when you go to C, and both still share the same serialized object?


When B is serialized, so is A, and serialization makes sure the 
instances to your object are kept shared


 But when A is serialized alone (and if A does not have a reference to
 B), then when A is deserialized you'll have a copy of the instance you
 gave to B and the reference is no longer shared.

Actually, that's how serialization would NORMALLY work. :-) I'm not 
really 100% sure how Wicket serialization works (I believe a referenced 
page is not serialized inline, but instead a page id is written, which 
could mean you always get copies of your instances on deserialize, but 
then again I'm not sure).


In either case, even with standard serialization you would have 
issues... But to be honest I've never really run into this issue with 
Wicket at all... When do you have *instance* variables in a page that 
point to shared objects which are not immutable? I hardly have any 
instance variables (other than maybe a few Components and Spring beans).


Regards,
Sebastiaan



 So the best thing is that you shouldnt depend on shared variablen.


Ok so there are a lot of gotchas :)


Yep!


Maurice

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



smime.p7s
Description: S/MIME Cryptographic Signature


Re: object sharing between pages

2008-03-13 Thread Sebastiaan van Erk

Frank van Lankvelt wrote:

Assuming B has a reference to Page A, wont A be Serialized with B,
when you go to C, and both still share the same serialized object?
When B is serialized, so is A, and serialization makes sure the 
instances to your object are kept shared



how can this be?  Aren't different pages written to different streams
and thereby incapable of sharing objects?


Yes, I believe you are correct.

But when A is serialized alone (and if A does not have a reference to 
B), then when A is deserialized you'll have a copy of the instance you 
gave to B and the reference is no longer shared.



 So the best thing is that you shouldnt depend on shared variablen.

Ok so there are a lot of gotchas :)

Yep!


ok, I'll go ahead with storing the object in the session directly (as
meta-data) and use models in the pages to access this object.


May I ask what your use case is?

Regards,
Sebastiaan


cheers, Frank


Maurice

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



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



smime.p7s
Description: S/MIME Cryptographic Signature


Re: object sharing between pages

2008-03-13 Thread Johan Compagner
yes Pages are not  serialized in 1 go
They are seperated from each other and saved as there own entity
thats why you have that shared instance problem

On Thu, Mar 13, 2008 at 12:40 PM, Sebastiaan van Erk [EMAIL PROTECTED]
wrote:

 Sebastiaan van Erk wrote:
  Maurice Marrink wrote:
  Assuming B has a reference to Page A, wont A be Serialized with B,
  when you go to C, and both still share the same serialized object?
 
  When B is serialized, so is A, and serialization makes sure the
  instances to your object are kept shared

   But when A is serialized alone (and if A does not have a reference to
   B), then when A is deserialized you'll have a copy of the instance you
   gave to B and the reference is no longer shared.

 Actually, that's how serialization would NORMALLY work. :-) I'm not
 really 100% sure how Wicket serialization works (I believe a referenced
 page is not serialized inline, but instead a page id is written, which
 could mean you always get copies of your instances on deserialize, but
 then again I'm not sure).

 In either case, even with standard serialization you would have
 issues... But to be honest I've never really run into this issue with
 Wicket at all... When do you have *instance* variables in a page that
 point to shared objects which are not immutable? I hardly have any
 instance variables (other than maybe a few Components and Spring beans).

 Regards,
 Sebastiaan


   So the best thing is that you shouldnt depend on shared variablen.
 
  Ok so there are a lot of gotchas :)
 
  Yep!
 
  Maurice
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: PageParameter question

2008-03-13 Thread Thijs

Sorry I'm not sure I follow.
What I'm trying is to add a new PageParameter to the set that the 
current page is created with. So I get the Page, get it's pageParameters 
and add a new one to the existing set and feed that to the 
bookmarkablepagelink.


If I would do:

protected void populateItem(ListItem item) {
 PageParameters p = new PageParameters();
 String key = (String)item.getModelObject();
 p.add(key, key);
 BookmarkablePageLink lnk = new BookmarkablePageLink(link, HomePage.class, p);
 item.add(lnk);
}


the bookmarkablepagelink would only contain the new pageparameter, not 
the already existing pageparameters


What happens now is that getPage().getPageParameters is not returning 
the PageParameters from the current page, but is returning the 
pageparameters I just added to the bookmarkablepagelink + the ones that 
are already in getPage().getPageParameters.


So if you take the example below, and say I have clicked on the first 
link. The output of HTML would then look like:


li wicket:id=test
a href=?key=mp;key=aaa wicket:id=linktest/a
/li
li wicket:id=test
a href=?key=mp;key=mp;key=bbb wicket:id=linktest/a
/li
li wicket:id=test
 a href=?key=mp;key=mp;key=bbbamp;key=ccc 
wicket:id=linktest/a
/li
li wicket:id=test
 a href=?key=mp;key=mp;key=bbbamp;key=cccamp;key=ddd 
wicket:id=linktest/a
/li

While I expect:

li wicket:id=test
a href=?key=mp;key=aaa wicket:id=linktest/a
/li
li wicket:id=test
a href=?key=mp;key=bbb wicket:id=linktest/a
/li
li wicket:id=test
a href=?key=mp;key=ccc wicket:id=linktest/a
/li
li wicket:id=test
a href=?key=mp;key=ddd wicket:id=linktest/a
/li

Thijs

Martijn Dashorst schreef:

So why don't you expect the loop to add them to the existing parameters?

Martijn

On 3/13/08, Thijs [EMAIL PROTECTED] wrote:
  

 because I want to use the already existing parameters and add them to
 the link.

 Thijs

 Martijn Dashorst schreef:



Why don't you create a new PageParameters object in each populateItem?
  

 
  Martijn
 
  On 3/13/08, Thijs [EMAIL PROTECTED] wrote:
 
  I'm having troubles with pageparameters.
 
   when I use Page.getPageParameters() they are always null untill I call
   super(paramters) in my constructor.
   But when I then add a BookmarkablePageLink I get very strange behavior.
   See the following example code:
 
  public HomePage(final PageParameters parameters) {
super(parameters);
ArrayList list = new ArrayList();
list.add(aaa);
list.add(bbb);
list.add(ccc);
list.add(ddd);
add(new ListView(test, list ){
  protected void populateItem(ListItem item) {
PageParameters p = item.getPage().getPageParameters();   //
   getPage().getPageParameters();
if(p==null) p = new PageParameters();
String key = (String)item.getModelObject();
p.add(key, key);
BookmarkablePageLink lnk = new BookmarkablePageLink(link,
   HomePage.class, p);
item.add(lnk);
  }
});
  }
 
   this results in a page that constructs links that look like:
   li wicket:id=test
  a href=?key=aaa wicket:id=link test /a
   /li
   li wicket:id=test
  a href=?key=mp;key=bbb wicket:id=link  test  /a
   /li
   li wicket:id=test
  a href=?key=mp;key=bbbamp;key=ccc wicket:id=link  test /a
   /li
   li wicket:id=test
  a href=?key=mp;key=bbbamp;key=cccamp;key=ddd
   wicket:id=link  test   /a
   /li
 
   As you can see the pageparameters are added to the previously created
   pageparameters.
   While I was expecting that every link had it's own key, and that when I
   click the link, the previous parameters would be added to the new link.
   Debugging shows that for every loop over populateItem,
   getPage().getPageParameters() returns the newly created PageParameters
   instead of the current PageParameters.
 
   Am I doing something wrong?
 
   Thijs
 
 
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 


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






  



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



Re: PageParameter question

2008-03-13 Thread Martijn Dashorst
You keep adding your new parameters to the parameters from the page.
Not a new page parameters object.

You should do something like:

PageParameters p = new PageParameters(getPage().getPageParameters());
p.add(key, value);

Martijn

On 3/13/08, Thijs [EMAIL PROTECTED] wrote:
 Sorry I'm not sure I follow.
  What I'm trying is to add a new PageParameter to the set that the
  current page is created with. So I get the Page, get it's pageParameters
  and add a new one to the existing set and feed that to the
  bookmarkablepagelink.

  If I would do:


  protected void populateItem(ListItem item) {

   PageParameters p = new PageParameters();

   String key = (String)item.getModelObject();
   p.add(key, key);
   BookmarkablePageLink lnk = new BookmarkablePageLink(link, HomePage.class, 
 p);
   item.add(lnk);
  }



 the bookmarkablepagelink would only contain the new pageparameter, not
  the already existing pageparameters

  What happens now is that getPage().getPageParameters is not returning
  the PageParameters from the current page, but is returning the
  pageparameters I just added to the bookmarkablepagelink + the ones that
  are already in getPage().getPageParameters.

  So if you take the example below, and say I have clicked on the first
  link. The output of HTML would then look like:

  li wicket:id=test
   a href=?key=mp;key=aaa wicket:id=linktest/a

 /li
  li wicket:id=test

  a href=?key=mp;key=mp;key=bbb wicket:id=linktest/a

 /li
  li wicket:id=test

   a href=?key=mp;key=mp;key=bbbamp;key=ccc 
 wicket:id=linktest/a

 /li
  li wicket:id=test

   a href=?key=mp;key=mp;key=bbbamp;key=cccamp;key=ddd 
 wicket:id=linktest/a
  /li

  While I expect:

  li wicket:id=test
   a href=?key=mp;key=aaa wicket:id=linktest/a

 /li
  li wicket:id=test
   a href=?key=mp;key=bbb wicket:id=linktest/a
  /li
  li wicket:id=test

  a href=?key=mp;key=ccc wicket:id=linktest/a

 /li
  li wicket:id=test

  a href=?key=mp;key=ddd wicket:id=linktest/a
  /li

  Thijs

  Martijn Dashorst schreef:

  So why don't you expect the loop to add them to the existing parameters?
  
   Martijn
  
   On 3/13/08, Thijs [EMAIL PROTECTED] wrote:
  
because I want to use the already existing parameters and add them to
the link.
  
Thijs
  
Martijn Dashorst schreef:
  
  
   Why don't you create a new PageParameters object in each populateItem?
  

 Martijn

 On 3/13/08, Thijs [EMAIL PROTECTED] wrote:

 I'm having troubles with pageparameters.

  when I use Page.getPageParameters() they are always null untill I 
 call
  super(paramters) in my constructor.
  But when I then add a BookmarkablePageLink I get very strange 
 behavior.
  See the following example code:

 public HomePage(final PageParameters parameters) {
   super(parameters);
   ArrayList list = new ArrayList();
   list.add(aaa);
   list.add(bbb);
   list.add(ccc);
   list.add(ddd);
   add(new ListView(test, list ){
 protected void populateItem(ListItem item) {
   PageParameters p = item.getPage().getPageParameters();   //
  getPage().getPageParameters();
   if(p==null) p = new PageParameters();
   String key = (String)item.getModelObject();
   p.add(key, key);
   BookmarkablePageLink lnk = new BookmarkablePageLink(link,
  HomePage.class, p);
   item.add(lnk);
 }
   });
 }

  this results in a page that constructs links that look like:
  li wicket:id=test
 a href=?key=aaa wicket:id=link test /a
  /li
  li wicket:id=test
 a href=?key=mp;key=bbb wicket:id=link  test  /a
  /li
  li wicket:id=test
 a href=?key=mp;key=bbbamp;key=ccc wicket:id=link  
 test /a
  /li
  li wicket:id=test
 a href=?key=mp;key=bbbamp;key=cccamp;key=ddd
  wicket:id=link  test   /a
  /li

  As you can see the pageparameters are added to the previously created
  pageparameters.
  While I was expecting that every link had it's own key, and that 
 when I
  click the link, the previous parameters would be added to the new 
 link.
  Debugging shows that for every loop over populateItem,
  getPage().getPageParameters() returns the newly created 
 PageParameters
  instead of the current PageParameters.

  Am I doing something wrong?

  Thijs


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






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


  

Re: object sharing between pages

2008-03-13 Thread Frank van Lankvelt
  ok, I'll go ahead with storing the object in the session directly (as
  meta-data) and use models in the pages to access this object.
 May I ask what your use case is?
 
it's very simple; when carrying out an action on page A, I want to
display a modal window (are you sure? with ok/cancel).  The modal
window creates a separate page, B, with the label and the buttons.

The information (a boolean) about what option was chosen determines what
to do on page A when the modal window is closed.

cheers, Frank

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



Re: PageParameter question

2008-03-13 Thread Thijs

Stupid, I should have known that :'(

Thanks Martijn

Martijn Dashorst schreef:

You keep adding your new parameters to the parameters from the page.
Not a new page parameters object.

You should do something like:

PageParameters p = new PageParameters(getPage().getPageParameters());
p.add(key, value);

Martijn

On 3/13/08, Thijs [EMAIL PROTECTED] wrote:
  

Sorry I'm not sure I follow.
 What I'm trying is to add a new PageParameter to the set that the
 current page is created with. So I get the Page, get it's pageParameters
 and add a new one to the existing set and feed that to the
 bookmarkablepagelink.

 If I would do:


 protected void populateItem(ListItem item) {

  PageParameters p = new PageParameters();

  String key = (String)item.getModelObject();
  p.add(key, key);
  BookmarkablePageLink lnk = new BookmarkablePageLink(link, HomePage.class, 
p);
  item.add(lnk);
 }



the bookmarkablepagelink would only contain the new pageparameter, not
 the already existing pageparameters

 What happens now is that getPage().getPageParameters is not returning
 the PageParameters from the current page, but is returning the
 pageparameters I just added to the bookmarkablepagelink + the ones that
 are already in getPage().getPageParameters.

 So if you take the example below, and say I have clicked on the first
 link. The output of HTML would then look like:

 li wicket:id=test
  a href=?key=mp;key=aaa wicket:id=linktest/a

/li
 li wicket:id=test

 a href=?key=mp;key=mp;key=bbb wicket:id=linktest/a

/li
 li wicket:id=test

  a href=?key=mp;key=mp;key=bbbamp;key=ccc 
wicket:id=linktest/a

/li
 li wicket:id=test

  a href=?key=mp;key=mp;key=bbbamp;key=cccamp;key=ddd 
wicket:id=linktest/a
 /li

 While I expect:

 li wicket:id=test
  a href=?key=mp;key=aaa wicket:id=linktest/a

/li
 li wicket:id=test
  a href=?key=mp;key=bbb wicket:id=linktest/a
 /li
 li wicket:id=test

 a href=?key=mp;key=ccc wicket:id=linktest/a

/li
 li wicket:id=test

 a href=?key=mp;key=ddd wicket:id=linktest/a
 /li

 Thijs

 Martijn Dashorst schreef:



So why don't you expect the loop to add them to the existing parameters?
  

 
  Martijn
 
  On 3/13/08, Thijs [EMAIL PROTECTED] wrote:
 
   because I want to use the already existing parameters and add them to
   the link.
 
   Thijs
 
   Martijn Dashorst schreef:
 
 
  Why don't you create a new PageParameters object in each populateItem?
 
   
Martijn
   
On 3/13/08, Thijs [EMAIL PROTECTED] wrote:
   
I'm having troubles with pageparameters.
   
 when I use Page.getPageParameters() they are always null untill I call
 super(paramters) in my constructor.
 But when I then add a BookmarkablePageLink I get very strange behavior.
 See the following example code:
   
public HomePage(final PageParameters parameters) {
  super(parameters);
  ArrayList list = new ArrayList();
  list.add(aaa);
  list.add(bbb);
  list.add(ccc);
  list.add(ddd);
  add(new ListView(test, list ){
protected void populateItem(ListItem item) {
  PageParameters p = item.getPage().getPageParameters();   //
 getPage().getPageParameters();
  if(p==null) p = new PageParameters();
  String key = (String)item.getModelObject();
  p.add(key, key);
  BookmarkablePageLink lnk = new BookmarkablePageLink(link,
 HomePage.class, p);
  item.add(lnk);
}
  });
}
   
 this results in a page that constructs links that look like:
 li wicket:id=test
a href=?key=aaa wicket:id=link test /a
 /li
 li wicket:id=test
a href=?key=mp;key=bbb wicket:id=link  test  /a
 /li
 li wicket:id=test
a href=?key=mp;key=bbbamp;key=ccc wicket:id=link  test 
/a
 /li
 li wicket:id=test
a href=?key=mp;key=bbbamp;key=cccamp;key=ddd
 wicket:id=link  test   /a
 /li
   
 As you can see the pageparameters are added to the previously created
 pageparameters.
 While I was expecting that every link had it's own key, and that when I
 click the link, the previous parameters would be added to the new link.
 Debugging shows that for every loop over populateItem,
 getPage().getPageParameters() returns the newly created PageParameters
 instead of the current PageParameters.
   
 Am I doing something wrong?
   
 Thijs
   
   
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
   
   
   
   
   
   
 
 
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 
 


 -
 To unsubscribe, e-mail: 

Re: object sharing between pages

2008-03-13 Thread Sebastiaan van Erk

Frank van Lankvelt wrote:

ok, I'll go ahead with storing the object in the session directly (as
meta-data) and use models in the pages to access this object.

May I ask what your use case is?


it's very simple; when carrying out an action on page A, I want to
display a modal window (are you sure? with ok/cancel).  The modal
window creates a separate page, B, with the label and the buttons.

The information (a boolean) about what option was chosen determines what
to do on page A when the modal window is closed.

cheers, Frank


Ok, that definitely seems like something you should *not* be using the 
session for. I'd think that's what you normally use a callback for, but 
unfortunately I don't know how in Wicket (not without using shared 
state), because for example, the onClose() method does not pass you the 
contents of the ModalWindow...


I mean, you could do something like this if the contents were given back 
to you:


modal1.setWindowClosedCallback(new ModalWindow.WindowClosedCallback()
{
// Hypothetical callback with extra contents argument...
public void onClose(Component modalWindowPage, 
AjaxRequestTarget target)

{
boolean myBoolean = myModalWindowPage.getResult();
// do whatever with the result...
target.addComponent(result);
}
});

When I look at the Wicket examples for ModalWindow there is actually 
shared state passed between pages (i.e., the page with the modal window 
is passed as a parameter to the page IN the modal window). The modal 
window page then calls methods (setResult(...)) to change the state on 
the page that opened the modal window


I'm wondering now if this is safe in combination with serialization, if 
so, why, and if not, what is the proper way to do this, because via the 
session is awful.


Regards,
Sebastiaan



smime.p7s
Description: S/MIME Cryptographic Signature


Page redirect behavior

2008-03-13 Thread jnorris

Hi All,

I have different behavior when using a RedirectPage which I'm trying to
understand.  I have a web page which has a Tree.  In one case when a tree
node is clicked, in the onNodeClicked() method this.setResponsePage( new
RedirectPage( http.)) is called and the URL opens in the same browser
window.  In another case the tree node click makes visible a panel which has
a form for some input parameters and a Link used for the redirect.  In that
panel in the onClick() method for the link this.setResponsePage( new
RedirectPage( http ...)) is called and the URL is opened in a new browser
window which is what I want to happen in both cases.

Does anyone know why the first case opens the URL in the same browser window
but the second case opens the URL in a new window?  Or is there a better way
to have the URL opened in an new window?

Thanks,
Jim
-- 
View this message in context: 
http://www.nabble.com/Page-redirect-behavior-tp16024984p16024984.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Ajax CheckGroup problem exception: java.lang.IllegalStateException: No Page found for component

2008-03-13 Thread Johan Compagner
you can't hold reference tocheckboxes.add(checkbox); like that
Because onPopulate() can be called again when you refresh the page and then
you get a new set

You can use a reusestrategy for that but still
If you want to set states then you should set states on your model object
that the checkboxes have



On Wed, Mar 12, 2008 at 1:18 PM, Eyal Golan [EMAIL PROTECTED] wrote:

 Hi,
 I made a select-all check box inside a table.
 I used the example from

 http://javathoughts.capesugarbird.com/2007/09/ajax-select-all-checkbox-for-wicket.html
 It works well in most cases.

 Here's some code:

 Adding the checkgroup to the panel:
private void addCheckGroup() {
checkGroup = new MyAjaxCheckBox(allChecked, new
 PropertyModel(this, allChecked)) {
private static final long serialVersionUID = 1L;

@Override
protected void onUpdate(AjaxRequestTarget target) {
final boolean isSelected = isChecked();
if (isSelected) {
checkGroupModel.addAll(entitiesList);
} else {
checkGroupModel.clear();
}
for (MyAjaxCheckBox check : checkboxes) {
check.setOutputMarkupId(true);
target.addComponent(check);
}
for (EntityWrapper entity : entitiesList) {
entity.setSelect(isSelected);
}
 //target.addComponent(EntitiesPanel.this);
EntitiesPanel.this.onUpdate(target);
}
@Override
public boolean isVisible() {
return (withSelect  entitiesList != null 
 entitiesList.size()  0);
}
};
checkGroup.setOutputMarkupId(true);
 //checkGroup.setVisible(false);
add(checkGroup);
}

 The Checkbox column inside the table, and the fragment it uses:
private AbstractColumn createCheckboxColumn() {
AbstractColumn p = new AbstractColumn(new Model()) {
private static final long serialVersionUID = 1L;

public void populateItem(Item cellItem, String componentId,
 IModel rowModel) {
EntityWrapper confEntity = (EntityWrapper)
 rowModel.getObject();
Fragment frag = new CheckboxEntityFrag(componentId,
 checkboxFrag,
EntitiesPanel.this, confEntity);
cellItem.add(frag);
}
};
return p;
}

private CheckboxEntityFrag(String id, String markupId,
 MarkupContainer markupProvider,
final EntityWrapper value) {
super(id, markupId, markupProvider);
checkbox = new MyAjaxCheckBox(entityCheckbox, new
 PropertyModel(value, select)) {
private static final long serialVersionUID = 1L;

@Override
protected void onUpdate(AjaxRequestTarget target) {
if (isChecked()) {
if (!checkGroupModel.contains(value))
checkGroupModel.add(value);
} else {
checkGroupModel.remove(value);
}
setAllChecked(checkGroupModel.size() ==
 entitiesList.size());
checkGroup.setOutputMarkupId(true);
target.addComponent(checkGroup);
EntitiesPanel.this.onUpdate(target);
}
};
add(checkbox);
checkboxes.add(checkbox);
}
}

 The problem:
 someone else uses my panel for his purposes.
 He has a page (search page) that has my panel (with the table and the
 checkboxes).
 His page has a navigation button - NEXT that uses setResponsePage.
 The next page has a PREV button to go back.
 Going back is also with setResponsePage WITH THE ORIGINAL one.

 The scenario:
 Open the search page (with my panel) - the 'select-all' work fine.
 Press next.
 Press back.

 Press the 'select-all' again.
 I get an exception: java.lang.IllegalStateException: No Page found for
 component [MarkupContainer [Component id = entityCheckbox, page = No
 Page,
 path = 1:cells:1:cell:entityCheckbox.EntitiesPanel$CheckboxEntityFrag$1]]

 Is there something in a page's component's life cycle that I'm missing?

 Hope it's clear.

 (I'll be away for a few days so bare with me if I'm not answering)

 Thanks
 --
 Eyal Golan
 [EMAIL PROTECTED]

 Visit: http://jvdrums.sourceforge.net/



Re: StringResourceModel labels within values

2008-03-13 Thread Sebastiaan van Erk

How's this:

public class RecursiveStringResourceModel extends AbstractReadOnlyModel {

private final String resourceKey;

private final Component component;

	public RecursiveStringResourceModel(final String resourceKey, final 
Component component) {

this.resourceKey = resourceKey;
this.component = component;
}

@Override
public Object getObject() {
		return new StringResourceModel(resourceKey, component, new 
CompoundPropertyModel(new AbstractMap() {

@Override
public Object get(Object key) {
return new RecursiveStringResourceModel((String) key, 
component).getObject();

}

@Override
public Setjava.util.Map.EntryString, String 
entrySet() {
return null;
}
})).getObject();
}

}

I'm sure it can be done more efficiently (i.e., less model creation), 
but hey, it works! ;-)


Regards,
Sebastiaan

i ii wrote:
how will this work with example i gave? i'm not sure how to get some.label and some.text back into some.key? would i use something like 


StringResourceModel srm = new StringResourceModel(some.key, this, null);
PropertyVariableInterpolator.interpolate(some.label, srm);

not sure that works :(


Date: Thu, 13 Mar 2008 12:17:09 +0100
From: [EMAIL PROTECTED]
To: users@wicket.apache.org
Subject: Re: StringResourceModel labels within values

At one point I wanted to do interpolation in constant strings, so I just 
used the property interpolator directly:


PropertyVariableInterpolator.interpolate(value, modelObject);

You can use that to build a model that recursively interpolates until 
there are no more ${...} occurrences in the value.


Regards,
Sebastiaan

i ii wrote:

thank you for help! which way is better? my own component or srm model that 
gets from localizer?


Date: Wed, 12 Mar 2008 13:57:10 -0700
From: [EMAIL PROTECTED]
To: users@wicket.apache.org
Subject: Re: StringResourceModel labels within values

but will that work recusively? :)

-igor


On Wed, Mar 12, 2008 at 1:44 PM, Johan Compagner [EMAIL PROTECTED] wrote:

I think if you just give SRM a model that again gets the values from
 the localizer then it should work fine.




 On 3/12/08, i ii [EMAIL PROTECTED] wrote:
 
  is there way to do something like:
 
  .properties file:
 
  some.label=Some Label
  some.text=Some Text
  some.key=This text will have ${some.label} and ${some.text}
 

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



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





smime.p7s
Description: S/MIME Cryptographic Signature


Re: IntelliJ WicketForge issue: NPE when trying to use New Wicket Page to create both Java and markup

2008-03-13 Thread Kevin Murphy

Kurt R. Hoehn wrote:

That can happen if the html directory is different then the source
directory and the html directory has not been created yet. 

  
I'm a Wicket and IDEA newbie working with the Wicket QuickStart 
structure.  I don't even know how to make the HTML and component 
directories different ;-)


-Kevin


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



Wicket Kitchen Sink Application?

2008-03-13 Thread Hoover, William
Anyone know of a good kitchen sink application for Wicket (preferably one 
application)? We need something robust enough to test most of the Wicket 
features in our current environment.


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



Re: Wicket Kitchen Sink Application?

2008-03-13 Thread Martijn Dashorst
wicket-examples, wicket-phonebook, jtrac, artifactory, jalbum(?)

Martijn

On 3/13/08, Hoover, William [EMAIL PROTECTED] wrote:
 Anyone know of a good kitchen sink application for Wicket (preferably one 
 application)? We need something robust enough to test most of the Wicket 
 features in our current environment.


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




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

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



Re: StringResourceModel labels within values

2008-03-13 Thread Sebastiaan van Erk

Sebastiaan van Erk wrote:

How's this:

public class RecursiveStringResourceModel extends AbstractReadOnlyModel {

private final String resourceKey;

private final Component component;

public RecursiveStringResourceModel(final String resourceKey, final 
Component component) {

this.resourceKey = resourceKey;
this.component = component;
}

@Override

public Object getObject() {
return new StringResourceModel(resourceKey, component, new 
CompoundPropertyModel(new AbstractMap() {

@Override
public Object get(Object key) {
return new RecursiveStringResourceModel((String) key, 
component).getObject();

}

@Override
public Setjava.util.Map.EntryString, String entrySet() {
return null;
}
})).getObject();
}

}

I'm sure it can be done more efficiently (i.e., less model creation), 
but hey, it works! ;-)


For starters, it's much better to subclass LoadableDetachableModel and 
move the getOjbect() to load(). :-)


Regards,
Sebastiaan


smime.p7s
Description: S/MIME Cryptographic Signature


Wicket, Hibernate and Models

2008-03-13 Thread carloc

Hi everyone,

I have been reading wicket in action recently and I have seen pitfalls of
hibernate section.
I was wondering about the stuff about hibernate and memory leaks due to
hibernate proxy objects maintaining a reference to the session with them


Am I doing this wrong then?
@SpringBean
private UserService userService;

add(new ListView(user, userService.findUsers() {
})

is this wrong? I'm using it directly meaning it will be stored in the page
store right?

should i be doing this instead?

LoadableDetachableModel model = new LoadableDetachablemodel() {
Object load() {
   return usrService.findUsers()
   }

}
}

add(new ListView(listView, model)) {
}

this is to avoid storing the users in the session...
will doing the first one actually result in a memory leak?

thanks
-- 
View this message in context: 
http://www.nabble.com/Wicket%2C-Hibernate-and-Models-tp16025532p16025532.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



[Howto] WizardStep communication ?

2008-03-13 Thread smallufo
This is my Wizard and steps :

MyObj myObj = new MyObj(); // build MyObj with default Time / Location
WizardModel model = new WizardModel();
model.add(new TimeStep(myObj));
model.add(new LocationStep(myObj));
model.add(new ConfirmStep(myObj));
init(model);

MyObj is just a class containing time / location data , and with default
value.
The wizard first asks user to input time , and then input location ,
In the third step (ConfirmStep) , it will show the data inputed , asking the
user to confirm.

The problem is , the ConfirmStep always shows the default value .
Time / Location in the 1st and 2nd Step is not shown.
It seems it is because that the ConfirmStep is instantiated and all values
are pulled at the construction time.

Is there any way to prevent this ?


Re: Wicket, Hibernate and Models

2008-03-13 Thread Maurice Marrink
I think the memleak will not occur that easily because i believe
hibernate removes the session from each proxy / persistent bag after
it is closed. But you really should use the LDM (or another sort of
lazy loading model) because it will prevent a lot of
lazyinitexceptions and other hibernate exceptions that might occur
because the session for those objects is no longer available.

Maurice

On Thu, Mar 13, 2008 at 3:04 PM, carloc [EMAIL PROTECTED] wrote:

  Hi everyone,

  I have been reading wicket in action recently and I have seen pitfalls of
  hibernate section.
  I was wondering about the stuff about hibernate and memory leaks due to
  hibernate proxy objects maintaining a reference to the session with them


  Am I doing this wrong then?
  @SpringBean
  private UserService userService;

  add(new ListView(user, userService.findUsers() {
  })

  is this wrong? I'm using it directly meaning it will be stored in the page
  store right?

  should i be doing this instead?

  LoadableDetachableModel model = new LoadableDetachablemodel() {
 Object load() {
return usrService.findUsers()
}

  }
  }

  add(new ListView(listView, model)) {
  }

  this is to avoid storing the users in the session...
  will doing the first one actually result in a memory leak?

  thanks
  --
  View this message in context: 
 http://www.nabble.com/Wicket%2C-Hibernate-and-Models-tp16025532p16025532.html
  Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Is there any way to be notified somehow just after the CompoundPropertyModel is resolved by the component hierarchy?

2008-03-13 Thread Vitaly Tsaplin
   Hi everyone,

   Is there any way to be notified somehow just after the
CompoundPropertyModel is resolved by the component hierarchy?

   Vitaly

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



downloading Wicket examples

2008-03-13 Thread Andrew Broderick
Hi,

I found many useful Wicket examples at:

http://wicketstuff.org/wicket13/

You can browse the source code, but not all classes are there (e.g 
WicketExampleApplication). Where can I download jar or zip files of the sources 
for these examples?

Thanks

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214


Re: downloading Wicket examples

2008-03-13 Thread Martijn Dashorst
http://www.apache.org/dyn/closer.cgi/wicket/1.3.1

Download the distribution, read the readme, look in lib/ for wicket-examples.war

Martijn

On 3/13/08, Andrew Broderick [EMAIL PROTECTED] wrote:
 Hi,

  I found many useful Wicket examples at:

  http://wicketstuff.org/wicket13/

  You can browse the source code, but not all classes are there (e.g 
 WicketExampleApplication). Where can I download jar or zip files of the 
 sources for these examples?

  Thanks

  ___

  The  information in this email or in any file attached
  hereto is intended only for the personal and confiden-
  tial  use  of  the individual or entity to which it is
  addressed and may contain information that is  propri-
  etary  and  confidential.  If you are not the intended
  recipient of this message you are hereby notified that
  any  review, dissemination, distribution or copying of
  this message is strictly prohibited.  This  communica-
  tion  is  for information purposes only and should not
  be regarded as an offer to sell or as  a  solicitation
  of an offer to buy any financial product. Email trans-
  mission cannot be guaranteed to be  secure  or  error-
  free. P6070214



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

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



Back link

2008-03-13 Thread Mathias P.W Nilsson

Hi!

I was wondering on how to deal with a back link. Not back button of browser
but a back link ( not history.back() in javascript )

A user has performed a search for items. He/she found one on page 3. In my
wicket link onclick event I do the following.

Item i = ( Item ) item.getModelObject();
setResponsePage( new ItemOverViewPage( i ) ) or something like this.

How do I in the ItemOverViewPage handle so that the user can go back to the
latest search? Is there any built in feature in Wicket for this?
-- 
View this message in context: 
http://www.nabble.com/Back-link-tp16026896p16026896.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket, Hibernate and Models

2008-03-13 Thread Mathias P.W Nilsson

Yes I think you are right. By using the LoadableDetachableModel you prevent
the List to be put in the session. 
-- 
View this message in context: 
http://www.nabble.com/Wicket%2C-Hibernate-and-Models-tp16025532p16026919.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: downloading Wicket examples

2008-03-13 Thread Andrew Broderick
Not all of the examples on wicketstuff.org are in the distribution. Thanks 
anyway.

-Original Message-
From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 13, 2008 9:48 AM
To: users@wicket.apache.org
Subject: Re: downloading Wicket examples

http://www.apache.org/dyn/closer.cgi/wicket/1.3.1

Download the distribution, read the readme, look in lib/ for wicket-examples.war

Martijn

On 3/13/08, Andrew Broderick [EMAIL PROTECTED] wrote:
 Hi,

  I found many useful Wicket examples at:

  http://wicketstuff.org/wicket13/

  You can browse the source code, but not all classes are there (e.g 
 WicketExampleApplication). Where can I download jar or zip files of the 
 sources for these examples?

  Thanks

  ___

  The  information in this email or in any file attached
  hereto is intended only for the personal and confiden-
  tial  use  of  the individual or entity to which it is
  addressed and may contain information that is  propri-
  etary  and  confidential.  If you are not the intended
  recipient of this message you are hereby notified that
  any  review, dissemination, distribution or copying of
  this message is strictly prohibited.  This  communica-
  tion  is  for information purposes only and should not
  be regarded as an offer to sell or as  a  solicitation
  of an offer to buy any financial product. Email trans-
  mission cannot be guaranteed to be  secure  or  error-
  free. P6070214



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

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


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



Re: Back link

2008-03-13 Thread Martijn Dashorst
setResponsePage(new DetailsPage(SearchPage.this));

Or if you want to keep bookmarkability, then you need to do some
pagemap wizardry, retrieving the previous page from the page history
and checking if that is a searchpage instance, if so put it in a link.

i think a couple of weeks ago this was also discussed on the list, so
you can find the code for retrieving the page there.

Martijn

On 3/13/08, Mathias P.W Nilsson [EMAIL PROTECTED] wrote:

  Hi!

  I was wondering on how to deal with a back link. Not back button of browser
  but a back link ( not history.back() in javascript )

  A user has performed a search for items. He/she found one on page 3. In my
  wicket link onclick event I do the following.

  Item i = ( Item ) item.getModelObject();
  setResponsePage( new ItemOverViewPage( i ) ) or something like this.

  How do I in the ItemOverViewPage handle so that the user can go back to the
  latest search? Is there any built in feature in Wicket for this?

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


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




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

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



Different content for user

2008-03-13 Thread Mathias P.W Nilsson

How can I show different content for logged in users. 

I have a DataSheet page that allows users to add to cart, edit and so on.
Some users should not be able to edit the content or even add to cart. How
can I achive this?
-- 
View this message in context: 
http://www.nabble.com/Different-content-for-user-tp16027844p16027844.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: downloading Wicket examples

2008-03-13 Thread Maurice Marrink
Not sure if the wicket-examples war is generated using
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk
but you can find the source for a number of examples there too, or
else you might have to look in another branch.

Maurice

On Thu, Mar 13, 2008 at 3:59 PM, Andrew Broderick [EMAIL PROTECTED] wrote:
 Not all of the examples on wicketstuff.org are in the distribution. Thanks 
 anyway.



  -Original Message-
  From: Martijn Dashorst [mailto:[EMAIL PROTECTED]
  Sent: Thursday, March 13, 2008 9:48 AM
  To: users@wicket.apache.org
  Subject: Re: downloading Wicket examples

  http://www.apache.org/dyn/closer.cgi/wicket/1.3.1

  Download the distribution, read the readme, look in lib/ for 
 wicket-examples.war

  Martijn

  On 3/13/08, Andrew Broderick [EMAIL PROTECTED] wrote:
   Hi,
  
I found many useful Wicket examples at:
  
http://wicketstuff.org/wicket13/
  
You can browse the source code, but not all classes are there (e.g 
 WicketExampleApplication). Where can I download jar or zip files of the 
 sources for these examples?
  
Thanks
  
___
  
The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214
  


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

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


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



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



Re: Panel not updated on modelchange

2008-03-13 Thread Igor Vaynberg
change that to new propertymodel(getmodel(), name)

-igor


On Thu, Mar 13, 2008 at 1:26 AM, deletethisprofile
[EMAIL PROTECTED] wrote:

  Running Panel.detach from onselectionchanged in the radiogroup didn't help.

  It seems like the panels is updated, but labels in the panel is not.
  The labels are added like this: add(new Label(name, new
  PropertyModel(getModelObject(), name)));

  Ole-Harald






  igor.vaynberg wrote:
  
   sounds like your model is not detachable or being cached somewhere
  
   perhaps you are loading the panel's model somewhere before it is
   updated. like panel { isvisible() { return getmodelobject().isempty();
   }
  
   try calling panel.detach() == which will also detach the panel's model
  
   -igor
  
  
   On Wed, Mar 12, 2008 at 10:29 AM, deletethisprofile
   [EMAIL PROTECTED] wrote:
  
Non-ajax.
  
Ole-Harald
  
  
  
  
Eelco Hillenius wrote:

 Ajax or non-ajax?

 Eelco

 On Wed, Mar 12, 2008 at 9:40 AM, deletethisprofile
 [EMAIL PROTECTED] wrote:

  Hi

  I have a panel with an AbstractReadOnlyModel that i want to change
   when
 i
  select an radiobutton on another panel. The radiobuttons are in a
 radiogroup
  with a properymodel to the same object that I have in the
  AbstractReadOnlyModel. But when I select the radiobuttons the
 modelobject is
  changed but panel is not updated. I have have tried triggering an
 modeupdate
  on the panel when when a radiobutten is selected but the panel is
   not
  updated. If I go to another page on the selection of a radiobutton
   the
 panel
  updates correctly, But I want i to update even the page dont change.
  Any Ideas on how can I make that happend?


  Ole-Harald
  --
  View this message in context:

   
 http://www.nabble.com/Panel-not-updated-on-modelchange-tp16007420p16007420.html
  Sent from the Wicket - User mailing list archive at Nabble.com.



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



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



  
--
View this message in context:
   
 http://www.nabble.com/Panel-not-updated-on-modelchange-tp16007420p16009871.html
  
  
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  

  --
  View this message in context: 
 http://www.nabble.com/Panel-not-updated-on-modelchange-tp16007420p16023202.html


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


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



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



Re: Wicket, Hibernate and Models

2008-03-13 Thread carloc

What should I use when I am accessing hibernate?
Should I use a ListView or should I use a refreshing view?\
In the api it says to use refreshingview instead of using listview when
using database collections
what is better to use?


carloc wrote:
 
 Hi everyone,
 
 I have been reading wicket in action recently and I have seen pitfalls of
 hibernate section.
 I was wondering about the stuff about hibernate and memory leaks due to
 hibernate proxy objects maintaining a reference to the session with
 them
 
 
 Am I doing this wrong then?
 @SpringBean
 private UserService userService;
 
 add(new ListView(user, userService.findUsers() {
 })
 
 is this wrong? I'm using it directly meaning it will be stored in the page
 store right?
 
 should i be doing this instead?
 
 LoadableDetachableModel model = new LoadableDetachablemodel() {
 Object load() {
return usrService.findUsers()
}
 
 }
 }
 
 add(new ListView(listView, model)) {
 }
 
 this is to avoid storing the users in the session...
 will doing the first one actually result in a memory leak?
 
 thanks
 

-- 
View this message in context: 
http://www.nabble.com/Wicket%2C-Hibernate-and-Models-tp16025532p16028751.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Wicket, Hibernate and Models

2008-03-13 Thread Maurice Marrink
I believe refreshingview has better support for reusing items but in
our apps we hardly ever use refreshingview. both are suitable for use
with hibernate.

Maurice

On Thu, Mar 13, 2008 at 4:35 PM, carloc [EMAIL PROTECTED] wrote:

  What should I use when I am accessing hibernate?
  Should I use a ListView or should I use a refreshing view?\
  In the api it says to use refreshingview instead of using listview when
  using database collections
  what is better to use?



  carloc wrote:
  
   Hi everyone,
  
   I have been reading wicket in action recently and I have seen pitfalls of
   hibernate section.
   I was wondering about the stuff about hibernate and memory leaks due to
   hibernate proxy objects maintaining a reference to the session with
   them
  
  
   Am I doing this wrong then?
   @SpringBean
   private UserService userService;
  
   add(new ListView(user, userService.findUsers() {
   })
  
   is this wrong? I'm using it directly meaning it will be stored in the page
   store right?
  
   should i be doing this instead?
  
   LoadableDetachableModel model = new LoadableDetachablemodel() {
   Object load() {
  return usrService.findUsers()
  }
  
   }
   }
  
   add(new ListView(listView, model)) {
   }
  
   this is to avoid storing the users in the session...
   will doing the first one actually result in a memory leak?
  
   thanks
  

  --
  View this message in context: 
 http://www.nabble.com/Wicket%2C-Hibernate-and-Models-tp16025532p16028751.html


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


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



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



Re: Wicket, Hibernate and Models

2008-03-13 Thread Igor Vaynberg
heh. make sure all your listviews override getlistitemmodel()
otherwise you can run into all kinds of problems if you use listview
to select items not just display them...

-igor


On Thu, Mar 13, 2008 at 8:38 AM, Maurice Marrink [EMAIL PROTECTED] wrote:
 I believe refreshingview has better support for reusing items but in
  our apps we hardly ever use refreshingview. both are suitable for use
  with hibernate.

  Maurice



  On Thu, Mar 13, 2008 at 4:35 PM, carloc [EMAIL PROTECTED] wrote:
  
What should I use when I am accessing hibernate?
Should I use a ListView or should I use a refreshing view?\
In the api it says to use refreshingview instead of using listview when
using database collections
what is better to use?
  
  
  
carloc wrote:

 Hi everyone,

 I have been reading wicket in action recently and I have seen pitfalls 
 of
 hibernate section.
 I was wondering about the stuff about hibernate and memory leaks due to
 hibernate proxy objects maintaining a reference to the session with
 them


 Am I doing this wrong then?
 @SpringBean
 private UserService userService;

 add(new ListView(user, userService.findUsers() {
 })

 is this wrong? I'm using it directly meaning it will be stored in the 
 page
 store right?

 should i be doing this instead?

 LoadableDetachableModel model = new LoadableDetachablemodel() {
 Object load() {
return usrService.findUsers()
}

 }
 }

 add(new ListView(listView, model)) {
 }

 this is to avoid storing the users in the session...
 will doing the first one actually result in a memory leak?

 thanks

  
--
View this message in context: 
 http://www.nabble.com/Wicket%2C-Hibernate-and-Models-tp16025532p16028751.html
  
  
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  

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



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



Re: Wicket, Hibernate and Models

2008-03-13 Thread Leszek Gawron

Maurice Marrink wrote:

I believe refreshingview has better support for reusing items but in
our apps we hardly ever use refreshingview. both are suitable for use
with hibernate.

Maurice

On Thu, Mar 13, 2008 at 4:35 PM, carloc [EMAIL PROTECTED] wrote:

 What should I use when I am accessing hibernate?
 Should I use a ListView or should I use a refreshing view?\
 In the api it says to use refreshingview instead of using listview when
 using database collections
 what is better to use?



 carloc wrote:
 
  Hi everyone,
 
  I have been reading wicket in action recently and I have seen pitfalls of
  hibernate section.
  I was wondering about the stuff about hibernate and memory leaks due to
  hibernate proxy objects maintaining a reference to the session with
  them
 
 
  Am I doing this wrong then?
  @SpringBean
  private UserService userService;
 
  add(new ListView(user, userService.findUsers() {
  })
 
  is this wrong? I'm using it directly meaning it will be stored in the page
  store right?
 
  should i be doing this instead?
 
  LoadableDetachableModel model = new LoadableDetachablemodel() {
  Object load() {
 return usrService.findUsers()
 }
 
  }


please mind that you shouldn't create anonymous model classes as they 
keep the reference to the page/panel and you will fall into other memory 
issues.



--
Leszek Gawron http://www.mobilebox.pl/krs.html
CTO at MobileBox Ltd.


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



RE: downloading Wicket examples

2008-03-13 Thread Zappaterrini, Larry
They come bundled with the Wicket download under
src\jdk-1.5\wicket-examples

-Original Message-
From: Andrew Broderick [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 13, 2008 10:45 AM
To: 'users@wicket.apache.org'
Subject: downloading Wicket examples

Hi,

I found many useful Wicket examples at:

http://wicketstuff.org/wicket13/

You can browse the source code, but not all classes are there (e.g
WicketExampleApplication). Where can I download jar or zip files of the
sources for these examples?

Thanks

___

The  information in this email or in any file attached
hereto is intended only for the personal and confiden-
tial  use  of  the individual or entity to which it is
addressed and may contain information that is  propri-
etary  and  confidential.  If you are not the intended
recipient of this message you are hereby notified that
any  review, dissemination, distribution or copying of
this message is strictly prohibited.  This  communica-
tion  is  for information purposes only and should not
be regarded as an offer to sell or as  a  solicitation
of an offer to buy any financial product. Email trans-
mission cannot be guaranteed to be  secure  or  error-
free. P6070214

__

The information contained in this message is proprietary and/or confidential. 
If you are not the 
intended recipient, please: (i) delete the message and all copies; (ii) do not 
disclose, 
distribute or use the message in any manner; and (iii) notify the sender 
immediately. In addition, 
please be aware that any message addressed to our domain is subject to 
archiving and review by 
persons other than the intended recipient. Thank you.
_

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



Wicketstuff/dojo Examples

2008-03-13 Thread Stefan Lindner
Where can I find the source for the wicketstuff/dojo examples? I do not
mean the code snipplets like the ones at
http://wicketstuff.org/confluence/display/STUFFWIKI/Simple+Dojo+D%27n%27
D+tutorial?

The repositories that are mentiones all around the page contain only
source for the wicket-doje-integration etself. not for the examples. And
it would speed up the learning if I could start from a working demo
application (where to put the js-code in html etc.)

I Have tried som veriants (wicket:headscript...,
CompressedResourceReference) butt all lead th the following error
message


DEBUG:  DEPRECATED: dojo.widget.Manager.getImplementationName Could not
locate widget implementation for dojo.dnd.source in dojo.widget
registered to namespace dojo. Developers must specify correct
namespaces for all non-Dojo widgets -- will be removed in version: 0.5
DEBUG:  dojo.widget.Parse: error:[object Error]
DEBUG:  Initialized drag contianer for dragContainer11, dragId: *


I use wicket 1.3.2 and wicketstuff/dojo 1.3.0 beta

Can anybod help?

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



RE: Different content for user

2008-03-13 Thread Warren
Take a look at Wicket-Security at Wicket Stuff site.

http://wicketstuff.org/confluence/display/STUFFWIKI/Wicket-Security

I am using it to do the same types of things you are talking about, and it
works great.

 -Original Message-
 From: Mathias P.W Nilsson [mailto:[EMAIL PROTECTED]
 Sent: Thursday, March 13, 2008 8:11 AM
 To: users@wicket.apache.org
 Subject: Different content for user



 How can I show different content for logged in users.

 I have a DataSheet page that allows users to add to cart, edit and so on.
 Some users should not be able to edit the content or even add to cart. How
 can I achive this?
 --
 View this message in context:
 http://www.nabble.com/Different-content-for-user-tp16027844p16027844.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Wicketstuff/dojo Examples

2008-03-13 Thread Maurice Marrink
Try 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-dojo-examples

Maurice

On Thu, Mar 13, 2008 at 5:16 PM, Stefan Lindner [EMAIL PROTECTED] wrote:
 Where can I find the source for the wicketstuff/dojo examples? I do not
  mean the code snipplets like the ones at
  http://wicketstuff.org/confluence/display/STUFFWIKI/Simple+Dojo+D%27n%27
  D+tutorial?

  The repositories that are mentiones all around the page contain only
  source for the wicket-doje-integration etself. not for the examples. And
  it would speed up the learning if I could start from a working demo
  application (where to put the js-code in html etc.)

  I Have tried som veriants (wicket:headscript...,
  CompressedResourceReference) butt all lead th the following error
  message


  DEBUG:  DEPRECATED: dojo.widget.Manager.getImplementationName Could not
  locate widget implementation for dojo.dnd.source in dojo.widget
  registered to namespace dojo. Developers must specify correct
  namespaces for all non-Dojo widgets -- will be removed in version: 0.5
  DEBUG:  dojo.widget.Parse: error:[object Error]
  DEBUG:  Initialized drag contianer for dragContainer11, dragId: *


  I use wicket 1.3.2 and wicketstuff/dojo 1.3.0 beta

  Can anybod help?

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



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



Re: Wicket, Hibernate and Models

2008-03-13 Thread Peter Ertl
 please mind that you shouldn't create anonymous model classes as  
they keep the reference to the page/panel and you will fall into other  
memory issues.


could you elaborate on that?


Am 13.03.2008 um 16:47 schrieb Leszek Gawron:


Maurice Marrink wrote:

I believe refreshingview has better support for reusing items but in
our apps we hardly ever use refreshingview. both are suitable for use
with hibernate.
Maurice
On Thu, Mar 13, 2008 at 4:35 PM, carloc [EMAIL PROTECTED]  
wrote:

What should I use when I am accessing hibernate?
Should I use a ListView or should I use a refreshing view?\
In the api it says to use refreshingview instead of using listview  
when

using database collections
what is better to use?



carloc wrote:

 Hi everyone,

 I have been reading wicket in action recently and I have seen  
pitfalls of

 hibernate section.
 I was wondering about the stuff about hibernate and memory leaks  
due to
 hibernate proxy objects maintaining a reference to the session  
with

 them


 Am I doing this wrong then?
 @SpringBean
 private UserService userService;

 add(new ListView(user, userService.findUsers() {
 })

 is this wrong? I'm using it directly meaning it will be stored  
in the page

 store right?

 should i be doing this instead?

 LoadableDetachableModel model = new LoadableDetachablemodel() {
 Object load() {
return usrService.findUsers()
}

 }


please mind that you shouldn't create anonymous model classes as  
they keep the reference to the page/panel and you will fall into  
other memory issues.



--
Leszek Gawron http://www.mobilebox.pl/krs.html
CTO at MobileBox Ltd.


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



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



Re: Wicket, Hibernate and Models

2008-03-13 Thread Igor Vaynberg
actually not in 1.3. our serialization is smart enough to take this
into account if i remember correctly.

-igor


On Thu, Mar 13, 2008 at 8:47 AM, Leszek Gawron [EMAIL PROTECTED] wrote:

 Maurice Marrink wrote:
   I believe refreshingview has better support for reusing items but in
   our apps we hardly ever use refreshingview. both are suitable for use
   with hibernate.
  
   Maurice
  
   On Thu, Mar 13, 2008 at 4:35 PM, carloc [EMAIL PROTECTED] wrote:
What should I use when I am accessing hibernate?
Should I use a ListView or should I use a refreshing view?\
In the api it says to use refreshingview instead of using listview when
using database collections
what is better to use?
  
  
  
carloc wrote:

 Hi everyone,

 I have been reading wicket in action recently and I have seen pitfalls 
 of
 hibernate section.
 I was wondering about the stuff about hibernate and memory leaks due to
 hibernate proxy objects maintaining a reference to the session with
 them


 Am I doing this wrong then?
 @SpringBean
 private UserService userService;

 add(new ListView(user, userService.findUsers() {
 })

 is this wrong? I'm using it directly meaning it will be stored in the 
 page
 store right?

 should i be doing this instead?

 LoadableDetachableModel model = new LoadableDetachablemodel() {
 Object load() {
return usrService.findUsers()
}

 }

  please mind that you shouldn't create anonymous model classes as they
  keep the reference to the page/panel and you will fall into other memory
  issues.


  --
  Leszek Gawron http://www.mobilebox.pl/krs.html
  CTO at MobileBox Ltd.




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



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



Re: Wicket, Hibernate and Models

2008-03-13 Thread Peter Ertl

whew - glad to hear :-)

[having probably hundreds of anonymous models in his projects]

Am 13.03.2008 um 17:46 schrieb Igor Vaynberg:


actually not in 1.3. our serialization is smart enough to take this
into account if i remember correctly.

-igor


On Thu, Mar 13, 2008 at 8:47 AM, Leszek Gawron  
[EMAIL PROTECTED] wrote:


Maurice Marrink wrote:

I believe refreshingview has better support for reusing items but in
our apps we hardly ever use refreshingview. both are suitable for  
use

with hibernate.

Maurice

On Thu, Mar 13, 2008 at 4:35 PM, carloc [EMAIL PROTECTED]  
wrote:

What should I use when I am accessing hibernate?
Should I use a ListView or should I use a refreshing view?\
In the api it says to use refreshingview instead of using  
listview when

using database collections
what is better to use?



carloc wrote:


Hi everyone,

I have been reading wicket in action recently and I have seen  
pitfalls of

hibernate section.
I was wondering about the stuff about hibernate and memory leaks  
due to
hibernate proxy objects maintaining a reference to the session  
with

them


Am I doing this wrong then?
@SpringBean
private UserService userService;

add(new ListView(user, userService.findUsers() {
})

is this wrong? I'm using it directly meaning it will be stored  
in the page

store right?

should i be doing this instead?

LoadableDetachableModel model = new LoadableDetachablemodel() {
   Object load() {
  return usrService.findUsers()
  }

}


please mind that you shouldn't create anonymous model classes as they
keep the reference to the page/panel and you will fall into other  
memory

issues.


--
Leszek Gawron http://www.mobilebox.pl/ 
krs.html

CTO at MobileBox Ltd.




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




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



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



Re: Hide Wicket AJAX Debug window

2008-03-13 Thread hjuturu

Thanks Ryan and Gerolf.
I put the settings in the init() method and it works fine.


hjuturu wrote:
 
 Hi All
 i have a label on my webpage on which i do a in line edit using
 AjaxEditableLabel.
 I have included wicket-event.js and wicket-ajax.js javascripts in my page.
 When i start editing the label the wicket ajax debug window appears on
 the lower right corner.
 how can i hide that window.
 Thanks
 Haritha
 
 

-- 
View this message in context: 
http://www.nabble.com/Hide-%22Wicket-AJAX-Debug%22-window-tp16013820p16032285.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Panel not updated on modelchange

2008-03-13 Thread deletethisprofile

Thanks, now it works.

Ole-Harald




igor.vaynberg wrote:
 
 change that to new propertymodel(getmodel(), name)
 
 -igor
 
 
 On Thu, Mar 13, 2008 at 1:26 AM, deletethisprofile
 [EMAIL PROTECTED] wrote:

  Running Panel.detach from onselectionchanged in the radiogroup didn't
 help.

  It seems like the panels is updated, but labels in the panel is not.
  The labels are added like this: add(new Label(name, new
  PropertyModel(getModelObject(), name)));

  Ole-Harald






  igor.vaynberg wrote:
  
   sounds like your model is not detachable or being cached somewhere
  
   perhaps you are loading the panel's model somewhere before it is
   updated. like panel { isvisible() { return getmodelobject().isempty();
   }
  
   try calling panel.detach() == which will also detach the panel's
 model
  
   -igor
  
  
   On Wed, Mar 12, 2008 at 10:29 AM, deletethisprofile
   [EMAIL PROTECTED] wrote:
  
Non-ajax.
  
Ole-Harald
  
  
  
  
Eelco Hillenius wrote:

 Ajax or non-ajax?

 Eelco

 On Wed, Mar 12, 2008 at 9:40 AM, deletethisprofile
 [EMAIL PROTECTED] wrote:

  Hi

  I have a panel with an AbstractReadOnlyModel that i want to
 change
   when
 i
  select an radiobutton on another panel. The radiobuttons are in
 a
 radiogroup
  with a properymodel to the same object that I have in the
  AbstractReadOnlyModel. But when I select the radiobuttons the
 modelobject is
  changed but panel is not updated. I have have tried triggering
 an
 modeupdate
  on the panel when when a radiobutten is selected but the panel
 is
   not
  updated. If I go to another page on the selection of a
 radiobutton
   the
 panel
  updates correctly, But I want i to update even the page dont
 change.
  Any Ideas on how can I make that happend?


  Ole-Harald
  --
  View this message in context:

  
 http://www.nabble.com/Panel-not-updated-on-modelchange-tp16007420p16007420.html
  Sent from the Wicket - User mailing list archive at Nabble.com.



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




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



  
--
View this message in context:
  
 http://www.nabble.com/Panel-not-updated-on-modelchange-tp16007420p16009871.html
  
  
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  

  --
  View this message in context:
 http://www.nabble.com/Panel-not-updated-on-modelchange-tp16007420p16023202.html


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


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


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

-- 
View this message in context: 
http://www.nabble.com/Panel-not-updated-on-modelchange-tp16007420p16032288.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



RE: [Howto] WizardStep communication ?

2008-03-13 Thread Jeremy Thomerson
Show us the code from your ConfirmStep.  My guess is that you're not familiar 
with the need for models yet.  For instance, my guess would be that you're 
doing this:

public ConfirmStep(MyObj obj) { 
  add(new Label(time, obj.getTime()));
  add(new Label(location, obj.getLocation()));
}

If you are - that's the problem.  Try this:
public ConfirmStep(MyObj obj) { 
  add(new Label(time, new PropertyModel(obj, time)));
  add(new Label(location, new PropertyModel(obj, location)));
}

That will fix this problem, but you need to go learn as much as you can about 
models.  You should probably also be passing an IModel into the constructor of 
each step, as well... Not the actual object.

Hope this helps.

Jeremy Thomerson
-- sent from a wireless device

-Original Message-
From: smallufo [EMAIL PROTECTED]
To: users@wicket.apache.org
Sent: 3/13/08 9:10 AM
Subject: [Howto] WizardStep communication ?

This is my Wizard and steps :

MyObj myObj = new MyObj(); // build MyObj with default Time / Location
WizardModel model = new WizardModel();
model.add(new TimeStep(myObj));
model.add(new LocationStep(myObj));
model.add(new ConfirmStep(myObj));
init(model);

MyObj is just a class containing time / location data , and with default
value.
The wizard first asks user to input time , and then input location ,
In the third step (ConfirmStep) , it will show the data inputed , asking the
user to confirm.

The problem is , the ConfirmStep always shows the default value .
Time / Location in the 1st and 2nd Step is not shown.
It seems it is because that the ConfirmStep is instantiated and all values
are pulled at the construction time.

Is there any way to prevent this ?



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



AjaxEditableMultiLineLabel in table does not work in safari

2008-03-13 Thread hjuturu

Hi All,

i am using a AjaxEditableLabel and AjaxEditableMultiLineLabel wicket
components inside a table tag.
They both work fine on Firefox and IE7. But when i try it on safari, the
AjaxEditableMultiLineLabel  component doesnt expand when clicked on. The
AjaxEditableLabel component works fine though.
Is there any bug associated with AjaxEditableMultiLineLabel  components in
safari.

Can someone please update me about this.
Thanks
Haritha
-- 
View this message in context: 
http://www.nabble.com/AjaxEditableMultiLineLabel-in-%3Ctable%3E-does-not-work-in-safari-tp16033319p16033319.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Is it possible to escape HTML in a feedback message?

2008-03-13 Thread Sri Sankaran

I believe you can do this using decorating your FeedbackPanel with a behavior
(see IBehavior, AbstractBehavior).

Sri

mraible wrote:
 
 
 Yes it does - thanks!
 
 FeedbackPanel feedback = (FeedbackPanel) backPage.get(feedback);
 feedback.setVisible(true);
 feedback.setEscapeModelStrings(true);
 
 Is there anyway to make escapeModelStrings on by default?
 
 Thanks,
 
 Matt
 
 
 igor.vaynberg wrote:
 
 does feedbackpanel.setescapemodelstrings(true) do it?
 
 -igor
 
 
 On Wed, Mar 12, 2008 at 10:34 AM, mraible [EMAIL PROTECTED] wrote:

  lt;span wicket:id=feedback class=message/spangt;




  igor.vaynberg wrote:
  
   what ever was after I have the following in a page: got
 stripped
  
   -igor
  
  
   On Wed, Mar 12, 2008 at 9:56 AM, mraible [EMAIL PROTECTED]
 wrote:
  
I have the following in a page:
  
  
  
If the feedback message contains XML, it doesn't get escaped. Is
 there
   any
way to turn on HTML escaping?
  
Thanks,
  
Matt
--
View this message in context:
  
 http://www.nabble.com/Is-it-possible-to-escape-HTML-in-a-feedback-message--tp16008403p16008403.html
Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
   
 -
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  

  --
  View this message in context:
 http://www.nabble.com/Is-it-possible-to-escape-HTML-in-a-feedback-message--tp16008403p16009950.html


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


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


 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -- 
 View this message in context:
 http://www.nabble.com/Is-it-possible-to-escape-HTML-in-a-feedback-message--tp16008403p16012617.html
 Sent from the Wicket - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Is-it-possible-to-escape-HTML-in-a-feedback-message--tp16008403p16033884.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Why does SqlTimestampConverter only use the time portion of the timestamp?

2008-03-13 Thread Markus Strickler
Hi-

is there any reason why SqlTimestampConverter.convertToString() only returns a
time? Or is this a bug?

Thanks,

-kusako


This message was sent using IMP, the Internet Messaging Program.

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



Re: Hide Wicket AJAX Debug window

2008-03-13 Thread Martijn Dashorst
You really should deploy using DEPLOYMENT mode, not randomly modifying
settings in your init() method.

Martijn

On 3/13/08, hjuturu [EMAIL PROTECTED] wrote:

  Thanks Ryan and Gerolf.
  I put the settings in the init() method and it works fine.



  hjuturu wrote:
  
   Hi All
   i have a label on my webpage on which i do a in line edit using
   AjaxEditableLabel.
   I have included wicket-event.js and wicket-ajax.js javascripts in my page.
   When i start editing the label the wicket ajax debug window appears on
   the lower right corner.
   how can i hide that window.
   Thanks
   Haritha
  
  

  --

 View this message in context: 
 http://www.nabble.com/Hide-%22Wicket-AJAX-Debug%22-window-tp16013820p16032285.html

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


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




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

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



Re: Back link

2008-03-13 Thread Mathias P.W Nilsson

Thanks I will look into this!
-- 
View this message in context: 
http://www.nabble.com/Back-link-tp16026896p16034782.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Different content for user

2008-03-13 Thread Igor Vaynberg
if (condition) add component is static - if you put it into
constructor it is only evaluated once, so if login status changes in
the middle of the lifecyle of the panel it will not reflect the
change.

personally something like

add(new loggedinpanel(..) { isvisible() { return isuserloggedin(); } });
add(new notloggedinpanel(..) { isvisible() { return !isuserloggedin(); }});

works much better

if these panels contain a lot of components, or components that are
expensive to construct, you can add the appropriate one in
obeforerender

onbeforerender() {
   if (loggedin()) {
 if (get(panel)==null) add(new loggedinpanel(panel);
 else if (!get(panel) instanceof loggedinpanel) {
get(panel).replacewith(new loggedinpanel(panel); }
  } else {
 if (get(panel)==null) add(new loggedoutpanel(panel);
 else if (!get(panel) instanceof loggedoutpanel) {
get(panel).replacewith(new loggedoutpanel(panel); }
}

-igor


   if (isuserloggedin()) { add(new loggedinpanel

On Thu, Mar 13, 2008 at 11:25 AM, Mathias P.W Nilsson
[EMAIL PROTECTED] wrote:

  Ehh looks complicated. What about the old if( condition ) add Component ?
  --
  View this message in context: 
 http://www.nabble.com/Different-content-for-user-tp16027844p16034721.html


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


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



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



Re: Different content for user

2008-03-13 Thread James Carman
Tapestry has an actual If component.  Would that work in Wicket?

On 3/13/08, Igor Vaynberg [EMAIL PROTECTED] wrote:
 if (condition) add component is static - if you put it into
  constructor it is only evaluated once, so if login status changes in
  the middle of the lifecyle of the panel it will not reflect the
  change.

  personally something like

  add(new loggedinpanel(..) { isvisible() { return isuserloggedin(); } });
  add(new notloggedinpanel(..) { isvisible() { return !isuserloggedin(); }});

  works much better

  if these panels contain a lot of components, or components that are
  expensive to construct, you can add the appropriate one in
  obeforerender

  onbeforerender() {
if (loggedin()) {
  if (get(panel)==null) add(new loggedinpanel(panel);
  else if (!get(panel) instanceof loggedinpanel) {
  get(panel).replacewith(new loggedinpanel(panel); }
   } else {
  if (get(panel)==null) add(new loggedoutpanel(panel);
  else if (!get(panel) instanceof loggedoutpanel) {
  get(panel).replacewith(new loggedoutpanel(panel); }
  }

  -igor


if (isuserloggedin()) { add(new loggedinpanel


  On Thu, Mar 13, 2008 at 11:25 AM, Mathias P.W Nilsson
  [EMAIL PROTECTED] wrote:
  
Ehh looks complicated. What about the old if( condition ) add 
 Component ?
--
View this message in context: 
 http://www.nabble.com/Different-content-for-user-tp16027844p16034721.html
  
  
   Sent from the Wicket - User mailing list archive at Nabble.com.
  
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  

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



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



Re: Different content for user

2008-03-13 Thread Igor Vaynberg
yep, you can write something like tapestry's if, it would look very
much like the onbeforerender stuff i wrote below...

-igor


On Thu, Mar 13, 2008 at 11:38 AM, James Carman
[EMAIL PROTECTED] wrote:
 Tapestry has an actual If component.  Would that work in Wicket?



  On 3/13/08, Igor Vaynberg [EMAIL PROTECTED] wrote:
   if (condition) add component is static - if you put it into
constructor it is only evaluated once, so if login status changes in
the middle of the lifecyle of the panel it will not reflect the
change.
  
personally something like
  
add(new loggedinpanel(..) { isvisible() { return isuserloggedin(); } });
add(new notloggedinpanel(..) { isvisible() { return !isuserloggedin(); 
 }});
  
works much better
  
if these panels contain a lot of components, or components that are
expensive to construct, you can add the appropriate one in
obeforerender
  
onbeforerender() {
  if (loggedin()) {
if (get(panel)==null) add(new loggedinpanel(panel);
else if (!get(panel) instanceof loggedinpanel) {
get(panel).replacewith(new loggedinpanel(panel); }
 } else {
if (get(panel)==null) add(new loggedoutpanel(panel);
else if (!get(panel) instanceof loggedoutpanel) {
get(panel).replacewith(new loggedoutpanel(panel); }
}
  
-igor
  
  
  if (isuserloggedin()) { add(new loggedinpanel
  
  
On Thu, Mar 13, 2008 at 11:25 AM, Mathias P.W Nilsson
[EMAIL PROTECTED] wrote:

  Ehh looks complicated. What about the old if( condition ) add 
 Component ?
  --
  View this message in context: 
 http://www.nabble.com/Different-content-for-user-tp16027844p16034721.html


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


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


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

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



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



RE: Wicketstuff/dojo Examples

2008-03-13 Thread Stefan Lindner
 Thank you Maurice!

-Ursprüngliche Nachricht-
Von: Maurice Marrink [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 13. März 2008 17:39
An: users@wicket.apache.org
Betreff: Re: Wicketstuff/dojo Examples

Try 
https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-dojo-examples

Maurice

On Thu, Mar 13, 2008 at 5:16 PM, Stefan Lindner [EMAIL PROTECTED] wrote:
 Where can I find the source for the wicketstuff/dojo examples? I do 
 not  mean the code snipplets like the ones at
  
 http://wicketstuff.org/confluence/display/STUFFWIKI/Simple+Dojo+D%27n%
 27
  D+tutorial?

  The repositories that are mentiones all around the page contain only  
 source for the wicket-doje-integration etself. not for the examples. 
 And  it would speed up the learning if I could start from a working 
 demo  application (where to put the js-code in html etc.)

  I Have tried som veriants (wicket:headscript...,
  CompressedResourceReference) butt all lead th the following error  
 message


  DEBUG:  DEPRECATED: dojo.widget.Manager.getImplementationName Could 
 not  locate widget implementation for dojo.dnd.source in dojo.widget
  registered to namespace dojo. Developers must specify correct  
 namespaces for all non-Dojo widgets -- will be removed in version: 0.5
  DEBUG:  dojo.widget.Parse: error:[object Error]
  DEBUG:  Initialized drag contianer for dragContainer11, dragId: *


  I use wicket 1.3.2 and wicketstuff/dojo 1.3.0 beta

  Can anybod help?

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



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


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



Wicket Portlet Error in Liferay

2008-03-13 Thread gaugat

I have a simple portlet created using wicket. It contains a PageableListView
and PagingNavigator components. The portlet initially renders just fine.
When I click on one of the paging links, I get ClassCastException. Part of
the stacktrace looks like this...

java.lang.ClassCastException: com.liferay.portlet.ActionResponseImpl
at
org.apache.wicket.protocol.http.portlet.WicketFilterPortletContext.setupFilter(WicketFilterPortletContext.java:75)
at
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:163)

Stepping through the code in WicketFilterPortletContext, it looks like
(RenderResponse)filterRequestContext.getRequest().getAttribute(javax.portlet.response)
returns com.liferay.portlet.ActionResponseImpl which does not implement
RenderResponse

I'm using Liferay 4.2.2 and Wicket 1.3.1.

Any ideas?
-- 
View this message in context: 
http://www.nabble.com/Wicket-Portlet-Error-in-Liferay-tp16036090p16036090.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



getConverter() in TextArea not being called

2008-03-13 Thread Michael Mehrle
I've got a custom TextArea which overrides getConverter(), however for
some reason that method never gets called. getConverter() returns an
implementation of IConverter - it all looks pretty basic.

Is there anything special I have to do for getConverter() to be called?
By the way I added the @Override annotation, so I'm sure the method sig
is correct.

Michael


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



Re: getConverter() in TextArea not being called

2008-03-13 Thread Igor Vaynberg
you have to set the type either via constructor arg or a call to settype

-igor


On Thu, Mar 13, 2008 at 12:08 PM, Michael Mehrle [EMAIL PROTECTED] wrote:
 I've got a custom TextArea which overrides getConverter(), however for
  some reason that method never gets called. getConverter() returns an
  implementation of IConverter - it all looks pretty basic.

  Is there anything special I have to do for getConverter() to be called?
  By the way I added the @Override annotation, so I'm sure the method sig
  is correct.

  Michael


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



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



RE: getConverter() in TextArea not being called

2008-03-13 Thread Michael Mehrle
Thanks for help (again), Igor :-) However, I'm not sure I understand -
could you please give me a code fragment?

BTW, I just dug around in FormComponent - isn't an alternative approach
to override convertValue()?

Michael

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 13, 2008 12:12 PM
To: users@wicket.apache.org
Subject: Re: getConverter() in TextArea not being called

you have to set the type either via constructor arg or a call to settype

-igor


On Thu, Mar 13, 2008 at 12:08 PM, Michael Mehrle
[EMAIL PROTECTED] wrote:
 I've got a custom TextArea which overrides getConverter(), however for
  some reason that method never gets called. getConverter() returns an
  implementation of IConverter - it all looks pretty basic.

  Is there anything special I have to do for getConverter() to be
called?
  By the way I added the @Override annotation, so I'm sure the method
sig
  is correct.

  Michael


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



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


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



Converter gets called before Validator?

2008-03-13 Thread Michael Mehrle
I read the update docs and at this time assume that my component's
Validator gets called AFTER the Converter. Is that correct for 1.3?

Michael


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



Re: Different content for user

2008-03-13 Thread Mathias P.W Nilsson

Thanks!

I'm really confused on what to do here. What is your approach to this?
-- 
View this message in context: 
http://www.nabble.com/Different-content-for-user-tp16027844p16036638.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Converter gets called before Validator?

2008-03-13 Thread Igor Vaynberg
yes. validators work on types not strings, if they didnt then every
converter would have to attempt to type convert the string and deal
with conversion errors. so first we typeconvert, then run validators
on the result

-igor


On Thu, Mar 13, 2008 at 12:23 PM, Michael Mehrle [EMAIL PROTECTED] wrote:
 I read the update docs and at this time assume that my component's
  Validator gets called AFTER the Converter. Is that correct for 1.3?

  Michael


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



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



RE: getConverter() in TextArea not being called

2008-03-13 Thread Michael Mehrle
This was very helpful - thank you again, Igor!

-Original Message-
From: Igor Vaynberg [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 13, 2008 12:55 PM
To: users@wicket.apache.org
Subject: Re: getConverter() in TextArea not being called

textarea.settype(mytype.class); or new
textarea(id,model,mytype.class);

yes, alternatvely you can override convertvalue()

-igor


On Thu, Mar 13, 2008 at 12:22 PM, Michael Mehrle
[EMAIL PROTECTED] wrote:
 Thanks for help (again), Igor :-) However, I'm not sure I understand -
  could you please give me a code fragment?

  BTW, I just dug around in FormComponent - isn't an alternative
approach
  to override convertValue()?

  Michael



  -Original Message-
  From: Igor Vaynberg [mailto:[EMAIL PROTECTED]
  Sent: Thursday, March 13, 2008 12:12 PM
  To: users@wicket.apache.org
  Subject: Re: getConverter() in TextArea not being called

  you have to set the type either via constructor arg or a call to
settype

  -igor


  On Thu, Mar 13, 2008 at 12:08 PM, Michael Mehrle
  [EMAIL PROTECTED] wrote:
   I've got a custom TextArea which overrides getConverter(), however
for
some reason that method never gets called. getConverter() returns
an
implementation of IConverter - it all looks pretty basic.
  
Is there anything special I have to do for getConverter() to be
  called?
By the way I added the @Override annotation, so I'm sure the
method
  sig
is correct.
  
Michael
  
  
  
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
  
  

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


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



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


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



JNLP File Link (within same webapp)

2008-03-13 Thread James Carman
This is probably a dumb question, but what kind of link should I use
to link to a JNLP file which resides within the same webapp?  We have
the JnlpDownloadServlet running which accepts any *.jnlp file requests
and we're using WicketFilter (so it shouldn't interfere).  I don't
think it's an ExternalLink, since it lives within the same webapp.  I
guess I could use external link, but I'll have to do a little URL
building to get the correct url with the correct context path and
everything, right?

James

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



FeedbackPanel#newMessageDisplayComponent throws NullPointerException if empty message is inserted

2008-03-13 Thread Edvin Syse

Hi,

I sometimes do:

try {
// work
} catch (Exception e) {
error(e.getMessage());
}

and came across an Exception that didn't have a message, and was greeted with a NullPointerException from the FeedbackPanel. Ofcourse this 
was my mistake but maybe the code could be changed like this:


protected Component newMessageDisplayComponent(String id, FeedbackMessage 
message) {
Label label = new Label(id, message.getMessage().toString()); // Current
Label label = new Label(id, message.getMessage() != null ? 
message.getMessage().toString() : getString(emptyMessage)); // New
label.setEscapeModelStrings(FeedbackPanel.this.getEscapeModelStrings());
return label;
}

.. and then add emptyMessage or some key to FeedbackPanel.properties or is this 
a bad idea?


-- Edvin

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



Re: JNLP File Link (within same webapp)

2008-03-13 Thread Igor Vaynberg
see ContextImage and how it builds a context-relative path...

-igor


On Thu, Mar 13, 2008 at 2:20 PM, James Carman
[EMAIL PROTECTED] wrote:
 This is probably a dumb question, but what kind of link should I use
  to link to a JNLP file which resides within the same webapp?  We have
  the JnlpDownloadServlet running which accepts any *.jnlp file requests
  and we're using WicketFilter (so it shouldn't interfere).  I don't
  think it's an ExternalLink, since it lives within the same webapp.  I
  guess I could use external link, but I'll have to do a little URL
  building to get the correct url with the correct context path and
  everything, right?

  James

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



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



LinkTree Node Refresh

2008-03-13 Thread jeredm

I have a LinkTree where am adding new nodes via AJAX where the node is not
visually refreshing until I call myLinkTree.invalidateAll();.  The problem
is that the tree refresh takes too long when I have a bunch of nodes
displayed.  AbstractTree.invalidateAll() appears to redraw the whole tree,
but I only need to redraw the single node (I may be wrong on this and it
may be working exactly as I need it to, but it is slow).

My basic setup is a tree on the left that dynamically swaps out panels via
AJAX on the right based on the node selected.  The tree itself only starts
with the root and first children.  All first children load their child nodes
via an AJAX call on expand.  These nodes will correctly refresh as the nodes
are added and then the parent is expanded.  I cannot collapse and re-expand
the parent node in this case as expanding a node would cause the tree to
close nodes the user has already opened.  What I need is to be able to
insert a node like so...

- My Root
  |--First Child
  |-- First Grandchild
  |-- NEW NODE
  |-- Last Grandchild

I need the First Grandchild and Last Grandchild to already be expanded and
displaying before I add NEW NODE.

-- 
View this message in context: 
http://www.nabble.com/LinkTree-Node-Refresh-tp16041813p16041813.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: How to pre-select a DropDownChoice

2008-03-13 Thread Nick Heudecker
Set the model of the DDC to the value you want to have selected.

On Thu, Mar 13, 2008 at 7:53 PM, Michael Mehrle [EMAIL PROTECTED]
wrote:

 I feel silly asking this, but I can't figure it out. I need to set my
 DropDownChoice component to the id I'm passing into my page via a
 pageparam. How do I do that? I don't see anything resembling
 setSelected().

 Michael


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




-- 
Nick Heudecker
Professional Wicket Training  Consulting
http://www.systemmobile.com

Eventful - Intelligent Event Management
http://www.eventfulhq.com


display images in the TreeTable cell

2008-03-13 Thread jianfei

i need to display different images for each cell in my tree table, i'm using
a ModelBean that maintains the different properties for different cell just
like the example, so how to i make it so the cell can display an image
instead of just text?

i tried to implement my own column that simply returns a new panel for the
new cell, and the panel only contains the image, but this doesn't work.

so can anyone give me some suggestion? i'm very new to wicket, so some code
snippet would be very helpful. thanks in advanced!
-- 
View this message in context: 
http://www.nabble.com/display-images-in-the-TreeTable-cell-tp16043906p16043906.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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