[Wicket-user] Download dynamic pdf via Link

2006-02-15 Thread Ingram Chen
Dear all, I would like to download iText pdf document via Link component: new Link(download) { public void onClick() { WebResponse response = (WebResponse) getResponse();
 response.setHeader(); response.setContentType(); OutputStream outputStream = response.getOutputStream(); outputStream.write(myDataBytes);
 outputStream.flush(); } } But this does not work. I search wiki but there is no information how to dothis. Could someone give me some suggestions ?-- 
Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: http://www.javaworld.com.tw/roller/page/ingramchen



Re: [Wicket-user] Post 1.2 roadmap

2006-02-15 Thread Erik van Oosten

Gili wrote:
From past experience, whenever classes require arguments in their 
constructors there is always some flexibility lost. For example, you 
absolutely cannot invoke any code before super() if you subclass such 
a class so if the value of one of the arguments needs to be calculated 
or modified in any way prior to the super() call you're out of luck.

Very true.
It was only yesterday that it took me 4 hours to debug a very small 
piece of code, only to find out that the Swing base-class called my 
overridden method from the constructor. Yikes!


Erik.



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Post 1.2 roadmap

2006-02-15 Thread Johan Compagner
How is this method any different with our current Component.setParent(), called in Component.add() Then we still don't have the parent (==page) already available in the constructor.And what does that last part (flexibility lost) have to do with adding a parent in the constructor
You just have to pass that thing through nothing more.johanOn 2/15/06, Gili [EMAIL PROTECTED]
 wrote:Instead of introducing extra arguments to the constructor, why not
simply move all this logic into a new method?That is, introduce Component.bind(Component parent). We'd benefit fromthe fact that Wicket components could become JavaBeans and method-basedbinding is more flexible than constructor-based binding.
From past experience, whenever classes require arguments in theirconstructors there is always some flexibility lost. For example, youabsolutely cannot invoke any code before super() if you subclass such a
class so if the value of one of the arguments needs to be calculated ormodified in any way prior to the super() call you're out of luck.GiliTimo Stamm wrote: Johan Compagner schrieb: that would be very hard to maintain.
 For example if you have a panel that is rewritten by using only the new parent in constructor params. And you add that in youre own webpage/panel that doesn't use that parent in
 constructor param. Then you get all kind of errors because the child panel expect to have it all but because of the hierarchy problem that we have then, he doesn't have it.
 So i do think it is all or nothing. I see, thanks for the explanation. -1 for constructor change. On 2/14/06, Timo Stamm 
[EMAIL PROTECTED] wrote: Martijn Dashorst schrieb:- constructor refactor Wow, that's a /major/ change and will probably effect every custom component and every application written using Wicket.
 I see the benefit of having a complete component hierarchy availably right at the initialization of a class. But wouldn't it suffice to just make the new constructors available, and
 put a clear statement in the API docs? Then maybe deprecate the public add() in the next major version, and drop it in 2.0 or something like that?
 This opens up a lot of better markup parsing strategies for the core. Just get rid of markup, it sucks anyway ;)
- java 5 support +1 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems?Stop!Download the new AJAX search engine that makes searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642 ___
 Wicket-user mailing list Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log
 files for problems?Stop!Download the new AJAX search engine that makes searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK! 
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642 ___ Wicket-user mailing list 
Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user--
http://www.desktopbeautifier.com/---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?Stop!Download the new AJAX search engine that makes
searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Download dynamic pdf via Link

2006-02-15 Thread Martijn Dashorst
Have you taken a look at the jasper reports project at wicket-stuff CVS? I believe that should do the trick, but I am not 100% sure.MartijnOn 2/15/06, 
Ingram Chen [EMAIL PROTECTED] wrote:
Dear all, I would like to download iText pdf document via Link component: new Link(download) { public void onClick() { WebResponse response = (WebResponse) getResponse();
 response.setHeader(); response.setContentType(); OutputStream outputStream = response.getOutputStream(); outputStream.write(myDataBytes);
 outputStream.flush(); } } But this does not work. I search wiki but there is no information how to dothis. Could someone give me some suggestions ?
-- 
Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 
http://www.javaworld.com.tw/roller/page/ingramchen


-- Living a wicket life...Martijn Dashorst - http://www.jroller.com/page/dashorstWicket 1.1.1 is out: 
http://wicket.sourceforge.net/wicket-1.1


Re: [Wicket-user] Download dynamic pdf via Link

2006-02-15 Thread Johan Compagner
that should work i think (need to test this)But why don't you use a ResourceLink with a ByteArrayResource as the resource in its constructor?johanOn 2/15/06, 
Ingram Chen [EMAIL PROTECTED] wrote:
Dear all, I would like to download iText pdf document via Link component: new Link(download) { public void onClick() { WebResponse response = (WebResponse) getResponse();
 response.setHeader(); response.setContentType(); OutputStream outputStream = response.getOutputStream(); outputStream.write(myDataBytes);
 outputStream.flush(); } } But this does not work. I search wiki but there is no information how to dothis. Could someone give me some suggestions ?
-- 
Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 
http://www.javaworld.com.tw/roller/page/ingramchen





[Wicket-user] Re: Download dynamic pdf via Link

2006-02-15 Thread Ingram Chen
I got answer:new Link(download) { public void onClick() { DynamicByteArrayResource dynamicByteArrayResource = new DynamicByteArrayResource() {}; getRequestCycle().setRequestTarget(
 new ResourceStreamRequestTarget( dynamicByteArrayResource .getResourceStream(), contentType)); WebResponse response = (WebResponse) getResponse();
 response.setHeader(Content-Disposition, attachment;filename= + myfile.pdf); response.setContentType(contentType); }};Hope this is correct way to deal with dynamic resouce.
On 2/15/06, Ingram Chen [EMAIL PROTECTED] wrote:
Dear all, I would like to download iText pdf document via Link component: new Link(download) { public void onClick() { WebResponse response = (WebResponse) getResponse();
 response.setHeader(); response.setContentType(); OutputStream outputStream = response.getOutputStream(); outputStream.write(myDataBytes);
 outputStream.flush(); } } But this does not work. I search wiki but there is no information how to dothis. Could someone give me some suggestions ?
-- 
Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 
http://www.javaworld.com.tw/roller/page/ingramchen


-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 
http://www.javaworld.com.tw/roller/page/ingramchen


Re: [Wicket-user] Re: Download dynamic pdf via Link

2006-02-15 Thread Johan Compagner
When do you generate that byte[] is it already there? when you construct the link?Then i would replace the new Link() with new ResourceLink(xx,new ByteArrayResourceStream())else yes use youre DynamicByteArrayResource.
But i still would use the ResourceLink not implement that resource streaming youreself in the onclick.johanOn 2/15/06, Ingram Chen
 [EMAIL PROTECTED] wrote:I got answer:
new Link(download) { public void onClick() { DynamicByteArrayResource dynamicByteArrayResource = new DynamicByteArrayResource() {}; getRequestCycle().setRequestTarget(
 new ResourceStreamRequestTarget( dynamicByteArrayResource .getResourceStream(), contentType)); WebResponse response = (WebResponse) getResponse();
 response.setHeader(Content-Disposition, attachment;filename= + myfile.pdf); response.setContentType(contentType); }};Hope this is correct way to deal with dynamic resouce.
On 2/15/06, Ingram Chen 
[EMAIL PROTECTED] wrote:

Dear all, I would like to download iText pdf document via Link component: new Link(download) { public void onClick() { WebResponse response = (WebResponse) getResponse();
 response.setHeader(); response.setContentType(); OutputStream outputStream = response.getOutputStream(); outputStream.write(myDataBytes);
 outputStream.flush(); } } But this does not work. I search wiki but there is no information how to dothis. Could someone give me some suggestions ?

-- 
Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 

http://www.javaworld.com.tw/roller/page/ingramchen


-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 

http://www.javaworld.com.tw/roller/page/ingramchen




Re: [Wicket-user] Download dynamic pdf via Link

2006-02-15 Thread Ingram Chen
Unfortunately, anonymous CVS now broken.. so I don't have chance to look at it.On 2/15/06, Martijn Dashorst 
[EMAIL PROTECTED] wrote:Have you taken a look at the jasper reports project at wicket-stuff CVS? I believe that should do the trick, but I am not 100% sure.
MartijnOn 2/15/06, 
Ingram Chen [EMAIL PROTECTED] wrote:

Dear all, I would like to download iText pdf document via Link component: new Link(download) { public void onClick() { WebResponse response = (WebResponse) getResponse();
 response.setHeader(); response.setContentType(); OutputStream outputStream = response.getOutputStream(); outputStream.write(myDataBytes);
 outputStream.flush(); } } But this does not work. I search wiki but there is no information how to dothis. Could someone give me some suggestions ?

-- 
Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 

http://www.javaworld.com.tw/roller/page/ingramchen


-- Living a wicket life...Martijn Dashorst - 
http://www.jroller.com/page/dashorstWicket 1.1.1 is out: 
http://wicket.sourceforge.net/wicket-1.1

-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 
http://www.javaworld.com.tw/roller/page/ingramchen


Re: [Wicket-user] Download dynamic pdf via Link

2006-02-15 Thread Ingram Chen
Yes, my first method works, but it complains that outputStream has been used when Writer try to flush buffer...On 2/15/06, Johan Compagner 
[EMAIL PROTECTED] wrote:that should work i think (need to test this)
But why don't you use a ResourceLink with a ByteArrayResource as the resource in its constructor?johanOn 2/15/06, 

Ingram Chen [EMAIL PROTECTED] wrote:

Dear all, I would like to download iText pdf document via Link component: new Link(download) { public void onClick() { WebResponse response = (WebResponse) getResponse();
 response.setHeader(); response.setContentType(); OutputStream outputStream = response.getOutputStream(); outputStream.write(myDataBytes);
 outputStream.flush(); } } But this does not work. I search wiki but there is no information how to dothis. Could someone give me some suggestions ?

-- 
Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 

http://www.javaworld.com.tw/roller/page/ingramchen




-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: http://www.javaworld.com.tw/roller/page/ingramchen



Re: [Wicket-user] Re: Download dynamic pdf via Link

2006-02-15 Thread Ingram Chen
Thanks for suggestion !I tried ResourceLink combine with DynamicByteArrayResource: resource = new DynamicByteArrayResource() {
 public String getContentType() {
 return pdfType;
 }
protected byte[] getData() {
 return myData;
 }
} ;add(new ResourceLink(download, resource) );This works too, however, I have no chance to tweak the response header to make downloadpopup a window: WebResponse response = (WebResponse) getResponse();
 response.setHeader(Content-Disposition, attachment;filename=myfile.pdf);Is there any hook in ResourceLink to do this ? I tried onClick() but it doesn't work.
On 2/15/06, Johan Compagner [EMAIL PROTECTED] wrote:
When do you generate that byte[] is it already there? when you construct the link?Then i would replace the new Link() with new ResourceLink(xx,new ByteArrayResourceStream())else yes use youre DynamicByteArrayResource.
But i still would use the ResourceLink not implement that resource streaming youreself in the onclick.johan
On 2/15/06, Ingram Chen
 [EMAIL PROTECTED] wrote:
I got answer:
new Link(download) { public void onClick() { DynamicByteArrayResource dynamicByteArrayResource = new DynamicByteArrayResource() {}; getRequestCycle().setRequestTarget(
 new ResourceStreamRequestTarget( dynamicByteArrayResource .getResourceStream(), contentType)); WebResponse response = (WebResponse) getResponse();
 response.setHeader(Content-Disposition, attachment;filename= + myfile.pdf); response.setContentType(contentType); }};Hope this is correct way to deal with dynamic resouce.
On 2/15/06, Ingram Chen 
[EMAIL PROTECTED] wrote:

Dear all, I would like to download iText pdf document via Link component: new Link(download) { public void onClick() { WebResponse response = (WebResponse) getResponse();
 response.setHeader(); response.setContentType(); OutputStream outputStream = response.getOutputStream(); outputStream.write(myDataBytes);
 outputStream.flush(); } } But this does not work. I search wiki but there is no information how to dothis. Could someone give me some suggestions ?


-- 
Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 


http://www.javaworld.com.tw/roller/page/ingramchen


-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 

http://www.javaworld.com.tw/roller/page/ingramchen



-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 
http://www.javaworld.com.tw/roller/page/ingramchen


Re: [Wicket-user] Re: Download dynamic pdf via Link

2006-02-15 Thread Johan Compagner
First i would use ByteArrayResource() and not Dynamicbecause it seems that you just return myData in getData() it is not generated at that time.for setting headers.Overwrite the protected void setHeaders(WebResponse response) of the ByteArrayResource
and you can set any headers you want.johanOn 2/15/06, Ingram Chen [EMAIL PROTECTED] wrote:
Thanks for suggestion !I tried ResourceLink combine with DynamicByteArrayResource: 
resource = new DynamicByteArrayResource() {
 public String getContentType() {
 return pdfType;
 }
protected byte[] getData() {
 return myData;
 }
} ;add(new ResourceLink(download, resource) );This works too, however, I have no chance to tweak the response header to make downloadpopup a window: WebResponse response = (WebResponse) getResponse();
 response.setHeader(Content-Disposition, attachment;filename=myfile.pdf);Is there any hook in ResourceLink to do this ? I tried onClick() but it doesn't work.

On 2/15/06, Johan Compagner [EMAIL PROTECTED] wrote:

When do you generate that byte[] is it already there? when you construct the link?Then i would replace the new Link() with new ResourceLink(xx,new ByteArrayResourceStream())else yes use youre DynamicByteArrayResource.
But i still would use the ResourceLink not implement that resource streaming youreself in the onclick.johan
On 2/15/06, Ingram Chen
 [EMAIL PROTECTED] wrote:

I got answer:
new Link(download) { public void onClick() { DynamicByteArrayResource dynamicByteArrayResource = new DynamicByteArrayResource() {}; getRequestCycle().setRequestTarget(
 new ResourceStreamRequestTarget( dynamicByteArrayResource .getResourceStream(), contentType)); WebResponse response = (WebResponse) getResponse();
 response.setHeader(Content-Disposition, attachment;filename= + myfile.pdf); response.setContentType(contentType); }};Hope this is correct way to deal with dynamic resouce.
On 2/15/06, Ingram Chen 
[EMAIL PROTECTED] wrote:

Dear all, I would like to download iText pdf document via Link component: new Link(download) { public void onClick() { WebResponse response = (WebResponse) getResponse();
 response.setHeader(); response.setContentType(); OutputStream outputStream = response.getOutputStream(); outputStream.write(myDataBytes);
 outputStream.flush(); } } But this does not work. I search wiki but there is no information how to dothis. Could someone give me some suggestions ?



-- 
Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 



http://www.javaworld.com.tw/roller/page/ingramchen


-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 

http://www.javaworld.com.tw/roller/page/ingramchen



-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwan
blog: 
http://www.javaworld.com.tw/roller/page/ingramchen




Re: [Wicket-user] Post 1.2 roadmap

2006-02-15 Thread Jesper Preuss
I know I'm not an wicket expert. But would it help to change the
constructors in wicket to factory methods?

On 2/15/06, Johan Compagner [EMAIL PROTECTED] wrote:
 How is this method any different with our current Component.setParent(),
 called in Component.add()
 Then we still don't have the parent (==page) already available in the
 constructor.

 And what does that last part (flexibility lost) have to do with adding a
 parent in the constructor
 You just have to pass that thing through nothing more.

 johan


 On 2/15/06, Gili [EMAIL PROTECTED]  wrote:
 
  Instead of introducing extra arguments to the constructor, why not
  simply move all this logic into a new method?
 
  That is, introduce Component.bind(Component parent). We'd benefit
 from
  the fact that Wicket components could become JavaBeans and method-based
  binding is more flexible than constructor-based binding.
 
  From past experience, whenever classes require arguments in their
  constructors there is always some flexibility lost. For example, you
  absolutely cannot invoke any code before super() if you subclass such a
  class so if the value of one of the arguments needs to be calculated or
  modified in any way prior to the super() call you're out of luck.
 
  Gili
 
  Timo Stamm wrote:
   Johan Compagner schrieb:
   that would be very hard to maintain.
   For example if you have a panel that is rewritten by using only the new
   parent in constructor params.
   And you add that in youre own webpage/panel that doesn't use that
   parent in
   constructor param.
   Then you get all kind of errors because the child panel expect to have
 it
   all but because of the hierarchy problem
   that we have then, he doesn't have it.
  
   So i do think it is all or nothing.
  
   I see, thanks for the explanation.
  
   -1 for constructor change.
  
  
  
   On 2/14/06, Timo Stamm  [EMAIL PROTECTED] wrote:
   Martijn Dashorst schrieb:
- constructor refactor
   Wow, that's a /major/ change and will probably effect every custom
   component and every application written using Wicket.
  
   I see the benefit of having a complete component hierarchy availably
   right at the initialization of a class.
  
   But wouldn't it suffice to just make the new constructors available,
 and
   put a clear statement in the API docs? Then maybe deprecate the public
   add() in the next major version, and drop it in 2.0 or something like
   that?
  
  
   This opens up a lot of better markup parsing strategies for
 the
   core.
   Just get rid of markup, it sucks anyway ;)
  
  
- java 5 support
   +1
  
  
  
  
  
  
  
 ---
   This SF.net email is sponsored by: Splunk Inc. Do you grep through log
   files
   for problems?  Stop!  Download the new AJAX search engine that makes
   searching your log files as easy as surfing the  web.  DOWNLOAD
 SPLUNK!
  
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
  
  
  
  
   ---
   This SF.net email is sponsored by: Splunk Inc. Do you grep through log
   files
   for problems?  Stop!  Download the new AJAX search engine that makes
   searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
  
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
  
 https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
  --
  http://www.desktopbeautifier.com/
 
 
  ---
  This SF.net email is sponsored by: Splunk Inc. Do you grep through log
 files
  for problems?  Stop!  Download the new AJAX search engine that makes
  searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: Download dynamic pdf via Link

2006-02-15 Thread Ingram Chen
This solution is much simpler ! Thanks a lot.On 2/15/06, Johan Compagner [EMAIL PROTECTED] wrote:
First i would use ByteArrayResource() and not Dynamicbecause it seems that you just return myData in getData() it is not generated at that time.
for setting headers.Overwrite the protected void setHeaders(WebResponse response) of the ByteArrayResource
and you can set any headers you want.johanOn 2/15/06, Ingram Chen 
[EMAIL PROTECTED] wrote:
Thanks for suggestion !I tried ResourceLink combine with DynamicByteArrayResource: 
resource = new DynamicByteArrayResource() {
 public String getContentType() {
 return pdfType;
 }
protected byte[] getData() {
 return myData;
 }
} ;add(new ResourceLink(download, resource) );This works too, however, I have no chance to tweak the response header to make downloadpopup a window: WebResponse response = (WebResponse) getResponse();
 response.setHeader(Content-Disposition, attachment;filename=myfile.pdf);Is there any hook in ResourceLink to do this ? I tried onClick() but it doesn't work.


On 2/15/06, Johan Compagner [EMAIL PROTECTED] wrote:


When do you generate that byte[] is it already there? when you construct the link?Then i would replace the new Link() with new ResourceLink(xx,new ByteArrayResourceStream())else yes use youre DynamicByteArrayResource.
But i still would use the ResourceLink not implement that resource streaming youreself in the onclick.johan
On 2/15/06, Ingram Chen
 [EMAIL PROTECTED] wrote:


I got answer:
new Link(download) { public void onClick() { DynamicByteArrayResource dynamicByteArrayResource = new DynamicByteArrayResource() {}; getRequestCycle().setRequestTarget(
 new ResourceStreamRequestTarget( dynamicByteArrayResource .getResourceStream(), contentType)); WebResponse response = (WebResponse) getResponse();
 response.setHeader(Content-Disposition, attachment;filename= + myfile.pdf); response.setContentType(contentType); }};Hope this is correct way to deal with dynamic resouce.
On 2/15/06, Ingram Chen 
[EMAIL PROTECTED] wrote:

Dear all, I would like to download iText pdf document via Link component: new Link(download) { public void onClick() { WebResponse response = (WebResponse) getResponse();
 response.setHeader(); response.setContentType(); OutputStream outputStream = response.getOutputStream(); outputStream.write(myDataBytes);
 outputStream.flush(); } } But this does not work. I search wiki but there is no information how to dothis. Could someone give me some suggestions ?




-- 
Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 




http://www.javaworld.com.tw/roller/page/ingramchen


-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 

http://www.javaworld.com.tw/roller/page/ingramchen



-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwan
blog: 
http://www.javaworld.com.tw/roller/page/ingramchen



-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 
http://www.javaworld.com.tw/roller/page/ingramchen


Re: [Wicket-user] Post 1.2 roadmap

2006-02-15 Thread Erik van Oosten
You have a big problem when a class depends on the behavior of a 
sub-class during construction time. This is because sub-classes are 
initialized after the initialization of the base-class. When there is no 
dependency, there is no problem.


So, although I recognize Gili's point in general, I think Johan is right 
here: just passing the thing can't be a serious problem.


 Erik.

Johan Compagner wrote:
How is this method any different with our current 
Component.setParent(), called in Component.add()
Then we still don't have the parent (==page) already available in the 
constructor.


And what does that last part (flexibility lost) have to do with adding 
a parent in the constructor

You just have to pass that thing through nothing more.

johan





---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] wicket-stuff..up-to-date with latest changes?

2006-02-15 Thread karthik Guru
I want to try wicket-stuff and wanted to have some some information upfront

wicket-contrib-groovy - what does this do?

Which one of the hibernate related project i s'd be looking at. There
are quite a few there.

wicket-contrib-scriptaculous - is this in sync with the latest ajax changes?

wicket-contrib-easywizard - is this cool? :)

thanks,
karthik


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Post 1.2 roadmap

2006-02-15 Thread Johan Compagner
urghhHow would factory methods help?and how would i use standaard factory methods to create components/panels and the like?What then when i want to construct this panel:MyPanel(Container parent, MyObject object, int size)
{}On 2/15/06, Jesper Preuss [EMAIL PROTECTED] wrote:
I know I'm not an wicket expert. But would it help to change theconstructors in wicket to factory methods?On 2/15/06, Johan Compagner [EMAIL PROTECTED] wrote:
 How is this method any different with our current Component.setParent(), called in Component.add() Then we still don't have the parent (==page) already available in the constructor.
 And what does that last part (flexibility lost) have to do with adding a parent in the constructor You just have to pass that thing through nothing more. johan On 2/15/06, Gili 
[EMAIL PROTECTED]  wrote:   Instead of introducing extra arguments to the constructor, why not  simply move all this logic into a new method?
   That is, introduce Component.bind(Component parent). We'd benefit from  the fact that Wicket components could become JavaBeans and method-based  binding is more flexible than constructor-based binding.
   >From past experience, whenever classes require arguments in their  constructors there is always some flexibility lost. For example, you  absolutely cannot invoke any code before super() if you subclass such a
  class so if the value of one of the arguments needs to be calculated or  modified in any way prior to the super() call you're out of luck.   Gili   Timo Stamm wrote:
   Johan Compagner schrieb:   that would be very hard to maintain.   For example if you have a panel that is rewritten by using only the new   parent in constructor params.
   And you add that in youre own webpage/panel that doesn't use that   parent in   constructor param.   Then you get all kind of errors because the child panel expect to have
 it   all but because of the hierarchy problem   that we have then, he doesn't have it. So i do think it is all or nothing.  
   I see, thanks for the explanation. -1 for constructor change. On 2/14/06, Timo Stamm  
[EMAIL PROTECTED] wrote:   Martijn Dashorst schrieb:  - constructor refactor   Wow, that's a /major/ change and will probably effect every custom
   component and every application written using Wicket. I see the benefit of having a complete component hierarchy availably   right at the initialization of a class.
 But wouldn't it suffice to just make the new constructors available, and   put a clear statement in the API docs? Then maybe deprecate the public
   add() in the next major version, and drop it in 2.0 or something like   that?   This opens up a lot of better markup parsing strategies for
 the   core.   Just get rid of markup, it sucks anyway ;)  - java 5 support
   +1   ---
   This SF.net email is sponsored by: Splunk Inc. Do you grep through log   files   for problems?Stop!Download the new AJAX search engine that makes
   searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!   
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642   ___   Wicket-user mailing list   
Wicket-user@lists.sourceforge.net   https://lists.sourceforge.net/lists/listinfo/wicket-user
 ---   This SF.net email is sponsored by: Splunk Inc. Do you grep through log
   files   for problems?Stop!Download the new AJAX search engine that makes   searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!  
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642   ___
   Wicket-user mailing list   Wicket-user@lists.sourceforge.net   
https://lists.sourceforge.net/lists/listinfo/wicket-user --  http://www.desktopbeautifier.com/  
  ---  This SF.net email is sponsored by: Splunk Inc. Do you grep through log files  for problems?Stop!Download the new AJAX search engine that makes
  searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!  http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
  ___  Wicket-user mailing list  Wicket-user@lists.sourceforge.net  
https://lists.sourceforge.net/lists/listinfo/wicket-user ---This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?Stop!Download the new AJAX search engine that makessearching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket-stuff..up-to-date with latest changes?

2006-02-15 Thread Martijn Dashorst
http://wicket-stuff.sourceforge.net/wicket-contrib-groovy/index.htmlOn 2/15/06, 
karthik Guru [EMAIL PROTECTED] wrote:
I want to try wicket-stuff and wanted to have some some information upfrontwicket-contrib-groovy - what does this do?Which one of the hibernate related project i s'd be looking at. Thereare quite a few there.
wicket-contrib-scriptaculous - is this in sync with the latest ajax changes?wicket-contrib-easywizard - is this cool? :)thanks,karthik---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?Stop!Download the new AJAX search engine that makessearching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
-- Living a wicket life...Martijn Dashorst - http://www.jroller.com/page/dashorstWicket 1.1.1 is out: 
http://wicket.sourceforge.net/wicket-1.1


[Wicket-user] The page you requested has expired.

2006-02-15 Thread Tom S.
When entering now the URL http://localhost:8080/foo/ after restarting my 
tomcat, I always get the message The page you requested has expired. with 
a Return to home page link to 
http://localhost:8080/foo?bookmarkablePage=com.foo.pages.Index .


What could be the reason for that? Thanks in advance.

Tom


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] MockHttpServletResponse bug

2006-02-15 Thread Ingram Chen
setHeader() method: public void setHeader(final String name, final String value) { List l = new ArrayList(1); l.add(value); headers.put(name, 
value); }should fix as headers.put(name, l);
-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: http://www.javaworld.com.tw/roller/page/ingramchen



Re: [Wicket-user] Post 1.2 roadmap

2006-02-15 Thread Gwyn Evans
This is what seems the safest to me...

- v1.2 : Stop adding features  RC/Release it :-)
- v1.3 : v1.2 + Constructor Change + /maybe/ minimal other (ajax?)
changes... (Try *really* hard not to feature-creep!)
- v2.0 : Requies Java 1.5 (Try to release sometime before Java 1.6 ships!)

/Gwyn

On 14/02/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
 Here are mine:

  The questions I'm seeking answers to are the following:
 
   - should the post 1.2 version of Wicket involve both changes?

 No. The constructor changes first, we can call it 1.3, and that
 version should be primarily just that change and some minor ones
 around it.

   - should we make different releases for either change, and thus
  postponing 1.5 to
 Wicket 3?

 Yes. If we call the constructor change Wicket 1.3, we can call the JDK
 1.5 version Wicket 2.0.

   - how many of you still require for current or future projects to run
  on JDK 1.4?
   - how many would object to having a retroweaver build of a JDK 5 Wicket, 
  which
 enables you to run 1.5 code on a 1.4 JRE?

 I agree with Igor that we should move to 1.5, and don't wait for a
 year to do it. Not everyone will be happy with it, but we'll have a
 very decent version out with 1.3 which we should support for a long
 time (by which I mean bug fixing, not so much back porting new
 features).

 Moving to 1.5 will eleminate a few of the weak features we still have
 and can't fix. As Wicket is all about Java code and strong typing, it
 sucks we can't have that strong typing in one of our major concepts
 yet - the model. With generics we can have this. I think that alone is
 worth the move, and as a lot of other frameworks - either for UI stuff
 or other purposes - already moved to 1.5, I don't think it is too
 early. We are already a year further since our first 1.5 discussions.

 Eelco


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] MockHttpServletResponse bug

2006-02-15 Thread Juergen Donnerstag
fixed.

thanks
Juergen

On 2/15/06, Ingram Chen [EMAIL PROTECTED] wrote:
 setHeader() method:

 public void setHeader(final String name, final String value)
 {
 List l = new ArrayList(1);
 l.add(value);
 headers.put(name, value);
 }

 should fix as

 headers.put(name, l);

 --
 Ingram Chen
 Java [EMAIL PROTECTED]
 Institue of BioMedical Sciences Academia Sinica Taiwan
 blog: http://www.javaworld.com.tw/roller/page/ingramchen


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] The page you requested has expired.

2006-02-15 Thread Ayodeji Aladejebi
many factors can contribute but that may be due to browser cache. did u refresh the page with refresh button
On 2/15/06, Tom S. [EMAIL PROTECTED] wrote:
When entering now the URL http://localhost:8080/foo/ after restarting my
tomcat, I always get the message The page you requested has expired. witha Return to home page link tohttp://localhost:8080/foo?bookmarkablePage=com.foo.pages.Index
 .What could be the reason for that? Thanks in advance.Tom---This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?Stop!Download the new AJAX search engine that makessearching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] The page you requested has expired.

2006-02-15 Thread Tom S.

No, I wiped my firefox caches and entered the URL manually.

Tom


Ayodeji Aladejebi schrieb:
many factors can contribute but that may be due to browser cache. did u 
refresh the page with refresh button


On 2/15/06, *Tom S.* [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote:

When entering now the URL http://localhost:8080/foo/ after
restarting my
tomcat, I always get the message The page you requested has
expired. with
a Return to home page link to
http://localhost:8080/foo?bookmarkablePage=com.foo.pages.Index
http://localhost:8080/foo?bookmarkablePage=com.foo.pages.Index .

What could be the reason for that? Thanks in advance.

Tom




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Navigation

2006-02-15 Thread Mats Norén
Hi,
I'm looking into adding a navMenu to my  application and was wondering
if there are any existing solutions out there.
What I'm interested in is a two level tabbed page navigation.

Any pointers?

/Mats


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: Retroweaver

2006-02-15 Thread Gili


	FYI, I ran this problem by the author, his reply can be found below. In 
a nutshell, it might be worth your while to investigate retroweaver-ng 
until the official branch is updated.


Gili

[EMAIL PROTECTED] wrote:
There is a project called retroweaver-ng which basically has the latest 
patches applied to Retroweaver. That's where I'd recommend people go 
until it gets re-merged back into Retroweaver's main branch.
 
As far as mysterious (ClassCast-?) exceptions go, I've never ever had 
a bug reported against Retroweaver for anything like that. Retroweaver's 
been used in all sorts of environments (including with native compilers) 
without problem. Retroweaver's been used in production all over the 
place - it's even used by Intellij.
 
I'm not denying that it's possible that Tom found a bug in it (these 
things can happen), but he'd have to send a test case to me for me to 
even be able to investigate it. Kind of annoying to hear someone be so 
disparaging about it.
 
God bless,

-Toby
 
 
-- Original message --

From: Gili [EMAIL PROTECTED]

  FYI, read below...
 
   Original Message 
  IIRC (it was a couple of months ago), it obviously did not check 1.5 API
  usages (at least not correctly) and even generics constructs caused
  mysterious (ClassCast-?) exceptions. I didn't tried it deeper, because I
  lost any trust in that tool.
 
  --
  Cheers,
  Tom
 
 
  Gili schrieb:
  
   Just curious, can you be more specific about problems with 
Retroweaver?

  
   Thanks,
   Gili
  
   Tom S. wrote:
   Java 5 support would be a really big plus
   (esp. with tools like Retrotranslator and Retroweaver) for me as 
well.

  
   We've tried Retroweaver with our desktop applications and it failed
   completely for non-trivial stuff. A few days ago I've tried
   Retrotranslator (did not know about it before) and so far I'm very
   happy with it and not had any crash.
  
   --
   Cheers,
   Tom
  
  
   Jesse Sightler wrote:
   I'm completely in favor of jumping to Wicket 2.0 and implementing 
both

   of these changes with it. Java 5 support would be a really big plus
   (esp. with tools like Retrotranslator and Retroweaver) for me as 
well.

  
   I'm sure that won't be perfect for some people, but I think it is
   reasonable to cut over now and keep a 1.2 version as a maintenance
   branch.
  
   --
   Jess
  
  
  
   On 2/13/06, Martijn Dashorst wrote:
   All,
  
   We are of course very busy finalizing Wicket 1.2, and we 
/really/ hope
   to get it done soon. This will benefit everyone. So I want to 
take a

   look beyond 1.2 and try to get some opinions on our roadmap, and
   adjust where appropiate.
  
   There are two very big things ahead of us:
   - constructor refactor
   we have reached a limit to the support we want to provide
   for Ajax and javascript. In order to provide the best support
   we need to know the markup id before it is available. Many
   have been bitten by trying to retrieve an attribute from a
   component tag in the page constructor.
   We want to remedie this by removing the add() method,
   and replacing it with an extra parameter in the component
   constructor, which sets the parent of the component.
  
   public MyPage() {
   WebMarkupContainer c = new WebMarkupContainer(foo);
   c.add(new TextField(bar1));
   c.add(new Label(bar2));
   c.add(new Label(bar3));
   add(c);
   }
  
   will become:
  
   public MyPage() {
   WebMarkupContainer c = new WebMarkupContainer(this,
   foo);
   new TextField(c, bar1);
   new Label(c, bar2);
   new Label(c, bar3);
   }
  
   This opens up a lot of better markup parsing strategies for the
   core. We know this is a major API break, but we feel it is
   necessary
   to implement it in order to move Wicket forward.
  
   - java 5 support
   This is something a lot of people are waiting for. I
   understand that
   many people want, Igor states /need/, Java 5 support in Wicket.
  
   There is also a negative side to this. Some, or even many of
   you,
   can't move to java 1.5 as a server platform. We don't know how
   many users this affects. Please give a response when you can't
   move to 1.5. As Wicket is a volunteer effort, we can only
   support
   so many projects. Supporting both a 1.4 and 1.5 project will
   drain our resources too far, and won't be possible. So we
   have to
   make a choice.
  
   The questions I'm seeking answers to are the following:
  
   - should the post 1.2 version of Wicket involve both changes?
   - should we make different releases for either change, and thus
   postponing 1.5 to
   Wicket 3?
   - how many of you still require for current or future projects 
to run

   on JDK 1.4?
   - how many would object to having a retroweaver build of a JDK 5
   Wicket, which
   enables you to run 1.5 code on a 1.4 JRE?
  
   Thanks for your answers,
  
   Martijn
  
   --
   Living a wicket life...
  
   Martijn Dashorst - http://www.jroller.com/page/dashorst
  
   Wicket 

Re: [Wicket-user] Post 1.2 roadmap

2006-02-15 Thread Igor Vaynberg
we have considered both options when figuring out the solution. we called it init() instead of bind() but it was basically the same thing.here are some advantages of a constructor over an init() method:1) constructors are atomic
2) an exception thrown from a constructor will prevent the object from being created (security)3) constructor parameters are much easier to pass. if you have a parameter that you want to pass from a constructor you would have to store it as a field so it is available in init(), this makes things really really dirty and break encapsulation.
4) constructors insure the proper order of creation. you cant have things like. Panel p1=new Panel(); p2=new Panel(); p2.init(p1) == error because p1 hasnt been initted and bound to the page yet.5) constructors, as the name implies, are used for constructing things in java.
6) constructors give component creators the ability to use the good citizen patternso in the end using construcors leads to a much more concise and clear code both for component creators and component users.
also saying things vague like its better because components can be javabeans doesnt mean much. why not give arguments as to /why/ it would be better to have components as javabeans.anyways, this is not what this thread was about. if anyone is interested in discussing any of the points above please start a different thread.
-IgorOn 2/14/06, Gili 
[EMAIL PROTECTED] wrote:
Instead of introducing extra arguments to the constructor, why notsimply move all this logic into a new method?
That is, introduce Component.bind(Component parent). We'd benefit fromthe fact that Wicket components could become JavaBeans and method-basedbinding is more flexible than constructor-based binding.
From past experience, whenever classes require arguments in theirconstructors there is always some flexibility lost. For example, youabsolutely cannot invoke any code before super() if you subclass such a
class so if the value of one of the arguments needs to be calculated ormodified in any way prior to the super() call you're out of luck.GiliTimo Stamm wrote: Johan Compagner schrieb: that would be very hard to maintain.
 For example if you have a panel that is rewritten by using only the new parent in constructor params. And you add that in youre own webpage/panel that doesn't use that parent in
 constructor param. Then you get all kind of errors because the child panel expect to have it all but because of the hierarchy problem that we have then, he doesn't have it.
 So i do think it is all or nothing. I see, thanks for the explanation. -1 for constructor change. On 2/14/06, Timo Stamm 

[EMAIL PROTECTED] wrote: Martijn Dashorst schrieb:- constructor refactor Wow, that's a /major/ change and will probably effect every custom component and every application written using Wicket.
 I see the benefit of having a complete component hierarchy availably right at the initialization of a class. But wouldn't it suffice to just make the new constructors available, and
 put a clear statement in the API docs? Then maybe deprecate the public add() in the next major version, and drop it in 2.0 or something like that?
 This opens up a lot of better markup parsing strategies for the core. Just get rid of markup, it sucks anyway ;)

- java 5 support +1 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems?Stop!Download the new AJAX search engine that makes searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!
 http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
 ___
 Wicket-user mailing list Wicket-user@lists.sourceforge.net
 
https://lists.sourceforge.net/lists/listinfo/wicket-user --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log
 files for problems?Stop!Download the new AJAX search engine that makes searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK! 

http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642 ___ Wicket-user mailing list 

Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
--
http://www.desktopbeautifier.com/---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?Stop!Download the new AJAX search engine that makes
searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___Wicket-user mailing listWicket-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] ImmediateTextField and ImmediateFeedback

2006-02-15 Thread Igor Vaynberg
have a look at the wicket-examples/ajax/Form exampleit validates the form and updates all feedback in onblur js event of all form components.-IgorOn 2/15/06, 
Ayodeji Aladejebi [EMAIL PROTECTED] wrote:
I used the ImmediateTextfield as a quick postal code lookup tool in an application but really is there a way to get an ImmediateFeedback Panel that auto refreshes based on a server callback . how can i implement that with the present release?







Re: [Wicket-user] Navigation

2006-02-15 Thread Igor Vaynberg
there is a tabbed panel in wicket-extensions. its not really a navigation tool, just a tabbed panel :)maybe that will help.-IgorOn 2/15/06, 
Mats Norén [EMAIL PROTECTED] wrote:
Hi,I'm looking into adding a navMenu to myapplication and was wonderingif there are any existing solutions out there.What I'm interested in is a two level tabbed page navigation.Any pointers?
/Mats---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?Stop!Download the new AJAX search engine that makes
searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Navigation

2006-02-15 Thread Mats Norén
Thanks, I'll take a look at it.

On 2/15/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
 there is a tabbed panel in wicket-extensions. its not really a navigation
 tool, just a tabbed panel :)

 maybe that will help.

 -Igor



 On 2/15/06, Mats Norén [EMAIL PROTECTED] wrote:
 
  Hi,
  I'm looking into adding a navMenu to my  application and was wondering
  if there are any existing solutions out there.
  What I'm interested in is a two level tabbed page navigation.
 
  Any pointers?
 
  /Mats
 
 
  ---
  This SF.net email is sponsored by: Splunk Inc. Do you grep through log
 files
  for problems?  Stop!  Download the new AJAX search engine that makes
  searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 
 http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 




---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Navigation

2006-02-15 Thread Eelco Hillenius
And there's wicket-contrib-navmenu you might want to take a look at.

Eelco


On 2/15/06, Mats Norén [EMAIL PROTECTED] wrote:
 Thanks, I'll take a look at it.

 On 2/15/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
  there is a tabbed panel in wicket-extensions. its not really a navigation
  tool, just a tabbed panel :)
 
  maybe that will help.
 
  -Igor
 
 
 
  On 2/15/06, Mats Norén [EMAIL PROTECTED] wrote:
  
   Hi,
   I'm looking into adding a navMenu to my  application and was wondering
   if there are any existing solutions out there.
   What I'm interested in is a two level tabbed page navigation.
  
   Any pointers?
  
   /Mats
  
  
   ---
   This SF.net email is sponsored by: Splunk Inc. Do you grep through log
  files
   for problems?  Stop!  Download the new AJAX search engine that makes
   searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
  
  http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 


 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
 for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] ImmediateTextField and ImmediateFeedback

2006-02-15 Thread Igor Vaynberg
you would download wicket-examples, then either start them using builtin jetty or deploy them as wargo to the main pagechoose ajax examplesi believe the last link will be Form Examplethats where it is.
-IgorOn 2/15/06, Ayodeji Aladejebi [EMAIL PROTECTED] wrote:
well i cant find that in the example archive i downloaded, could yu pls help me with a link?
On 2/15/06, Igor Vaynberg [EMAIL PROTECTED]
 wrote:
have a look at the wicket-examples/ajax/Form exampleit validates the form and updates all feedback in onblur js event of all form components.
-Igor 

On 2/15/06, Ayodeji Aladejebi [EMAIL PROTECTED]
 wrote: 

I used the ImmediateTextfield as a quick postal code lookup tool in an application but really is there a way to get an ImmediateFeedback Panel that auto refreshes based on a server callback . how can i implement that with the present release? 







[Wicket-user] Rich Text Editor

2006-02-15 Thread Ayodeji Aladejebi
Dojo toolkit comes with a Rich Text Editor, is there any plans from Wicket-Dojo-Contrib to include a Form Componoent called RichTextEditor so that we can simply:

RichTextEditor rich = new RichTextEditor(richEditor);
form.add(rich);

just curious


Re: [Wicket-user] Rich Text Editor

2006-02-15 Thread Igor Vaynberg
i cant speak for the dojo projectbut as an alternative there is wicket-contrib-tinymce in wicket-stuff-IgorOn 2/15/06, Ayodeji Aladejebi
 [EMAIL PROTECTED] wrote:Dojo toolkit comes with a Rich Text Editor, is there any plans from Wicket-Dojo-Contrib to include a Form Componoent called RichTextEditor so that we can simply:


RichTextEditor rich = new RichTextEditor(richEditor);
form.add(rich);

just curious




Re: [Wicket-user] Component model question

2006-02-15 Thread Philip A. Chapman
Frank,

I am assuming that you want to use something like the
CompoundPropertyModel?  By default, if a component does not have a
model, it searches through its component hierachy until it finds a
model.  Therefore, you should be able to just add the model to the page
and not add a model to the text boxes.

Thanks,

Frank Silbermann wrote:
 Suppose I have defined a MyPanel that contains two Wicket components:
 textBoxA and textBoxB.
  
 My page contains two instances of MyPanel - myPanel1 and myPanel2.
  
 How do I define my page's ComponentModel so that all four textboxes -
 myPanel1.textBoxA, myPanel2.textBoxA, myPanel1.textBoxB and
 myPanel2.textBoxB - can inherit their models from it?
  
 


-- 
Philip A. Chapman

Desktop and Web Application Development:
Java, .NET, PostgreSQL, MySQL, MSSQL
Linux, Windows 2000, Windows XP


signature.asc
Description: OpenPGP digital signature


[Wicket-user] PropertyModel question

2006-02-15 Thread Frank Silbermann








In Wicket 1.2, if an object has a public
variable named property but no getProperty() / setProperty()
methods, can we use the string property in constructing a
PropertyModel?



It seems that we could do this in Wicket
1.1, which used OGNL -- as OGNL mentions using a variable name if the
getters/setters are absent. However,
the JavaDoc for PropertyResolver in Wicket 1.2 does not mention finding aptly
named instance variables. Is this
an oversight in the documentation, or is this one of the infrequently used OGNL
options that was sacrificed for efficiency?










Re: [Wicket-user] PropertyModel question

2006-02-15 Thread Matej Knopp

It is possible in 1.2. Just ensure the field is public. And it should work.

Frank Silbermann wrote:
In Wicket 1.2, if an object has a public variable named “property” but 
no getProperty() / setProperty() methods, can we use the string 
“property” in constructing a PropertyModel?


 

It seems that we could do this in Wicket 1.1, which used OGNL -- as OGNL 
mentions using a variable name if the getters/setters are absent.  
However, the JavaDoc for PropertyResolver in Wicket 1.2 does not mention 
finding aptly named instance variables.  Is this an oversight in the 
documentation, or is this one of the infrequently used OGNL options that 
was sacrificed for efficiency?


 





---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PropertyModel question

2006-02-15 Thread Eelco Hillenius
I saw from the commit logs that Jonathan just removed this. Are people
using this a lot? I know it used to be possible with OGNL...

Eelco

On 2/15/06, Matej Knopp [EMAIL PROTECTED] wrote:
 It is possible in 1.2. Just ensure the field is public. And it should work.

 Frank Silbermann wrote:
  In Wicket 1.2, if an object has a public variable named property but
  no getProperty() / setProperty() methods, can we use the string
  property in constructing a PropertyModel?
 
 
 
  It seems that we could do this in Wicket 1.1, which used OGNL -- as OGNL
  mentions using a variable name if the getters/setters are absent.
  However, the JavaDoc for PropertyResolver in Wicket 1.2 does not mention
  finding aptly named instance variables.  Is this an oversight in the
  documentation, or is this one of the infrequently used OGNL options that
  was sacrificed for efficiency?
 
 
 



 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
 for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Component model question

2006-02-15 Thread Frank Silbermann








Obviously, I meant Compound Model
and not ComponentModel
/Frank



-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Frank Silbermann
Sent: Wednesday, February 15, 2006
2:16 PM
To:
wicket-user@lists.sourceforge.net
Subject: [Wicket-user] Component
model question



Suppose I have defined a
MyPanel that contains two Wicket components: textBoxA and textBoxB.



My page contains two
instances of MyPanel  myPanel1 and myPanel2.



How do I define my
pages ComponentModel so that all four textboxes 
myPanel1.textBoxA, myPanel2.textBoxA, myPanel1.textBoxB and myPanel2.textBoxB
 can inherit their models from it?










Re: [Wicket-user] Navigation

2006-02-15 Thread Mats Norén
I liked the wicket-contrib-navmenu. :)
I just have to ask a stupid question, if I want to change the look on
for instance a DataTable (or the menu in this case) do I have to
extend DataTable and add my own HTML file with the same wicket:id
attributes as the original or do I have to copy the code?

On 2/15/06, Eelco Hillenius [EMAIL PROTECTED] wrote:
 And there's wicket-contrib-navmenu you might want to take a look at.

 Eelco


 On 2/15/06, Mats Norén [EMAIL PROTECTED] wrote:
  Thanks, I'll take a look at it.
 
  On 2/15/06, Igor Vaynberg [EMAIL PROTECTED] wrote:
   there is a tabbed panel in wicket-extensions. its not really a navigation
   tool, just a tabbed panel :)
  
   maybe that will help.
  
   -Igor
  
  
  
   On 2/15/06, Mats Norén [EMAIL PROTECTED] wrote:
   
Hi,
I'm looking into adding a navMenu to my  application and was wondering
if there are any existing solutions out there.
What I'm interested in is a two level tabbed page navigation.
   
Any pointers?
   
/Mats
   
   
---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
   files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
   
   http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
 
 
  ---
  This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
  for problems?  Stop!  Download the new AJAX search engine that makes
  searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
  http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
 for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Navigation

2006-02-15 Thread Igor Vaynberg
i tried to make datatable as flexible as possible for css modifications. is there something particular you want to do that it doesnt allow?you can copy the markup, but be warned that this can be a maintenance problem because if i change the code/markup of the datatable it will break yours since ids wont match, etc.
you can copy the code if you want, but then you wont benefit from bug fixes, etc.you have to choose whichever path you think is best for your case.-IgorOn 2/15/06, 
Mats Norén [EMAIL PROTECTED] wrote:
I liked the wicket-contrib-navmenu. :)I just have to ask a stupid question, if I want to change the look onfor instance a DataTable (or the menu in this case) do I have toextend DataTable and add my own HTML file with the same wicket:id
attributes as the original or do I have to copy the code?On 2/15/06, Eelco Hillenius [EMAIL PROTECTED] wrote: And there's wicket-contrib-navmenu you might want to take a look at.
 Eelco On 2/15/06, Mats Norén [EMAIL PROTECTED] wrote:  Thanks, I'll take a look at it.   On 2/15/06, Igor Vaynberg 
[EMAIL PROTECTED] wrote:   there is a tabbed panel in wicket-extensions. its not really a navigation   tool, just a tabbed panel :)
 maybe that will help. -Igor On 2/15/06, Mats Norén 
[EMAIL PROTECTED] wrote:   Hi,I'm looking into adding a navMenu to myapplication and was wonderingif there are any existing solutions out there.
What I'm interested in is a two level tabbed page navigation.   Any pointers?   /Mats   
   ---This SF.net email is sponsored by: Splunk Inc. Do you grep through log   filesfor problems?Stop!Download the new AJAX search engine that makes
searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!  
http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
   ---  This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
  for problems?Stop!Download the new AJAX search engine that makes  searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!  
http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642  ___  Wicket-user mailing list  
Wicket-user@lists.sourceforge.net  https://lists.sourceforge.net/lists/listinfo/wicket-user  ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems?Stop!Download the new AJAX search engine that makes searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!
 http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642 ___
 Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user
---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?Stop!Download the new AJAX search engine that makes
searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] PropertyModel question

2006-02-15 Thread Johan Compagner
it should work fine.public fields are found.johanOn 2/15/06, Eelco Hillenius [EMAIL PROTECTED]
 wrote:I saw from the commit logs that Jonathan just removed this. Are people
using this a lot? I know it used to be possible with OGNL...EelcoOn 2/15/06, Matej Knopp [EMAIL PROTECTED] wrote: It is possible in 1.2. Just ensure the field is public. And it should work.
 Frank Silbermann wrote:  In Wicket 1.2, if an object has a public variable named property but  no getProperty() / setProperty() methods, can we use the string  property in constructing a PropertyModel?
 It seems that we could do this in Wicket 1.1, which used OGNL -- as OGNL  mentions using a variable name if the getters/setters are absent.  However, the JavaDoc for PropertyResolver in Wicket 
1.2 does not mention  finding aptly named instance variables.Is this an oversight in the  documentation, or is this one of the infrequently used OGNL options that  was sacrificed for efficiency?
--- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems?Stop!Download the new AJAX search engine that makes
 searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
 ___ Wicket-user mailing list Wicket-user@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/wicket-user---This SF.net email is sponsored by: Splunk Inc. Do you grep through log filesfor problems?Stop!Download the new AJAX search engine that makes
searching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


RE: [Wicket-user] Component model question

2006-02-15 Thread Frank Silbermann








Are there any guidelines written up on
building reusable components in Wicket?
Other than that one typically uses a Panel?



For example, Ive decided that I
need a panel that contains a DatePicker attached to a textbox, with a
descriptive label and a secondary label to print warnings when an inappropriate
date is selected (because this will appear on most all of my pages).



Id like to retain the flexibility
of assigning the date-textbox a model upon use of my panel, and to give the
user the option of making something happen whenever the user changes the date. For hours Ive been sitting here,
feeling like an idiot because I couldnt figure out how to do this
seemingly simple thing.



Maybe I should define a specialized model type
or interface for my Panel, so that each component inside could be instantiated
with a PropertyModel based on the Panels model. (Here, Im talking about the object
containing the actual unwrapped data  not another version of IModel). Then I could override the Date-TextBoxs
wantChangeNotifications() and onModelChanged()
methods to defer to those methods of the containing Panel -- which users of my
Panel may override.



Is this the way to do it?



Ive read so much about the ease of
abstraction in Wicket because one has all of Javas object-orientation at
ones disposal, but its certainly not obvious to me how to take
advantage of it.








[Wicket-user] DatePicker question with TextBox associated with input READONLY

2006-02-15 Thread Frank Silbermann








A DatePicker is typically attached to a TextBox. In the FormInput
example, a validator is also attached to the TextBox in case the user bypasses the DatePicker
and types in something stupid.



Could I simply attach my TextBox to an input READONLY=true
field, so that the DatePicker can set the value but data cannot be typed
in? Or will the READONLY attribute
also foil the DatePicker?








Re: [Wicket-user] DatePicker question with TextBox associated with input READONLY

2006-02-15 Thread Nick Heudecker
I typically do something like:input ... >On 2/15/06, Frank Silbermann 
[EMAIL PROTECTED] wrote:
















A DatePicker is typically attached to a TextBox. In the FormInput
example, a validator is also attached to the TextBox in case the user bypasses the DatePicker
and types in something stupid.



Could I simply attach my TextBox to an input READONLY="true"
field, so that the DatePicker can set the value but data cannot be typed
in? Or will the READONLY attribute
also foil the DatePicker?









[Wicket-user] CMS-like functionality with bookmarkable page

2006-02-15 Thread Riyad Kalla

Hey everyone,
I'm new to the users list and had a question about a certain type of 
design that I was hoping someone could shed some light on for me, I am 
most likely going about this completely bass-ackwards.


The site I'm creating operates ontop of a very basic CMS system. In the 
database the admin can create a new page that consists of a name and 
then content (straight HTML), looks like this:


page
--
name: varchar(128)
content: text


So the idea of this is to develop a single bookmarkable page, let's call 
it ContentPage, that takes a name argument and before displaying, 
loads all the appropriate content from the DB, then injects it into the 
page. So I need the ContentPage to be bookmarkable, and to avoid too 
much information in the URL, I'm using an alias (content) for it. So the 
url would look something like this:


http://mysite.com:8080/ContentPage.html?bookmarkablePage=contentname=/home

From this, I want to look at the page parameter name get the value 
/home then pickup the content from the DB and place it into the page. 
Atleast that is the idea.


I don't know if this is a down side or not, but the obvious side effect 
of this is that almost *every* page on the site is the ContentPage 
differing only by the page parameters name. As an example, here's a 
snippet of my nav bar and how the links look:


-
add(new BookmarkablePageLink(home, HomePage.class, 
createPageParameters(path, /home)));
add(new BookmarkablePageLink(projects, HomePage.class, 
createPageParameters(path, /projects)));
add(new BookmarkablePageLink(downloads, HomePage.class, 
createPageParameters(path, /downloads)));
add(new BookmarkablePageLink(about, HomePage.class, 
createPageParameters(path, /about)));
add(new BookmarkablePageLink(contact, HomePage.class, 
createPageParameters(path, /contact)));

-
***createPageParameters just wraps the values in a PP and returns it***

So the problem I'm having is that any time I click any of my links in my 
page:


--
a wicket:id=homeHome/a
a wicket:id=projectsProjects/a
a wicket:id=downloadsDownloads/a
a wicket:id=aboutAbout/a
a wicket:id=contactContact/a
--

I get a Page Expired error. For example, clicking downloads my URL 
changes correctly to:

http://localhost:8080/kallasoft/ContentPage.html?bookmarkablePage=contentpath=%2Fdownloads

but I'm seeing a PageExpired. I'm betting this has to do with the fact 
that every page in my site is really the same page, but I don't 
understand the mechanics behind this and why it's barfing. Any help 
understanding this would be great, or pointing out if I'm doing 
something awful and possibly another way of addressing this.


Best wishes,
Riyad


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Post 1.2 roadmap

2006-02-15 Thread Jesse Sightler
Yes, it uses concurrent-backport.On 2/14/06, Mark Derricutt [EMAIL PROTECTED] wrote:
On 2/15/06, Jesse Sightler [EMAIL PROTECTED] wrote:

Actually, the really nice thing about Retrotranslator (as opposed to Retroweaver) is that it does support quite a few of the new Java 1.5 APIs. java.util.concurrent and StringBuilder are both supported.

Interesting - does it make use of the concurrent-backport and map the bytecode over?-- i like my video games - mamma said they are gonna melt my brains
i like my video games - i don't care what daddy said; they're my reality
- henning pauly




Re: [Wicket-user] Re: Simplest way to change Date format

2006-02-15 Thread karthik Guru
Is there a way to register a converter for a type globally.
Something like use -
com.converter.PhoneConverter if the underlying model object is of type
com.model.PhoneNumber.


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: Simplest way to change Date format

2006-02-15 Thread karthik Guru
ok looks like this -

wicket.util.convert.Converter.set(final Class c, final ITypeConverter converter)

passing in PhoneNumber and PhoneNumberConverter?

shoud work?

- karthik


On 2/16/06, karthik Guru [EMAIL PROTECTED] wrote:
 Is there a way to register a converter for a type globally.
 Something like use -
 com.converter.PhoneConverter if the underlying model object is of type
 com.model.PhoneNumber.



--
 - karthik


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: Simplest way to change Date format

2006-02-15 Thread Eelco Hillenius
Please see: http://wicket-wiki.org.uk/wiki/index.php/Using_custom_converters

Eelco

On 2/15/06, karthik Guru [EMAIL PROTECTED] wrote:
 ok looks like this -

 wicket.util.convert.Converter.set(final Class c, final ITypeConverter 
 converter)

 passing in PhoneNumber and PhoneNumberConverter?

 shoud work?

 - karthik


 On 2/16/06, karthik Guru [EMAIL PROTECTED] wrote:
  Is there a way to register a converter for a type globally.
  Something like use -
  com.converter.PhoneConverter if the underlying model object is of type
  com.model.PhoneNumber.
 


 --
  - karthik


 ---
 This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
 for problems?  Stop!  Download the new AJAX search engine that makes
 searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
 http://sel.as-us.falkag.net/sel?cmdlnkkid3432bid#0486dat1642
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Re: [Wicket-autocvs] wicket/src/java/wicket/util/collections ArrayListStack.java,NONE,1.1

2006-02-15 Thread Gili


	Forgive me for pointing this out but ArrayList in the JDK is *not* 
synchronized. As well, you can initialize its initial size just fine 
using the constructor. Was there another reason for using ArrayListStack 
over ArrayList which was not mentioned in the CVS commit log?


Gili

Jonathan Locke wrote:

Update of /cvsroot/wicket/wicket/src/java/wicket/util/collections
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17559/src/java/wicket/util/collections

Added Files:
	ArrayListStack.java 
Log Message:

Created ArrayListStack subclass of ArrayList which is more efficient and 
capable of initializing with an initial capacity.  Removed TODO regarding 
performance in request cycle.

--- NEW FILE: ArrayListStack.java ---
/*
 * $Id: ArrayListStack.java,v 1.1 2006/02/14 20:47:36 jonathanlocke Exp $
 * $Revision: 1.1 $ $Date: 2006/02/14 20:47:36 $
 * 
 * ==

 * Licensed under the Apache License, Version 2.0 (the License); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software

 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package wicket.util.collections;

import java.util.ArrayList;
import java.util.Collection;
import java.util.EmptyStackException;

/**
 * A faster, smaller stack implementation. ArrayListStack is final and
 * unsynchronized (the JDK's methods are synchronized). In addition you can set
 * the initial capacity if you want via the ArrayListStack(int) constructor.
 * 
 * @author Jonathan Locke

 */
public final class ArrayListStack extends ArrayList
{
private static final long serialVersionUID = 1L;

/**
 * Construct.
	 * 
	 * @param initialCapacity

 *Initial capacity of the stack
 */
public ArrayListStack(int initialCapacity)
{
super(initialCapacity);
}

/**
 * Construct.
 */
public ArrayListStack()
{
this(10);
}

/**
 * Construct.
	 * 
	 * @param collection

 *The collection to add
 */
public ArrayListStack(Collection collection)
{
super(collection);
}

/**
 * Pushes an item onto the top of this stack.
	 * 
	 * @param item

 *the item to be pushed onto this stack.
 */
public void push(Object item)
{
add(item);
}

/**
 * Removes the object at the top of this stack and returns that object.
	 * 
	 * @return The object at the top of this stack

 * @exception EmptyStackException
 *If this stack is empty.
 */
public Object pop()
{
final Object top = peek();
remove(size() - 1);
return top;
}

/**
 * Looks at the object at the top of this stack without removing it.
	 * 
	 * @return The object at the top of this stack

 * @exception EmptyStackException
 *If this stack is empty.
 */
public Object peek()
{
int size = size();
if (size == 0)
{
throw new EmptyStackException();
}
return get(size - 1);
}

/**
 * Tests if this stack is empty.
	 * 
	 * @return codetrue/code if and only if this stack contains no items;

 * codefalse/code otherwise.
 */
public boolean empty()
{
return size() == 0;
}

/**
 * Returns the 1-based position where an object is on this stack. If the
 * object tto/tt occurs as an item in this stack, this method 
returns
 * the distance from the top of the stack of the occurrence nearest the 
top
 * of the stack; the topmost item on the stack is considered to be at
 * distance tt1/tt. The ttequals/tt method is used to compare
 * tto/tt to the items in this stack.
	 * 
	 * @param o

 *the desired object.
 * @return the 1-based position from the top of the stack where the 
object
 * is located; the return value code-1/code indicates that 
the
 * object is not on the stack.
 */
public int search(Object o)
{
int i = lastIndexOf(o);
if (i = 0)
{
return size() - i;
}
return -1;
}
}




[Wicket-user] Re: [Wicket-autocvs] wicket/src/java/wicket/util/collections ArrayListStack.java,NONE,1.1

2006-02-15 Thread Eelco Hillenius
That class is a replacement for java.util.Stack, which is based on
synchronized java.util.Vector. You didn't get the point of the
replacement.

Eelco


On 2/15/06, Gili [EMAIL PROTECTED] wrote:

 Forgive me for pointing this out but ArrayList in the JDK is *not*
 synchronized. As well, you can initialize its initial size just fine
 using the constructor. Was there another reason for using ArrayListStack
 over ArrayList which was not mentioned in the CVS commit log?

 Gili

 Jonathan Locke wrote:
  Update of /cvsroot/wicket/wicket/src/java/wicket/util/collections
  In directory 
  sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17559/src/java/wicket/util/collections
 
  Added Files:
ArrayListStack.java
  Log Message:
  Created ArrayListStack subclass of ArrayList which is more efficient and 
  capable of initializing with an initial capacity.  Removed TODO regarding 
  performance in request cycle.
 
  --- NEW FILE: ArrayListStack.java ---
  /*
   * $Id: ArrayListStack.java,v 1.1 2006/02/14 20:47:36 jonathanlocke Exp $
   * $Revision: 1.1 $ $Date: 2006/02/14 20:47:36 $
   *
   * 
  ==
   * Licensed under the Apache License, Version 2.0 (the License); you may 
  not
   * use this file except in compliance with the License. You may obtain a 
  copy of
   * the License at
   *
   * http://www.apache.org/licenses/LICENSE-2.0
   *
   * Unless required by applicable law or agreed to in writing, software
   * distributed under the License is distributed on an AS IS BASIS, WITHOUT
   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
   * License for the specific language governing permissions and limitations 
  under
   * the License.
   */
  package wicket.util.collections;
 
  import java.util.ArrayList;
  import java.util.Collection;
  import java.util.EmptyStackException;
 
  /**
   * A faster, smaller stack implementation. ArrayListStack is final and
   * unsynchronized (the JDK's methods are synchronized). In addition you can 
  set
   * the initial capacity if you want via the ArrayListStack(int) constructor.
   *
   * @author Jonathan Locke
   */
  public final class ArrayListStack extends ArrayList
  {
private static final long serialVersionUID = 1L;
 
/**
 * Construct.
 *
 * @param initialCapacity
 *Initial capacity of the stack
 */
public ArrayListStack(int initialCapacity)
{
super(initialCapacity);
}
 
/**
 * Construct.
 */
public ArrayListStack()
{
this(10);
}
 
/**
 * Construct.
 *
 * @param collection
 *The collection to add
 */
public ArrayListStack(Collection collection)
{
super(collection);
}
 
/**
 * Pushes an item onto the top of this stack.
 *
 * @param item
 *the item to be pushed onto this stack.
 */
public void push(Object item)
{
add(item);
}
 
/**
 * Removes the object at the top of this stack and returns that 
  object.
 *
 * @return The object at the top of this stack
 * @exception EmptyStackException
 *If this stack is empty.
 */
public Object pop()
{
final Object top = peek();
remove(size() - 1);
return top;
}
 
/**
 * Looks at the object at the top of this stack without removing it.
 *
 * @return The object at the top of this stack
 * @exception EmptyStackException
 *If this stack is empty.
 */
public Object peek()
{
int size = size();
if (size == 0)
{
throw new EmptyStackException();
}
return get(size - 1);
}
 
/**
 * Tests if this stack is empty.
 *
 * @return codetrue/code if and only if this stack contains no 
  items;
 * codefalse/code otherwise.
 */
public boolean empty()
{
return size() == 0;
}
 
/**
 * Returns the 1-based position where an object is on this stack. If 
  the
 * object tto/tt occurs as an item in this stack, this method 
  returns
 * the distance from the top of the stack of the occurrence nearest 
  the top
 * of the stack; the topmost item on the stack is considered to be at
 * distance tt1/tt. The ttequals/tt method is used to compare
 * tto/tt to the items in this stack.
 *
 * @param o
 *the desired object.
 * @return the 1-based position from the top of 

Re: [Wicket-user] Post 1.2 roadmap

2006-02-15 Thread Gili


Replies below...

Igor Vaynberg wrote:
we have considered both options when figuring out the solution. we 
called it init() instead of bind() but it was basically the same thing.


here are some advantages of a constructor over an init() method:

1) constructors are atomic


	Wicket components have always been thread-unsafe by design, so I fail 
to see how this is relevant. Do you plan on sharing Wicket components 
across threads anytime soon? Just define Component.isInit() and set it 
to true if a component has been initialized, and prevent 
double-initialization.


2) an exception thrown from a constructor will prevent the object from 
being created (security)


	Correct me if I'm wrong (you probably know more about this issue than 
me) but isn't the real security concern whether or not the Component may 
be rendered as opposed to whether or not it may be constructed? For 
example, normal users do not have admin access, so they should not be 
able to visit admin-only WebPages. You could enforce this security check 
at render time.


3) constructor parameters are much easier to pass. if you have a 
parameter that you want to pass from a constructor you would have to 
store it as a field so it is available in init(), this makes things 
really really dirty and break encapsulation.


	I think that is subjective. All JavaBeans work this way (if you need to 
use a variable later on, you are forced to store it as a field) but this 
has never bothered me. I already do this kind of thing with Wicket when 
I need a variable at render time (this happens quite often). In my view, 
this is no more ugly.


4) constructors insure the proper order of creation. you cant have 
things like. Panel p1=new Panel(); p2=new Panel(); p2.init(p1) == error 
because p1 hasnt been initted and bound to the page yet.


	The situation you describe exists with the current implementation (i.e. 
this is nothing new). IMHO this is common sense. I don't think anyone 
would find it confusing.


5) constructors, as the name implies, are used for constructing things 
in java.


	Right, but we're not constructing, we're binding. A WebPage floating in 
space is just fine. You should be able to use a constructor to create 
such an instance. Using Swing as an example (since Wicket is based upon 
it), you often create a component using a constructor and bind it using 
add() or setParent().


6) constructors give component creators the ability to use the good 
citizen pattern


so in the end using construcors leads to a much more concise and clear 
code both for component creators and component users.


also saying things vague like its better because components can be 
javabeans doesnt mean much. why not give arguments as to /why/ it would 
be better to have components as javabeans.


	For one, many frameworks play very nicely with JavaBeans. If Wicket 
components were beans we could seamlessly plug them into things like 
XMLEncoder and the various bean APIs that manipulate them.


anyways, this is not what this thread was about. if anyone is interested 
in discussing any of the points above please start a different thread.


	This discussion is regarding whether or not we should be passing the 
parent into the constructor as opposed to the current add() mechanism. I 
would argue that the current discussion is quite relevant in that we are 
trying to give our feedback on this proposal. I'm not arguing against 
the existence of constructors just for the sake of argument.


Gili


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Re: [Wicket-autocvs] wicket/src/java/wicket/util/collections ArrayListStack.java,NONE,1.1

2006-02-15 Thread Gili


My apologies. Thank you for the clarification.

Gili

Eelco Hillenius wrote:

That class is a replacement for java.util.Stack, which is based on
synchronized java.util.Vector. You didn't get the point of the
replacement.

Eelco


On 2/15/06, Gili [EMAIL PROTECTED] wrote:

Forgive me for pointing this out but ArrayList in the JDK is *not*
synchronized. As well, you can initialize its initial size just fine
using the constructor. Was there another reason for using ArrayListStack
over ArrayList which was not mentioned in the CVS commit log?

Gili

Jonathan Locke wrote:

Update of /cvsroot/wicket/wicket/src/java/wicket/util/collections
In directory 
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17559/src/java/wicket/util/collections

Added Files:
  ArrayListStack.java
Log Message:
Created ArrayListStack subclass of ArrayList which is more efficient and 
capable of initializing with an initial capacity.  Removed TODO regarding 
performance in request cycle.

--- NEW FILE: ArrayListStack.java ---
/*
 * $Id: ArrayListStack.java,v 1.1 2006/02/14 20:47:36 jonathanlocke Exp $
 * $Revision: 1.1 $ $Date: 2006/02/14 20:47:36 $
 *
 * 
==
 * Licensed under the Apache License, Version 2.0 (the License); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package wicket.util.collections;

import java.util.ArrayList;
import java.util.Collection;
import java.util.EmptyStackException;

/**
 * A faster, smaller stack implementation. ArrayListStack is final and
 * unsynchronized (the JDK's methods are synchronized). In addition you can set
 * the initial capacity if you want via the ArrayListStack(int) constructor.
 *
 * @author Jonathan Locke
 */
public final class ArrayListStack extends ArrayList
{
  private static final long serialVersionUID = 1L;

  /**
   * Construct.
   *
   * @param initialCapacity
   *Initial capacity of the stack
   */
  public ArrayListStack(int initialCapacity)
  {
  super(initialCapacity);
  }

  /**
   * Construct.
   */
  public ArrayListStack()
  {
  this(10);
  }

  /**
   * Construct.
   *
   * @param collection
   *The collection to add
   */
  public ArrayListStack(Collection collection)
  {
  super(collection);
  }

  /**
   * Pushes an item onto the top of this stack.
   *
   * @param item
   *the item to be pushed onto this stack.
   */
  public void push(Object item)
  {
  add(item);
  }

  /**
   * Removes the object at the top of this stack and returns that object.
   *
   * @return The object at the top of this stack
   * @exception EmptyStackException
   *If this stack is empty.
   */
  public Object pop()
  {
  final Object top = peek();
  remove(size() - 1);
  return top;
  }

  /**
   * Looks at the object at the top of this stack without removing it.
   *
   * @return The object at the top of this stack
   * @exception EmptyStackException
   *If this stack is empty.
   */
  public Object peek()
  {
  int size = size();
  if (size == 0)
  {
  throw new EmptyStackException();
  }
  return get(size - 1);
  }

  /**
   * Tests if this stack is empty.
   *
   * @return codetrue/code if and only if this stack contains no items;
   * codefalse/code otherwise.
   */
  public boolean empty()
  {
  return size() == 0;
  }

  /**
   * Returns the 1-based position where an object is on this stack. If the
   * object tto/tt occurs as an item in this stack, this method returns
   * the distance from the top of the stack of the occurrence nearest the 
top
   * of the stack; the topmost item on the stack is considered to be at
   * distance tt1/tt. The ttequals/tt method is used to compare
   * tto/tt to the items in this stack.
   *
   * @param o
   *the desired object.
   * @return the 1-based position from the top of the stack where the object
   * is located; the return value code-1/code indicates that the
   * object is not on the stack.
   */
  public int search(Object o)
  {
 

Re: [Wicket-user] Post 1.2 roadmap

2006-02-15 Thread Eelco Hillenius
  1) constructors are atomic

 Wicket components have always been thread-unsafe by design, so I fail
 to see how this is relevant. Do you plan on sharing Wicket components
 across threads anytime soon? Just define Component.isInit() and set it
 to true if a component has been initialized, and prevent
 double-initialization.

Atomic != threadsafe. See http://en.wikipedia.org/wiki/Atomicity.

Either a component's construction completes including the parents it
is added, or not. One of the side effects of the add method is that
the hierarchical position of the component is postponed until it is
added to a parent, and even then the action is not complete, as those
components might still need to be added to their parents.

  2) an exception thrown from a constructor will prevent the object from
  being created (security)

 Correct me if I'm wrong (you probably know more about this issue than
 me) but isn't the real security concern whether or not the Component may
 be rendered as opposed to whether or not it may be constructed? For
 example, normal users do not have admin access, so they should not be
 able to visit admin-only WebPages. You could enforce this security check
 at render time.

It's just the concept of fail early. It is generally a good idea in
programming to fail as early as possible if you know you are going to
fail. Objects might be expensive to create etc.

  3) constructor parameters are much easier to pass. if you have a
  parameter that you want to pass from a constructor you would have to
  store it as a field so it is available in init(), this makes things
  really really dirty and break encapsulation.

 I think that is subjective. All JavaBeans work this way (if you need 
 to
 use a variable later on, you are forced to store it as a field) but this
 has never bothered me. I already do this kind of thing with Wicket when
 I need a variable at render time (this happens quite often). In my view,
 this is no more ugly.

If you want to tighten things up and force users of your class to
provide it's dependencies at construction time, requiring constructor
arguments is a robust technique. This is not a new concept, and even
has been one of the main battle arguments in the constructor vs
property dependency IoC camp. We don't have to join that discussion
though, as we are not building a managed IoC framework.

  4) constructors insure the proper order of creation. you cant have
  things like. Panel p1=new Panel(); p2=new Panel(); p2.init(p1) == error
  because p1 hasnt been initted and bound to the page yet.

 The situation you describe exists with the current implementation 
 (i.e.
 this is nothing new). IMHO this is common sense. I don't think anyone
 would find it confusing.

I made mistakes with it. Why wouldn't anyone else? Furthermore, lots
of times you don't own the whole component creation code, giving rise
to more uncertainties.


  5) constructors, as the name implies, are used for constructing things
  in java.

 Right, but we're not constructing, we're binding. A WebPage floating 
 in
 space is just fine. You should be able to use a constructor to create
 such an instance. Using Swing as an example (since Wicket is based upon
 it), you often create a component using a constructor and bind it using
 add() or setParent().

As we want component creation and setting of parents to be atomic, we
are not merely binding. A component floating into space has problems,
particalarly if you depend on its place in the hierarchy in the
constructor. This is not just theory. People are having troubles with
this, especially when it comes to ajax/ javascript integration and
component interaction.

 This discussion is regarding whether or not we should be passing the
 parent into the constructor as opposed to the current add() mechanism. I
 would argue that the current discussion is quite relevant in that we are
 trying to give our feedback on this proposal. I'm not arguing against
 the existence of constructors just for the sake of argument.

No 'we' (the committers) decided on using the constructor pattern and
were asking you about your opinion as to when this should be
implement. Or actually, whether this change should be made together
with the move to JDK 5. Here is what Martijn asked:

quote
The questions I'm seeking answers to are the following:
 - should the post 1.2 version of Wicket involve both changes?
 - should we make different releases for either change, and thus
postponing 1.5 to
  Wicket 3?
 - how many of you still require for current or future projects to run
on JDK 1.4?
 - how many would object to having a retroweaver build of a JDK 5 Wicket, which
  enables you to run 1.5 code on a 1.4 JRE?
/quote

Eelco


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy 

Re: [Wicket-user] Post 1.2 roadmap

2006-02-15 Thread Igor Vaynberg
first of all we have already decided that this is going to happen. there was a vote and it passed. this is what the original posting by martijn implied, he asked for /when/ not /how/.second of all i asked you to not post any discussion of this to this thread, i really dont understand why this is so difficult. can you not follow simple directions? why do you add noise to what already is a busy thread? why should people who are interested in the outcome of this thread waste their time reading your off topic posts.
my better judgement tells me to ignore your replies and not add any noise myself. but i am affraid that course of action is too implicit for you to understand, so i am making it very explicit hoping that the noise can stop at this. 
you are more then welcome to reply to this if you have anything further to say, but pelase do it in another thread.thank you,-IgorOn 2/15/06, 
Gili [EMAIL PROTECTED] wrote:
Replies below...Igor Vaynberg wrote: we have considered both options when figuring out the solution. we called it init() instead of bind() but it was basically the same thing.
 here are some advantages of a constructor over an init() method: 1) constructors are atomicWicket components have always been thread-unsafe by design, so I failto see how this is relevant. Do you plan on sharing Wicket components
across threads anytime soon? Just define Component.isInit() and set itto true if a component has been initialized, and preventdouble-initialization. 2) an exception thrown from a constructor will prevent the object from
 being created (security)Correct me if I'm wrong (you probably know more about this issue thanme) but isn't the real security concern whether or not the Component maybe rendered as opposed to whether or not it may be constructed? For
example, normal users do not have admin access, so they should not beable to visit admin-only WebPages. You could enforce this security checkat render time. 3) constructor parameters are much easier to pass. if you have a
 parameter that you want to pass from a constructor you would have to store it as a field so it is available in init(), this makes things really really dirty and break encapsulation.I think that is subjective. All JavaBeans work this way (if you need to
use a variable later on, you are forced to store it as a field) but thishas never bothered me. I already do this kind of thing with Wicket whenI need a variable at render time (this happens quite often). In my view,
this is no more ugly. 4) constructors insure the proper order of creation. you cant have things like. Panel p1=new Panel(); p2=new Panel(); p2.init(p1) == error because p1 hasnt been initted and bound to the page yet.
The situation you describe exists with the current implementation (i.e.this is nothing new). IMHO this is common sense. I don't think anyonewould find it confusing. 5) constructors, as the name implies, are used for constructing things
 in java.Right, but we're not constructing, we're binding. A WebPage floating inspace is just fine. You should be able to use a constructor to createsuch an instance. Using Swing as an example (since Wicket is based upon
it), you often create a component using a constructor and bind it usingadd() or setParent(). 6) constructors give component creators the ability to use the good citizen pattern so in the end using construcors leads to a much more concise and clear
 code both for component creators and component users. also saying things vague like its better because components can be javabeans doesnt mean much. why not give arguments as to /why/ it would
 be better to have components as javabeans.For one, many frameworks play very nicely with JavaBeans. If Wicketcomponents were beans we could seamlessly plug them into things likeXMLEncoder and the various bean APIs that manipulate them.
 anyways, this is not what this thread was about. if anyone is interested in discussing any of the points above please start a different thread.This discussion is regarding whether or not we should be passing the
parent into the constructor as opposed to the current add() mechanism. Iwould argue that the current discussion is quite relevant in that we aretrying to give our feedback on this proposal. I'm not arguing against
the existence of constructors just for the sake of argument.Gili---This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?Stop!Download the new AJAX search engine that makessearching your log files as easy as surfing theweb.DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user