Re: [Wicket-user] Re: Page Expiration

2005-11-02 Thread Eelco Hillenius
I wasn't too impressed by WADI's progress to be honest. Seems to be
yet another dead project.

Eelco


On 11/1/05, Dan Gould [EMAIL PROTECTED] wrote:
 Thanks Eelco--

 For anyone else who is looking, the param in web.xml is
 session-config
 session-timeoutTIME_IN_MINUTES/session-timeout
 /session-config

 if you set it to 0, it will never expire session, but I assume that
 memory will quickly become an issue.

 In Tomcat, it looks like there's an optional Store called
 org.apache.catalina.session.PersistentManager
 that will let you persist sessions to a file ot JDBC database.  This might
 let you keep sessions around forever.  It is not designed for clusters,
 however.

 WADI (wadi.codehaus.org) may solve this for clusters.

 In the meantime, I'll convert a lot of my links to
 BookmarkablePageLinks...

 Thanks again,
 Dan


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



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


[Wicket-user] (off topic?)- Where is Jonathan Locke?

2005-11-02 Thread Francis Amanfo
Haven't heared from him here since a long time. Just out of curiosity! :-)

Francis


Re: [Wicket-user] replace ognl.

2005-11-02 Thread Johan Compagner
Conversion is first done in Wicket itself.

So if you have a Field that gets its value from a map then you just have to type youre field first:

TextField datePropertyTextField = new TextField(map.property, Date.class);

I already thought about looking at the current key/index and then convert it to that one.
But type conversion should be done at front. And this will be handled by wicket before the object is set.

johan

On 11/1/05, Laurent PETIT [EMAIL PROTECTED]
 wrote:
Hello,some thoughts:property: This can can then be a bean property with get and set method. Or if a map is given as an object it will be lookup with the property as a key when there is not get method for that property.
If the model is a Map, how is the property converted ?Could it be possible to check the type of the property by doing aget() first on the old value of the property, and this old value (ifnot null) could give the type of the property ?
property1.property2: Both properties are lookup as written above. If property1 evaluates to null then if there is a setMethod (or if it is a map) and the Class of the property has a default constructor then the object will
 be constructed and set on the object.in the case of the map, how will you guess the correct type forproperty1 ? (without strongly typed setter ? !)Thanks in advance,--laurent

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




[Wicket-user] How to do struts-nested like form element nesting in Wicket

2005-11-02 Thread Laurent PETIT
Hello,

I wonder if it is easily feasible to have functionality like
struts-nested, the struts extension made by the keyboardmonkey team
( 
http://www.keyboardmonkey.com/pilotlight/next/Tutorial_partTwo.jsp?content=yesplease
)

This allows to create forms with nested elements : a monkey having
some properties, and a list of beans representing a banana bunch, made
of some properties, as well as a (dynamically modifiable) list of
bananas,  whose bananas contain some properties ... ( the nesting
could be more than this one level example).

And in the same page : monkey properties are editable, existing bunchs
and bananas properties are editable. It is also possible to add a
bunch to the monkey, or a banana to a bunch, to delete a bunch from
the monkey, a banana from a bunch 


Not sure is this can be done easily in wicket ?
What would you suggest to do it the best way ?


Thanks in advance,

--
Laurent


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


Re: [Wicket-user] How to do struts-nested like form element nesting in Wicket

2005-11-02 Thread Eelco Hillenius
That's easy to do in Wicket. You can nest anyway you want in your
forms, including using listviews (though don't forget to set the
optimizeItemRemoval property to true).

Eelco


On 11/2/05, Laurent PETIT [EMAIL PROTECTED] wrote:
 Hello,

 I wonder if it is easily feasible to have functionality like
 struts-nested, the struts extension made by the keyboardmonkey team
 ( 
 http://www.keyboardmonkey.com/pilotlight/next/Tutorial_partTwo.jsp?content=yesplease
 )

 This allows to create forms with nested elements : a monkey having
 some properties, and a list of beans representing a banana bunch, made
 of some properties, as well as a (dynamically modifiable) list of
 bananas,  whose bananas contain some properties ... ( the nesting
 could be more than this one level example).

 And in the same page : monkey properties are editable, existing bunchs
 and bananas properties are editable. It is also possible to add a
 bunch to the monkey, or a banana to a bunch, to delete a bunch from
 the monkey, a banana from a bunch 


 Not sure is this can be done easily in wicket ?
 What would you suggest to do it the best way ?


 Thanks in advance,

 --
 Laurent


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



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


Re: [Wicket-user] ListView for navigation menu?

2005-11-02 Thread Phil Kulak
So you just need to know when the item you're rendering is the last in
the list? Well, you have access to the list (getList()) and the item
(item.getModelObject()), so it should be pretty straight forward, if
not elegant, to find out if the item is the last in the list.

On 11/1/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 Yeah, something like that could work pretty well. I think you should
 take a look at how paged lists work (package
 wicket.markup.html.navigation.paging).

 Eelco

 On 11/1/05, Stijn de Witt [EMAIL PROTECTED] wrote:
   Hi all,
 
 
   I'm a new user to Wicket. I love what I have seen so far. The HelloWorld
  example was very convincing for me to give Wicket a try!
 
 
  I am trying to create a menu to go above my pages. I have been browsing
  through the Wiki and looked at the navigation example. The navigation
  example uses borders, but before I delve into those, I thought of trying
  something else, and I wonder if you could give me some feedback on it.
 
 
  I thought I might use a ListView. I think I could add a ListView to my page
  that would contain Links to WebPages to create a simple navigation bar. I
  found some example code and HTML in the javadoc:
 
 
  A ListView holds ListItem children. Items can be re-ordered and deleted,
  either one at a time or many at a time.
 
   Example: tbody
   tr wicket:id=rows class=even
   tdspan wicket:id=idTest ID/span/td
   ...
 
 
   Though this example is about a HTML table, ListView is not at all limited
  to HTML tables. Any kind of list can be rendered using ListView.
 
   And the related Java code: add(new ListView(rows, listData)
   {
   public void populateItem(final ListItem item)
   {
   final UserDetails user =
  (UserDetails)item.getModelObject();
   item.add(new Label(id, user.getId()));
   }
   });
 
 
 
 
 
  For a navigation bar I could think of this for the HTML: div
  id=navigation
   span class=item wicket:id=navigationitems
   a wicket:id=link href=#Item/a
   span class=separator | /span
   /span
  /div
 
 
 
 
 
  But I need some way to identify the last separator in the stylesheet, so I
  can hide it. In the example the class even is used in the table row, but
  how is this updated to odd ?
 
 
  Am I on the right track here? Any suggestions,
 
 
  Greetings,
 
 
  -Stijn
 
 


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



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


Re: [Wicket-user] How to do struts-nested like form element nesting in Wicket

2005-11-02 Thread Laurent PETIT
On 11/2/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 That's easy to do in Wicket. You can nest anyway you want in your
 forms, including using listviews (though don't forget to set the
 optimizeItemRemoval property to true).

I'll try to redo the struts monkey example in wicket, in order to
really feel what it is like doing it with Wicket.

By the time : I don't really like the name of the
setOptimizeItemRemoval method, if I must use this method not only for
optimization concerns, but also for functional concerns.
Having a key feature of the view of my application relying on an
optimization algorithm (as the name of the property implies) isn't
appealing to me.

For the moment I don't have anything better to suggest, I'm just with
that feeling that playing with optimization properties in order to
allow Form nesting sounds more like a trick than like a core feature


--
Laurent


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


Re: [Wicket-user] How to do struts-nested like form element nesting in Wicket

2005-11-02 Thread Eelco Hillenius
I never liked that name either. Other people did and we settled for
it. Just the way the world works sometimes :)

Eelco


On 11/2/05, Laurent PETIT [EMAIL PROTECTED] wrote:
 On 11/2/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
  That's easy to do in Wicket. You can nest anyway you want in your
  forms, including using listviews (though don't forget to set the
  optimizeItemRemoval property to true).

 I'll try to redo the struts monkey example in wicket, in order to
 really feel what it is like doing it with Wicket.

 By the time : I don't really like the name of the
 setOptimizeItemRemoval method, if I must use this method not only for
 optimization concerns, but also for functional concerns.
 Having a key feature of the view of my application relying on an
 optimization algorithm (as the name of the property implies) isn't
 appealing to me.

 For the moment I don't have anything better to suggest, I'm just with
 that feeling that playing with optimization properties in order to
 allow Form nesting sounds more like a trick than like a core feature
 

 --
 Laurent


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



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


Re: [Wicket-user] ListView for navigation menu?

2005-11-02 Thread Eelco Hillenius
In that case, better would be to compare the current index of ListItem
(li.getIndex) with the ListView's size (lv.getViewSize()). That way
you won't have to touch the 'internal' model, and it'll work with
sizes that differ from the underlying model.

Eelco


On 11/2/05, Phil Kulak [EMAIL PROTECTED] wrote:
 So you just need to know when the item you're rendering is the last in
 the list? Well, you have access to the list (getList()) and the item
 (item.getModelObject()), so it should be pretty straight forward, if
 not elegant, to find out if the item is the last in the list.

 On 11/1/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
  Yeah, something like that could work pretty well. I think you should
  take a look at how paged lists work (package
  wicket.markup.html.navigation.paging).
 
  Eelco
 
  On 11/1/05, Stijn de Witt [EMAIL PROTECTED] wrote:
Hi all,
  
  
I'm a new user to Wicket. I love what I have seen so far. The HelloWorld
   example was very convincing for me to give Wicket a try!
  
  
   I am trying to create a menu to go above my pages. I have been browsing
   through the Wiki and looked at the navigation example. The navigation
   example uses borders, but before I delve into those, I thought of trying
   something else, and I wonder if you could give me some feedback on it.
  
  
   I thought I might use a ListView. I think I could add a ListView to my 
   page
   that would contain Links to WebPages to create a simple navigation bar. I
   found some example code and HTML in the javadoc:
  
  
   A ListView holds ListItem children. Items can be re-ordered and deleted,
   either one at a time or many at a time.
  
Example: tbody
tr wicket:id=rows class=even
tdspan wicket:id=idTest ID/span/td
...
  
  
Though this example is about a HTML table, ListView is not at all limited
   to HTML tables. Any kind of list can be rendered using ListView.
  
And the related Java code: add(new ListView(rows, listData)
{
public void populateItem(final ListItem item)
{
final UserDetails user =
   (UserDetails)item.getModelObject();
item.add(new Label(id, user.getId()));
}
});
  
  
  
  
  
   For a navigation bar I could think of this for the HTML: div
   id=navigation
span class=item wicket:id=navigationitems
a wicket:id=link href=#Item/a
span class=separator | /span
/span
   /div
  
  
  
  
  
   But I need some way to identify the last separator in the stylesheet, so I
   can hide it. In the example the class even is used in the table row, but
   how is this updated to odd ?
  
  
   Am I on the right track here? Any suggestions,
  
  
   Greetings,
  
  
   -Stijn
  
  
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App Server. Download
  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


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



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


Re: [Wicket-user] How to do struts-nested like form element nesting in Wicket

2005-11-02 Thread Juergen Donnerstag
Did you take a look at wicket-examples already? Compared to what is
explained on the page you pointed to, it is very easy in Wicket and
IMO much more flexibel.

Juergen

On 11/2/05, Laurent PETIT [EMAIL PROTECTED] wrote:
 On 11/2/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
  That's easy to do in Wicket. You can nest anyway you want in your
  forms, including using listviews (though don't forget to set the
  optimizeItemRemoval property to true).

 I'll try to redo the struts monkey example in wicket, in order to
 really feel what it is like doing it with Wicket.

 By the time : I don't really like the name of the
 setOptimizeItemRemoval method, if I must use this method not only for
 optimization concerns, but also for functional concerns.
 Having a key feature of the view of my application relying on an
 optimization algorithm (as the name of the property implies) isn't
 appealing to me.

 For the moment I don't have anything better to suggest, I'm just with
 that feeling that playing with optimization properties in order to
 allow Form nesting sounds more like a trick than like a core feature
 

 --
 Laurent


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



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


Re: [Wicket-user] How to do struts-nested like form element nesting in Wicket

2005-11-02 Thread Juergen Donnerstag
/**
 * If true, re-rendering the list view is more efficient if the window
 * doesn't get changed at all or if it gets scrolled (compared to 
paging).
 * But if you modify the listView model object, than you must manually 
call
 * listView.removeAll() in order to rebuild the ListItems.
 * If you nest a ListView in a Form, ALLWAYS set this property to true, 
as
 * otherwise validation will not work properly.
 */
private boolean optimizeItemRemoval = false;

Juergen

On 11/2/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 Did you take a look at wicket-examples already? Compared to what is
 explained on the page you pointed to, it is very easy in Wicket and
 IMO much more flexibel.

 Juergen

 On 11/2/05, Laurent PETIT [EMAIL PROTECTED] wrote:
  On 11/2/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
   That's easy to do in Wicket. You can nest anyway you want in your
   forms, including using listviews (though don't forget to set the
   optimizeItemRemoval property to true).
 
  I'll try to redo the struts monkey example in wicket, in order to
  really feel what it is like doing it with Wicket.
 
  By the time : I don't really like the name of the
  setOptimizeItemRemoval method, if I must use this method not only for
  optimization concerns, but also for functional concerns.
  Having a key feature of the view of my application relying on an
  optimization algorithm (as the name of the property implies) isn't
  appealing to me.
 
  For the moment I don't have anything better to suggest, I'm just with
  that feeling that playing with optimization properties in order to
  allow Form nesting sounds more like a trick than like a core feature
  
 
  --
  Laurent
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App Server. Download
  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 



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


Re: [Wicket-user] (off topic?)- Where is Jonathan Locke?

2005-11-02 Thread Eelco Hillenius
Kidding of course. He's doing fine. He's working on Wicket in the
background now and then, but is mostly focussing the zillion other
things he's doing with his life.

Eelco

On 11/2/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 He abducted him and threw him into a river. That bastard just got too vocal!

 On 11/2/05, Francis Amanfo [EMAIL PROTECTED] wrote:
  Haven't heared from him here since a long time. Just out of curiosity! :-)
 
   Francis
 



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


Re: [Wicket-user] (off topic?)- Where is Jonathan Locke?

2005-11-02 Thread Eelco Hillenius
He abducted him and threw him into a river. That bastard just got too vocal!

On 11/2/05, Francis Amanfo [EMAIL PROTECTED] wrote:
 Haven't heared from him here since a long time. Just out of curiosity! :-)

  Francis



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


Re: [Wicket-user] ListView for navigation menu?

2005-11-02 Thread Phil Kulak
Oh yea, that's much better.

On 11/2/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 In that case, better would be to compare the current index of ListItem
 (li.getIndex) with the ListView's size (lv.getViewSize()). That way
 you won't have to touch the 'internal' model, and it'll work with
 sizes that differ from the underlying model.

 Eelco


 On 11/2/05, Phil Kulak [EMAIL PROTECTED] wrote:
  So you just need to know when the item you're rendering is the last in
  the list? Well, you have access to the list (getList()) and the item
  (item.getModelObject()), so it should be pretty straight forward, if
  not elegant, to find out if the item is the last in the list.
 
  On 11/1/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
   Yeah, something like that could work pretty well. I think you should
   take a look at how paged lists work (package
   wicket.markup.html.navigation.paging).
  
   Eelco
  
   On 11/1/05, Stijn de Witt [EMAIL PROTECTED] wrote:
 Hi all,
   
   
 I'm a new user to Wicket. I love what I have seen so far. The 
HelloWorld
example was very convincing for me to give Wicket a try!
   
   
I am trying to create a menu to go above my pages. I have been browsing
through the Wiki and looked at the navigation example. The navigation
example uses borders, but before I delve into those, I thought of trying
something else, and I wonder if you could give me some feedback on it.
   
   
I thought I might use a ListView. I think I could add a ListView to my 
page
that would contain Links to WebPages to create a simple navigation bar. 
I
found some example code and HTML in the javadoc:
   
   
A ListView holds ListItem children. Items can be re-ordered and deleted,
either one at a time or many at a time.
   
 Example: tbody
 tr wicket:id=rows class=even
 tdspan wicket:id=idTest ID/span/td
 ...
   
   
 Though this example is about a HTML table, ListView is not at all 
limited
to HTML tables. Any kind of list can be rendered using ListView.
   
 And the related Java code: add(new ListView(rows, listData)
 {
 public void populateItem(final ListItem item)
 {
 final UserDetails user =
(UserDetails)item.getModelObject();
 item.add(new Label(id, user.getId()));
 }
 });
   
   
   
   
   
For a navigation bar I could think of this for the HTML: div
id=navigation
 span class=item wicket:id=navigationitems
 a wicket:id=link href=#Item/a
 span class=separator | /span
 /span
/div
   
   
   
   
   
But I need some way to identify the last separator in the stylesheet, 
so I
can hide it. In the example the class even is used in the table row, 
but
how is this updated to odd ?
   
   
Am I on the right track here? Any suggestions,
   
   
Greetings,
   
   
-Stijn
   
   
  
  
   ---
   SF.Net email is sponsored by:
   Tame your development challenges with Apache's Geronimo App Server. 
   Download
   it for free - -and be entered to win a 42 plasma tv or your very own
   Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App Server. Download
  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


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



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


Re: [Wicket-user] How to do struts-nested like form element nesting in Wicket

2005-11-02 Thread Laurent PETIT
Yes I did, but maybe not too deeply I assume.

I'll try and do what I'm thinking of using Wicket, and then come back
to the list with questions, if any.

It seems to me that I haven't seen something as dynamic as what can be
done with nested (and the page I pointed to was not fair about the
dynamic possibilities).

I feel that it is possible to do that with Wicket, maybe it's just I
guess there are several possibilities to do that, and I'm not sure
what the best could be, with the hypothesis of an existing domain
model hierarchy ( monkey/bunches/bananas for example).

CU,

--
Laurent

On 11/2/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 Did you take a look at wicket-examples already? Compared to what is
 explained on the page you pointed to, it is very easy in Wicket and
 IMO much more flexibel.

 Juergen

 On 11/2/05, Laurent PETIT [EMAIL PROTECTED] wrote:
  On 11/2/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
   That's easy to do in Wicket. You can nest anyway you want in your
   forms, including using listviews (though don't forget to set the
   optimizeItemRemoval property to true).
 
  I'll try to redo the struts monkey example in wicket, in order to
  really feel what it is like doing it with Wicket.
 
  By the time : I don't really like the name of the
  setOptimizeItemRemoval method, if I must use this method not only for
  optimization concerns, but also for functional concerns.
  Having a key feature of the view of my application relying on an
  optimization algorithm (as the name of the property implies) isn't
  appealing to me.
 
  For the moment I don't have anything better to suggest, I'm just with
  that feeling that playing with optimization properties in order to
  allow Form nesting sounds more like a trick than like a core feature
  
 
  --
  Laurent
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App Server. Download
  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


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



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


Re: [Wicket-user] ListView for navigation menu?

2005-11-02 Thread Stijn de Witt




Thanks for all your help! I have a basic example working now, and I am
trying to fix the last separator as per your suggestions. I put a link
object (actually a BookmarkablePageLink) in a list for every page to be
in the menu and use those in the populateItem(), like this:

<> public HomePage()
 {
 List links = new ArrayList();
 links.add(new BookmarkablePageLink("item", HomePage.class));
 links.add(new BookmarkablePageLink("item", HomePage2.class));
 add(new ListView("navigation", links)
 {
 static final long serialVersionUID = 100;
 public void populateItem(final ListItem item)
 {
 final BookmarkablePageLink link =
(BookmarkablePageLink) item.getModelObject();
 item.add(link);
 item.add(new Label("separator", " | "));
 }
 }); 

 IModel messageModel = new
Model(this.getClass().getSimpleName());
 add(new Label("message", messageModel));
 add(new MessageForm("messageInputForm", messageModel)); 
 }
and the HTML:

 div id="navigation"
 span wicket:id="navigation"
 a href="" wicket:id="item"Dummy link/a
 span wicket:id="separator" class="separator" |
/span
 /span
 /div

Only, the 'Dummy link' text is not replaced. Do I need to put a
label in the anchor to get the text there?
Like this?

 div id="navigation"
 span wicket:id="navigation"
 a href="" wicket:id="item"span
wicket:id="itemTitle"Dummy link/span/a
 span wicket:id="separator" class="separator" |
/span
 /span
 /div

If some component is not there, because I don't put in the separator
for the last item, what happens to the HTML? Or should I still put the
component in there and set it's visibility to false? 

Thanks again,

-Stijn


Phil Kulak wrote:

  Oh yea, that's much better.

On 11/2/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
  
  
In that case, better would be to compare the current index of ListItem
(li.getIndex) with the ListView's size (lv.getViewSize()). That way
you won't have to touch the 'internal' model, and it'll work with
sizes that differ from the underlying model.

Eelco


On 11/2/05, Phil Kulak [EMAIL PROTECTED] wrote:


  So you just need to know when the item you're rendering is the last in
the list? Well, you have access to the list (getList()) and the item
(item.getModelObject()), so it should be pretty straight forward, if
not elegant, to find out if the item is the last in the list.

On 11/1/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
  
  
Yeah, something like that could work pretty well. I think you should
take a look at how paged lists work (package
wicket.markup.html.navigation.paging).

Eelco

On 11/1/05, Stijn de Witt [EMAIL PROTECTED] wrote:


   Hi all,


 I'm a new user to Wicket. I love what I have seen so far. The HelloWorld
example was very convincing for me to give Wicket a try!


I am trying to create a menu to go above my pages. I have been browsing
through the Wiki and looked at the navigation example. The navigation
example uses borders, but before I delve into those, I thought of trying
something else, and I wonder if you could give me some feedback on it.


I thought I might use a ListView. I think I could add a ListView to my page
that would contain Links to WebPages to create a simple navigation bar. I
found some example code and HTML in the javadoc:


A ListView holds ListItem children. Items can be re-ordered and deleted,
either one at a time or many at a time.

 Example: tbody
 tr wicket:id="rows" class="even"
 tdspan wicket:id="id"Test ID/span/td
 ...


 Though this example is about a HTML table, ListView is not at all limited
to HTML tables. Any kind of list can be rendered using ListView.

 And the related Java code: add(new ListView("rows", listData)
 {
 public void populateItem(final ListItem item)
 {
 final UserDetails user =
(UserDetails)item.getModelObject();
 item.add(new Label("id", user.getId()));
 }
 });





For a navigation bar I could think of this for the HTML: div
id="navigation"
 span class="item" wicket:id="navigationitems"
 a wicket:id="link" href=""Item/a
 span class="separator" | /span
 /span
/div





But I need some way to identify the last separator in the stylesheet, so I
can hide it. In the example the class "even" is used in the table row, but
how is this updated to "odd" ?


Am I on the right track here? Any suggestions,


Greetings,


-Stijn


  


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


  
  
---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download

Re: [Wicket-user] (off topic?)- Where is Jonathan Locke?

2005-11-02 Thread Francis Amanfo
Good to know he hasn't backslided but still believes in Wicket!
By the way, I could see from the onestat statistics that since
yesterday you've been hitting the 1000+ visitors. Has that mostly go to
do with the web frameworks poll hosted at about.com being discussed at
theserverside.com? Great publicity for Wicket there.

FrancisOn 11/2/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
Kidding of course. He's doing fine. He's working on Wicket in thebackground now and then, but is mostly focussing the zillion otherthings he's doing with his life.EelcoOn 11/2/05, Eelco Hillenius 
[EMAIL PROTECTED] wrote: He abducted him and threw him into a river. That bastard just got too vocal! On 11/2/05, Francis Amanfo 
[EMAIL PROTECTED] wrote:  Haven't heared from him here since a long time. Just out of curiosity! :-)  Francis ---
SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Downloadit for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: 
http://sourceforge.net/geronimo.php___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] How to do struts-nested like form element nesting in Wicket

2005-11-02 Thread Eelco Hillenius
The fact that Wicket is an unmanaged framework means we put you, the
programmer, in power. If you look at nesting and the way IModel works
you are not limited in your options.

For full power, combine Forms with ListViews and Panels. With panels,
you can postpone any markup/ subcomponent decission until you actually
need it, so this gives you max flexibility (though less
previewability).

Eelco


On 11/2/05, Laurent PETIT [EMAIL PROTECTED] wrote:
 Yes I did, but maybe not too deeply I assume.

 I'll try and do what I'm thinking of using Wicket, and then come back
 to the list with questions, if any.

 It seems to me that I haven't seen something as dynamic as what can be
 done with nested (and the page I pointed to was not fair about the
 dynamic possibilities).

 I feel that it is possible to do that with Wicket, maybe it's just I
 guess there are several possibilities to do that, and I'm not sure
 what the best could be, with the hypothesis of an existing domain
 model hierarchy ( monkey/bunches/bananas for example).

 CU,

 --
 Laurent

 On 11/2/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
  Did you take a look at wicket-examples already? Compared to what is
  explained on the page you pointed to, it is very easy in Wicket and
  IMO much more flexibel.
 
  Juergen
 
  On 11/2/05, Laurent PETIT [EMAIL PROTECTED] wrote:
   On 11/2/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
That's easy to do in Wicket. You can nest anyway you want in your
forms, including using listviews (though don't forget to set the
optimizeItemRemoval property to true).
  
   I'll try to redo the struts monkey example in wicket, in order to
   really feel what it is like doing it with Wicket.
  
   By the time : I don't really like the name of the
   setOptimizeItemRemoval method, if I must use this method not only for
   optimization concerns, but also for functional concerns.
   Having a key feature of the view of my application relying on an
   optimization algorithm (as the name of the property implies) isn't
   appealing to me.
  
   For the moment I don't have anything better to suggest, I'm just with
   that feeling that playing with optimization properties in order to
   allow Form nesting sounds more like a trick than like a core feature
   
  
   --
   Laurent
  
  
   ---
   SF.Net email is sponsored by:
   Tame your development challenges with Apache's Geronimo App Server. 
   Download
   it for free - -and be entered to win a 42 plasma tv or your very own
   Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App Server. Download
  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


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



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


Re: [Wicket-user] How to do struts-nested like form element nesting in Wicket

2005-11-02 Thread Laurent PETIT
Yes,

I'm currently trying to translate the full powered version of monkey bean :
http://www.keyboardmonkey.com/StrutMonkey/monkey-action.do
( and also this slightly different version, with hide/show buttons :
http://www.keyboardmonkey.com/StrutMonkey/monkey-action-v2.do )

in Wicket.
Very interesting.

A lot of little things I don't know well about Wicket prevent me from
doing this as quickly as I hoped, but it's normal as my first try with
it, I think.

I think when I have understood how to do this with Wicket, I'll be
able to appreciate the power of nesting components.

On 11/2/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 The fact that Wicket is an unmanaged framework means we put you, the
 programmer, in power. If you look at nesting and the way IModel works
 you are not limited in your options.

 For full power, combine Forms with ListViews and Panels. With panels,
 you can postpone any markup/ subcomponent decission until you actually
 need it, so this gives you max flexibility (though less
 previewability).

 Eelco


 On 11/2/05, Laurent PETIT [EMAIL PROTECTED] wrote:
  Yes I did, but maybe not too deeply I assume.
 
  I'll try and do what I'm thinking of using Wicket, and then come back
  to the list with questions, if any.
 
  It seems to me that I haven't seen something as dynamic as what can be
  done with nested (and the page I pointed to was not fair about the
  dynamic possibilities).
 
  I feel that it is possible to do that with Wicket, maybe it's just I
  guess there are several possibilities to do that, and I'm not sure
  what the best could be, with the hypothesis of an existing domain
  model hierarchy ( monkey/bunches/bananas for example).
 
  CU,
 
  --
  Laurent
 
  On 11/2/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
   Did you take a look at wicket-examples already? Compared to what is
   explained on the page you pointed to, it is very easy in Wicket and
   IMO much more flexibel.
  
   Juergen
  
   On 11/2/05, Laurent PETIT [EMAIL PROTECTED] wrote:
On 11/2/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 That's easy to do in Wicket. You can nest anyway you want in your
 forms, including using listviews (though don't forget to set the
 optimizeItemRemoval property to true).
   
I'll try to redo the struts monkey example in wicket, in order to
really feel what it is like doing it with Wicket.
   
By the time : I don't really like the name of the
setOptimizeItemRemoval method, if I must use this method not only for
optimization concerns, but also for functional concerns.
Having a key feature of the view of my application relying on an
optimization algorithm (as the name of the property implies) isn't
appealing to me.
   
For the moment I don't have anything better to suggest, I'm just with
that feeling that playing with optimization properties in order to
allow Form nesting sounds more like a trick than like a core feature

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


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




[Wicket-user] Re: How can i get tree node detail and show in another panel

2005-11-02 Thread Alex Chew
I got the console output:

09:53:35,497 INFO [STDOUT] wicket.WicketRuntimeException: Cannot replace a component which has not been added: id='detailMsg':[Page class = wicket.examples.navtree.ContentPage, id = 1]09:53:35,497 INFO [STDOUT] at 
wicket.MarkupContainer.replace(MarkupContainer.java:508)09:53:35,497 INFO [STDOUT] at wicket.examples.navtree.MyTree.nodeLinkClicked(MyTree.java:83)09:53:35,497 INFO [STDOUT] at wicket.markup.html.tree.Tree$5.onClick
(Tree.java:716)09:53:35,497 INFO [STDOUT] at wicket.markup.html.link.Link.onLinkClicked(Link.java:183)
On 11/3/05, Alex Chew [EMAIL PROTECTED] wrote:


I tried wicket 1.1, with same code fragment, i got RunTimeException:

wicket.WicketRuntimeException: The component(s) below failed to render:
1. [Component id = detailMsg, page = wicket.examples.navtree.ContentPage, path = 1:detailMsg.Label, isVisible = true, isVersioned = true]
 at wicket.Page.checkRendering(Page.java:993) at wicket.Page.doRender(Page.java:257) at wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:218) at wicket.RequestCycle.respond( 
RequestCycle.java:869) at wicket.RequestCycle.request(RequestCycle.java:421) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:197) at javax.servlet.http.HttpServlet.service(HttpServlet.java
 :697) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
and wicket show me the component tree of the page:




#
Path
Type
Model Object


1
_body
wicket.markup.html.BodyOnLoadContainer


2
detailMsg
wicket.markup.html.basic.Label
tree node link was clicked, user object: Node1.1




It seems the model of Label detailMsg has been update, butError occured while rederingit.
I cannot find any tips from the exception stack.


I used wicket1.0.2.In my Application, i want to show a tree as navigator and detail message a=s
body.It is a parellel layout, left panel is a treeview, right is contentview. What i want is show node name in right panel when i click a tree node=.Followed the example(1.0.2) , i used two Border-left and right. In method 
nodeLinkClicked i used following code:protected void nodeLinkClicked(DefaultMutableTreeNode node){super.nodeLinkClicked(node);Page p =3D this.getPage();p.replace(new Label(detailMsg,tree node link was clicked, user object:  
+ node.getUserObject()));//NullPointerExceptionlog.info(tree node link was clicked, user object:  + node.getUserObject());}But i cannot replace the content in right border.Thanks for your advice. 



[Wicket-user] Model Serialization Question

2005-11-02 Thread Phil Kulak
Let's say I have this code on a page:

add(new Label(label1, new Model() {
   public Object getObject(Component c) {
  // Return some interesting string...
   }
});

add(new Label(label2, new Model() {
   public Object getObject(Component c) {
  // Return some other interesting string...
   }
});

will the page be serialized into two sperate bytestreams? And if
that's the case, when the page is recreated, will each model be
looking at a different page instance?


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


Re: [Wicket-user] Re: How can i get tree node detail and show in another panel

2005-11-02 Thread Igor Vaynberg
it is saying that you are trying to replace a component that hasnt been
added yet. you have to add a component before you can replace it,
otherwise you are replacing nothing.

so in your code you need to do this:
if (get(detailMsg)==null) {
 add(new label(detailMsg)) 
} else {
 replace(new Label(detailMsg...));
}


-Igor
On 11/2/05, Alex Chew [EMAIL PROTECTED] wrote:
I got the console output:

09:53:35,497 INFO [STDOUT] wicket.WicketRuntimeException:
Cannot replace a component which has not been added: id='detailMsg':[Page class = wicket.examples.navtree.ContentPage, id = 1]09:53:35,497 INFO [STDOUT] at 
wicket.MarkupContainer.replace(MarkupContainer.java:508)09:53:35,497 INFO [STDOUT] at wicket.examples.navtree.MyTree.nodeLinkClicked(MyTree.java:83)09:53:35,497 INFO [STDOUT] at wicket.markup.html.tree.Tree$5.onClick

(Tree.java:716)09:53:35,497 INFO [STDOUT] at wicket.markup.html.link.Link.onLinkClicked(Link.java:183)
On 11/3/05, Alex Chew [EMAIL PROTECTED]
 wrote:


I tried wicket 1.1, with same code fragment, i got RunTimeException:

wicket.WicketRuntimeException: The component(s) below failed to render:
1. [Component id = detailMsg, page = wicket.examples.navtree.ContentPage, path = 1:detailMsg.Label, isVisible = true, isVersioned = true]
 at wicket.Page.checkRendering(Page.java:993) at wicket.Page.doRender(Page.java:257) at wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:218) at wicket.RequestCycle.respond( 
RequestCycle.java:869) at wicket.RequestCycle.request(RequestCycle.java:421) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:197) at javax.servlet.http.HttpServlet.service(HttpServlet.java

 :697) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
and wicket show me the component tree of the page:




#
Path
Type
Model Object


1
_body
wicket.markup.html.BodyOnLoadContainer


2
detailMsg
wicket.markup.html.basic.Label
tree node link was clicked, user object: Node1.1






It seems the model of Label detailMsg has been update, butError occured while rederingit.
I cannot find any tips from the exception stack.


I used wicket1.0.2.In my Application, i want to show a tree as navigator and detail message a=
s
body.It is a parellel layout, left panel is a treeview, right is contentview. What i want is show node name in right panel when i click a tree node=.Followed the example(1.0.2) , i used two Border-left and right. In method 
nodeLinkClicked i used following code:protected void nodeLinkClicked(DefaultMutableTreeNode node){super.nodeLinkClicked(node);Page p =3D this.getPage();p.replace(new Label(detailMsg,tree node link was clicked, user object:  
+ node.getUserObject()));//NullPointerExceptionlog.info(tree node link was clicked, user object:  + node.getUserObject());}But i cannot replace the content in right border.Thanks for your advice. 





[Wicket-user] Re: How can i get tree node detail and show in another panel

2005-11-02 Thread Alex Chew

I tried wicket 1.1, with same code fragment, i got RunTimeException:

wicket.WicketRuntimeException: The component(s) below failed to render:
1. [Component id = detailMsg, page = wicket.examples.navtree.ContentPage, path = 1:detailMsg.Label, isVisible = true, isVersioned = true]
 at wicket.Page.checkRendering(Page.java:993) at wicket.Page.doRender(Page.java:257) at wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:218) at wicket.RequestCycle.respond(
RequestCycle.java:869) at wicket.RequestCycle.request(RequestCycle.java:421) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:197) at javax.servlet.http.HttpServlet.service(HttpServlet.java
:697) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
and wicket show me the component tree of the page:




#
Path
Type
Model Object


1
_body
wicket.markup.html.BodyOnLoadContainer


2
detailMsg
wicket.markup.html.basic.Label
tree node link was clicked, user object: Node1.1




It seems the model of Label detailMsg has been update, butError occured while rederingit.
I cannot find any tips from the exception stack.


I used wicket1.0.2.In my Application, i want to show a tree as navigator and detail message a=s
body.It is a parellel layout, left panel is a treeview, right is contentview. What i want is show node name in right panel when i click a tree node=.Followed the example(1.0.2) , i used two Border-left and right. In method
nodeLinkClicked i used following code:protected void nodeLinkClicked(DefaultMutableTreeNode node){super.nodeLinkClicked(node);Page p =3D this.getPage();p.replace(new Label(detailMsg,tree node link was clicked, user object: 
+ node.getUserObject()));//NullPointerExceptionlog.info(tree node link was clicked, user object:  + node.getUserObject());}But i cannot replace the content in right border.Thanks for your advice.



Re: [Wicket-user] Model Serialization Question

2005-11-02 Thread Igor Vaynberg
when you serialize from top to the bottom of the hierarchy only one instance is used.
ie. if you serialize the page both your models will point ot the same
page instance, but if you serialize the models indivudally, they will
each have a separate page instance. so if you call setModelObject and
your component is versioned, the model - since its anonymous - will
serialize the page and take up a lot of space. better use an inner
static class.

-Igor
On 11/2/05, Phil Kulak [EMAIL PROTECTED] wrote:
Let's say I have this code on a page:add(new Label(label1, new Model() { public Object getObject(Component c) {// Return some interesting string... }});add(new Label(label2, new Model() {
 public Object getObject(Component c) {// Return some other interesting string... }});will the page be serialized into two sperate bytestreams? And ifthat's the case, when the page is recreated, will each model be
looking at a different page instance?---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] Model Serialization Question

2005-11-02 Thread Phil Kulak
That's what I was afraid of.

What do you think about having a special model that Component never
serializes. Like:

new Label(id, new StaticModel() {
   ...
});

Probably not any easier then just calling setVersioned(false), but
it's more readable and less of a pain..

On 11/2/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
 when you serialize from top to the bottom of the hierarchy only one instance
 is used.
  ie. if you serialize the page both your models will point ot the same page
 instance, but if you serialize the models indivudally, they will each have a
 separate page instance. so if you call setModelObject and your component is
 versioned, the model - since its anonymous - will serialize the page and
 take up a lot of space. better use an inner static class.

  -Igor



 On 11/2/05, Phil Kulak [EMAIL PROTECTED] wrote:
 
  Let's say I have this code on a page:
 
  add(new Label(label1, new Model() {
 public Object getObject(Component c) {
// Return some interesting string...
 }
  });
 
  add(new Label(label2, new Model() {
 public Object getObject(Component c) {
// Return some other interesting string...
 }
  });
 
  will the page be serialized into two sperate bytestreams? And if
  that's the case, when the page is recreated, will each model be
  looking at a different page instance?
 
 
  ---
  SF.Net email is sponsored by:
  Tame your development challenges with Apache's Geronimo App Server.
 Download
  it for free - -and be entered to win a 42 plasma tv or your very own
  Sony(tm)PSP.  Click here to play:
 http://sourceforge.net/geronimo.php
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




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


[Wicket-user] Re: How can i get tree node detail and show in another panel

2005-11-02 Thread Alex Chew

Thanks, Igor. It resolved.

When replace a component, the path should be correct.
For my application, the Label detailMsg is child of Border navomaticBorder,
so thecode fragment must like this:

Page p = this.getPage();Label newlabel = new Label(detailMsg, Replaced);p.replace(new LayoutBorder(navomaticBorder).add(newlabel));


But there is another derived question i got.
i want to hold tree state when right panel refreshed.It seems the whole page reloaded but not just content of right panel. Must i maintain the tree state manually?

I am still trying...
thanks


[Wicket-user] populateItem

2005-11-02 Thread Paulo Sérgio Medeiros
Hi all, im new to Wicket, and a bit in java (have experience in other oo languages).I dont understand the populateItem construction. Who calls it? When? add(new ListView(rows, listData)
 { 	public void populateItem(final ListItem item) 	{ 		final UserDetails user = (UserDetails)item.getModelObject(); 		item.add(new Label(id, user.getId())); 	} });Thanks in advance,
Paulo Sergio.


Re: [Wicket-user] Model Serialization Question

2005-11-02 Thread Igor Vaynberg
but if it never serializes it how is it going to restore it?

best way to create an inner static class. this is the same problem as
the dataprovider one. If you have an anonymous sorteddataprovider
class, it will serialize the page along with itself when you change
sorting and cause out of mem error.

-Igor
On 11/2/05, Phil Kulak [EMAIL PROTECTED] wrote:
That's what I was afraid of.What do you think about having a special model that Component neverserializes. Like:new Label(id, new StaticModel() { ...});Probably not any easier then just calling setVersioned(false), but
it's more readable and less of a pain..On 11/2/05, Igor Vaynberg [EMAIL PROTECTED] wrote: when you serialize from top to the bottom of the hierarchy only one instance
 is used.ie. if you serialize the page both your models will point ot the same page instance, but if you serialize the models indivudally, they will each have a separate page instance. so if you call setModelObject and your component is
 versioned, the model - since its anonymous - will serialize the page and take up a lot of space. better use an inner static class.-Igor On 11/2/05, Phil Kulak 
[EMAIL PROTECTED] wrote:   Let's say I have this code on a page:   add(new Label(label1, new Model() { public Object getObject(Component c) {
  // Return some interesting string... }  });   add(new Label(label2, new Model() { public Object getObject(Component c) {
  // Return some other interesting string... }  });   will the page be serialized into two sperate bytestreams? And if  that's the case, when the page is recreated, will each model be
  looking at a different page instance?---  SF.Net email is sponsored by:  Tame your development challenges with Apache's Geronimo App Server.
 Download  it for free - -and be entered to win a 42 plasma tv or your very own  Sony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php
  ___  Wicket-user mailing list  Wicket-user@lists.sourceforge.net  
https://lists.sourceforge.net/lists/listinfo/wicket-user ---SF.Net email is sponsored by:Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very ownSony(tm)PSP.Click here to play: http://sourceforge.net/geronimo.php___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] populateItem

2005-11-02 Thread Igor Vaynberg
it is a callback that is used by the listview itself. It calls it for
every object in the model list. Its there so you can inject your own
functionality into the listview, in this case it is used so that you
can populate each item with your own hierarchy of components.

-Igor
On 11/2/05, Paulo Sérgio Medeiros [EMAIL PROTECTED] wrote:
Hi all, im new to Wicket, and a bit in java (have experience in other oo languages).I dont understand the populateItem construction. Who calls it? When? add(new ListView(rows, listData)
 { 	public void populateItem(final ListItem item) 	{ 		final UserDetails user = (UserDetails)item.getModelObject(); 		item.add(new Label(id, user.getId())); 	} });Thanks in advance,
Paulo Sergio.




Re: [Wicket-user] Re: How can i get tree node detail and show in another panel

2005-11-02 Thread Igor Vaynberg
im not that familiar with the tree component, so maybe someone else can answer this.

generally wicket components manage their own state, so when your page is refreshed the tree should look the same. 

-Igor
On 11/2/05, Alex Chew [EMAIL PROTECTED] wrote:

Thanks, Igor. It resolved.

When replace a component, the path should be correct.
For my application, the Label detailMsg is child of Border navomaticBorder,
so thecode fragment must like this:

Page p = this.getPage();Label newlabel = new Label(detailMsg, Replaced);p.replace(new LayoutBorder(navomaticBorder).add(newlabel));


But there is another derived question i got.
i want to hold tree state when right panel refreshed.It seems the
whole page reloaded but not just content of right panel. Must i
maintain the tree state manually?

I am still trying...
thanks




[Wicket-user] Re: TreeView and BookMarkablePage

2005-11-02 Thread Alex Chew
I found this message
http://sourceforge.net/mailarchive/message.php?msg_id=12880137

formerly, i tested this kind of solution, but couldn't work.
It seems strange,Does wicket and iframe coexist?