[Wicket-user] Re: Updating a model using DropDownChoice

2005-11-23 Thread Anders Peterson
This bug is easy to work around, but it affects how you code at a very 
low/basic level. When is the next maintenace release scheduled? /Anders


Johan Compagner wrote:

ok i think i have fixed it. Must check it out but now you can do
setModelObject on youre root component:

if (!getComparator().compareValue(this, object))
{
modelChanging();

if (getFlag(FLAG_HAS_ROOT_MODEL))
{
getRootModel(model).setObject(null, object);
}
else
{
model.setObject(this, object);
}
modelChanged();
}
return this;

johan


On 11/23/05, Johan Compagner [EMAIL PROTECTED] wrote:


That is a bug.
for example Component.getModelObject() does this:

// If this component has the root model for a compound model
if (getFlag(FLAG_HAS_ROOT_MODEL))
{
// we need to return the root model and not a property of the
// model
Object result = getRootModel(model);
if ((result instanceof IModel))
{
result = ((IModel)result).getObject(null);
}
return result;
}

// Get model value for this component
return model.getObject(this);

and setModelObject()

modelChanging();
model.setObject(this, object);
modelChanged();

Thats wrong. It should be the same kind of check for that setObject()
And call it will null if it is the root model of itself instead of giving
this with the call.

johan

On 11/22/05, Christian Essl [EMAIL PROTECTED] wrote:


On Tue, 22 Nov 2005 16:10:23 +0100, Anders Peterson
[EMAIL PROTECTED] wrote:



Hi,

There are a couple of things I don't understand.

1) I have a form using a CompoundPropertyModel with a HashMap as the
initial model object. When I later (after having made a choice in a
DropDownChoice) call

this.getForm().setModelObject(aNewModelObject);

nothing in the gui is updated. Typically I have components declared


like


tmpForm.add(new TextField(ID_SPAN));

that I'd like to have updated.



Component.setModelObject (Object obj) does call IModel.setObject
(this,obj).
The CompountPropertyModel than takes the id of the component and
interprets it as a bean expression into the underlying Object (or in
case
the the CoumpoundPropertyModel wraps another model the Object from the
wrapped model).

So in your case:
==form.setModelObject(aNew)==CompoundPropModel.setObject(form,aNew)==
map.put(form.getId(),aNew);

There are a few solutions (and others):
1.) keep the underlying map in an instance variable und access it (in
case
you do not use
detachable things).
2.) use form.getModel().setObject(null,new Map())


--
http://ojalgo.org/

Mathematics, Linear Algebra and Optimisation with Java


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] Upload Progress bar

2005-11-23 Thread Andrew Lombardi
I've got a need to show an Upload progress bar in a Wicket app that  
I've built.  We're uploading some fairly large files and would like  
to see some statuses.  Figured out with Igor how to go about  
injecting a CountingInputStream into the process for FileUpload, but  
have run into a roadblock!


What ends up happening, is the page runs a javascript, to show  
another page that meta refreshes and shows a status grabbed from the  
session.  And at the same time submits the form to start the upload.   
Only problem is, it seems to block on the form submission  uploading  
the file, and never shows the status page until after its done  
processing the form.  Obviously too late.


Igor mentioned that this was probably because Wicket synchronizes  
with the session.  And we both think there must be a way around this  
that is missing.


the code I have overrides:

protected WebRequest newWebRequest(HttpServletRequest servletRequest)

and then subclasses ServletWebRequest offering a wrapped  
MultipartServletWebRequest which passes back a custom FileItem that  
wraps the InputStream in a CountingInputStream, that in turn updates  
the Session.  Whew!  That was long.


Ideas and thoughts?

Thanks!



---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Adding Support for optgroup

2005-11-23 Thread Igor Vaynberg
just checked in my first pass at this so you guys can check it out and give me feedback. i had to check it into wicket_1_1 branch because component reference doesnt work in head yet. i also put the new components into extensions because the core is getting too crowded imho. if people want me to move it into core we can discuss that separately. the components are in 
wicket.extensions.markup.html.form.select package. and the examples are in component reference on the bottom of the form section.these components give you pretty much total control of how the select/option/optgroup tags are rendered. there is a convinience SelectOptions class that will create a quick list of options like the current choice components do. this one uses IOptionRenderer instead of IChoiceRenderer since it uses the actual model object instead of a string id. see the examples.
-IgorOn 11/22/05, Mark Derricutt [EMAIL PROTECTED] wrote:
Something along those lines yeh.On 11/23/05, Igor Vaynberg 
[EMAIL PROTECTED] wrote:
so you want to specify the optgroup tags in your model? something likeclass Category { String name; List choices }and provide ListCategory as the model? so that the name of categories become optgroup tags?





Re: [Wicket-user] How to cover Select Box with the autocomplete DIV layer

2005-11-23 Thread Dipu

I have filed an issue
http://sourceforge.net/tracker/index.php?func=detailaid=1364466group_id=119783atid=684975

Cheers
Dipu

- Original Message - 
From: Ryan Sonnek [EMAIL PROTECTED]

To: wicket-user@lists.sourceforge.net
Sent: Tuesday, November 22, 2005 6:42 PM
Subject: Re: [Wicket-user] How to cover Select Box with the autocomplete DIV 
layer



I updated to rc4 a while back, and now that rc5 is out, we should do
another update.  can you file an issue to get some visibility on this?
I'll probably tackle the upgrade, unless someone else wants to hop in
and get it done.  It might take me a couple days before I can get this
in.

On 11/22/05, Dipu [EMAIL PROTECTED] wrote:



scriptaculous provides the inner-frame support for autocomplete out of the
box, we don't have to do it ourselves.
I just replaced the control.js file in the wicket-contrib-scriptaculous
project with the latest version and the problem vanished.
Can anyone with commit rights to the CVS replace all the scriptaculous js
files with the most recent version available.

Cheers
Dipu

- Original Message -
From: Martijn Dashorst
To: wicket-user@lists.sourceforge.net
Sent: Tuesday, November 22, 2005 12:50 PM
Subject: Re: [Wicket-user] How to cover Select Box with the autocomplete 
DIV

layer

Try using an inner-frame. I don't have the code available, but googling
should provide enough info. The two wicket-contrib-dojo guys (Ruud and
Marko) also had some problems regarding this, and have posted a similar
question two weeks ago.

Martijn



On 11/22/05, Dipu [EMAIL PROTECTED] wrote:

 Hi Ryan,

 I am using the ajax autocomplete text box you have developed for wicket.
But in my case the div layer spans over a select box,
 so on IE it goes behind the select box. I tried nesting it in another 
 div

with postion:relative as in scriptaculous autocomplete example,
 but it didn't work for me. Is there any way to get around this problem.

 Thanks
 Dipu



--
Living a wicket life...

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

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



---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=ick
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] DatePicker and opera

2005-11-23 Thread Matej Knopp

Hi,

DatePicker doesn't work in opera. It shows a window with this error message:
Calendar setup:
Nothing to setup (no fields found). Please check your code.

Has anyone a clue, what's going on? To me, it seems that somehow the 
javascript can't touch input field, even if the javascript is executed 
after the input field. But I can't figure out any solution...


-Matej


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] I18n

2005-11-23 Thread Dorel Vaida

Dzenan Ridjanovic wrote:


Juergen,


For me it looks like your editor is not saving the html document in


UTF-8 format but your computers default locale. Which editor are you
using?

I use Eclipse. And I see French accents in Eclipse.

With or without meta tag I have the same problem. In one of previous 
versions of Wicket I did not have this problem.


It may be a web app server thing. Configure Jetty or Tomcat or even the 
jvm they're running on to use UTF-8 as char encoding. I remember solving 
a similar problem on Tomcat by setting up the -Dfile.encoding=UTF-8 
switch in CATALINA_OPTS env variable. Google for -Dfile.encoding for a 
while, you'll see you're not alone :-)




Dzenan



 




---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user





---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Accessing Path Info

2005-11-23 Thread Dorel Vaida

Igor Vaynberg wrote:


or use a url rewriting filter to change the url to a bookmarkable page ie
rewrite all www.example.com/shortcut/(expr) 
http://www.example.com/shortcut/%28expr%29
to www.example.com/app?bookmarkablePage=Shortcutparam=expr 
http://www.example.com/app?bookmarkablePage=Shortcutparam=expr

-Igor

I wonder if we could make wicket urls to look completely REST-full :-D 
except that we'd still use the session cookie in the headers (which is 
not REST)




On 11/22/05, *Eelco Hillenius*  [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


I think you can do stuff like that now, at least partially. I'm just
now starting to work on further improving this (or at least exploring
some ideas).

Eelco

On 11/22/05, Nick Heudecker [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] wrote:
 Hi,

 I would like to create a URL that looks like:
 http://www.example.com/app/1F83C6D3A

 or even:
 http://www.example.com/app/annual_shareholder_meeting

 Is there a way to easily access the /1F83C6D3A portion of that URL
 within Wicket and use it as a page parameter?  I suppose the other
 option could be to do:
 http://www.example.com/app/?1F83C6D3A

 Wait.  None of these will work because I still need the page
that I'm
 submitting to.  I think I've asked this question before, but I
need to
 revisit it because I need a short, yet non-scary URL for public
 consumption.  What I'd like is:

 http://www.example.com/register/[some
http://www.example.com/register/%5Bsome event-specific token]/[some
 user-specific token]

 If Wicket can't support this directly, I can map a servlet to
 /register and have it forward to the Wicket page.  Any thoughts
on how
 to do this more elegantly?


 ---
 This SF.Net email is sponsored by the JBoss Inc.  Get Certified
Today
 Register for a JBoss Training Course.  Free Certification Exam
 for All Training Attendees Through End of 2005. For more info visit:
 http://ads.osdn.com/?ad_idv28alloc_id845opclick
http://ads.osdn.com/?ad_idv28alloc_id%16845opclick
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845opclick
http://ads.osdn.com/?ad_idv28alloc_id%16845opclick
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
https://lists.sourceforge.net/lists/listinfo/wicket-user






---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] I18n

2005-11-23 Thread Johan Compagner
Tested it and the problem is that you are lying ;)you say:?xml version=1.0 encoding=UTF-8?in the top of youre file. But youre file is not in UTF-8 but in cp1252 (or something like that)
when i made it: (i think that cp1252 is something windows? don't know if you can say that as the encoding)?xml version=1.0 encoding=ISO-8859-1?It worked.
On 11/22/05, Dzenan Ridjanovic [EMAIL PROTECTED] wrote:
Johan,what does you browser reports in what kind of content type is does get itback?UTF-8.Please go to my web site to see for yourself:
http://drdb.fsa.ulaval.ca/urls/At the end of the page click on Spiral09 to execute the application. Then click on the French flag. The code is in Urls09.zip (after unzip, import the Eclipse project).Dzenan
---This SF.Net email is sponsored by the JBoss Inc.Get Certified TodayRegister for a JBoss Training Course.Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___Wicket-user mailing listWicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Eduardo Rocha
I am having problems with WicketTester.clickLink(..) when the link is
a BookmarkablePageLink.

At first, if the link is a bookmarkable one, I don't need to test it,
since I can test the page alone.

But I was think in the following: if my link was simple Link subclass,
and I had a test for it:

add(new Link(myLink) {
public void onClick() {
setResponsePage(new MyPage());
}
}

tester.clickLink(myLink);
tester.assertRenderedPage(MyPage.class);

so I choose to replace it for a bookmarkable link, and run the
regression test. The test will fail, because clickLink(..) doesn't
work with BookmarkablePageLink. That way, I would have to remove the
clickLink(..) test.

Do people agree it is a bug?


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Adding Support for optgroup

2005-11-23 Thread Andrew Berman
I won't be able to give it a shot until it works with HEAD as I've made
the switch already and am using 1.2 specific stuff. Once it is
compatible with HEAD, I'll check it out.

--AndrewOn 11/23/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
just checked in my first pass at this so you guys can check it out and
give me feedback. i had to check it into wicket_1_1 branch because
component reference doesnt work in head yet. i also put the new
components into extensions because the core is getting too crowded
imho. if people want me to move it into core we can discuss that
separately. the components are in wicket.extensions.markup.html.form.select package. and the examples are in component reference on the bottom of the form section.these
components give you pretty much total control of how the
select/option/optgroup tags are rendered. there is a convinience
SelectOptions class that will create a quick list of options like the
current choice components do. this one uses IOptionRenderer instead of
IChoiceRenderer since it uses the actual model object instead of a
string id. see the examples.
-IgorOn 11/22/05, Mark Derricutt 
[EMAIL PROTECTED] wrote:
Something along those lines yeh.On 11/23/05, Igor Vaynberg 

[EMAIL PROTECTED] wrote:
so you want to specify the optgroup tags in your model? something likeclass Category { String name; List choices }and provide ListCategory as the model? so that the name of categories become optgroup tags?







Re: [Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Juergen Donnerstag
sorry, but I do not understand the question. What is the bug?

Juergen

On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
 I am having problems with WicketTester.clickLink(..) when the link is
 a BookmarkablePageLink.

 At first, if the link is a bookmarkable one, I don't need to test it,
 since I can test the page alone.

 But I was think in the following: if my link was simple Link subclass,
 and I had a test for it:

 add(new Link(myLink) {
public void onClick() {
setResponsePage(new MyPage());
}
 }

 tester.clickLink(myLink);
 tester.assertRenderedPage(MyPage.class);

 so I choose to replace it for a bookmarkable link, and run the
 regression test. The test will fail, because clickLink(..) doesn't
 work with BookmarkablePageLink. That way, I would have to remove the
 clickLink(..) test.

 Do people agree it is a bug?


 ---
 This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
 Register for a JBoss Training Course.  Free Certification Exam
 for All Training Attendees Through End of 2005. For more info visit:
 http://ads.osdn.com/?ad_idv28alloc_id845opclick
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] I18n

2005-11-23 Thread Dorel Vaida

Johan Compagner wrote:


Tested it and the problem is that you are lying ;)

you say:
?xml version=1.0 encoding=UTF-8?

in the top of youre file. But youre file is not in UTF-8 but in cp1252 
(or something like that)
when i made it: (i think that cp1252 is something windows? don't know 
if you can say that as the encoding)


That's Eclipse's default file encoding



?xml version=1.0 encoding=ISO-8859-1?

It worked.


On 11/22/05, *Dzenan Ridjanovic* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Johan,

what does you browser reports in what kind of content type is
does get it
back?

UTF-8.

Please go to my web site to see for yourself:

http://drdb.fsa.ulaval.ca/urls/

At the end of the page click on Spiral09 to execute the
application. Then click on the French flag. The code is in
Urls09.zip (after unzip, import the Eclipse project).

Dzenan








---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
mailto:Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user






---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Accessing Path Info

2005-11-23 Thread Nick Heudecker
Thanks for the suggestions.  I think I'm going to use a servlet or a
filter to forward to the Wicket BookmarkablePage.


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket:id on body tag

2005-11-23 Thread Scott Sauyet

== Scott Sauyet [EMAIL PROTECTED]

== Juergen Donnerstag [EMAIL PROTECTED]



Could someone point me to where in the source code this happens?  I
don't really know my way around Wicket internals yet, but I'd like to
see this, and it's not in WebPage, which was my first guess.



BodyOnLoadHandler, BodyOnLoadResolver, BodyOnLoadContainer


Thanks.  I'll take a look at these.



I'm not quite sure what to put in an RFE here.



RFE: allow wicket:id on body tag which currently is not possible due
to wickets body onLoad handling.


Okay.  It's at http://tinyurl.com/7azmc


If there is a way to retrieve
the MarkupContainer being used for the body so that I can add an
AttributeModifier to it, that would solve my problem.  But I don't yet
know if I already can do that.



You can. It is a component added to the page with id _body. But it
is created at render time and hence is not available within your
constructor. So it become a bit tricky. Actually I would not advice
you to go that road. It is hacky and not acutally the easy wicket
way.


Yuck.  I think I'll skip that for now, thanks!  :-)

I'll look to see if I can create a patch for this.  Thanks for your help.

  -- Scott



---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] I18n

2005-11-23 Thread Juergen Donnerstag
Thats wrong. It depends on the operation system, on Eclipse default
settings (if you changed them) and on the Eclipse editor you are
using. Only Eclipse html and xml editor take the ?xml ... into
account and save the document with the appropriate encoding.


Juergen

On 11/23/05, Dorel Vaida [EMAIL PROTECTED] wrote:
 Johan Compagner wrote:

  Tested it and the problem is that you are lying ;)
 
  you say:
  ?xml version=1.0 encoding=UTF-8?
 
  in the top of youre file. But youre file is not in UTF-8 but in cp1252
  (or something like that)
  when i made it: (i think that cp1252 is something windows? don't know
  if you can say that as the encoding)

 That's Eclipse's default file encoding

 
  ?xml version=1.0 encoding=ISO-8859-1?
 
  It worked.
 
 
  On 11/22/05, *Dzenan Ridjanovic* [EMAIL PROTECTED]
  mailto:[EMAIL PROTECTED] wrote:
 
  Johan,
 
  what does you browser reports in what kind of content type is
  does get it
  back?
 
  UTF-8.
 
  Please go to my web site to see for yourself:
 
  http://drdb.fsa.ulaval.ca/urls/
 
  At the end of the page click on Spiral09 to execute the
  application. Then click on the French flag. The code is in
  Urls09.zip (after unzip, import the Eclipse project).
 
  Dzenan
 
 
 
 
  
  
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
  Register for a JBoss Training Course.  Free Certification Exam
  for All Training Attendees Through End of 2005. For more info visit:
  http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
  http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  mailto:Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 
 



 ---
 This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
 Register for a JBoss Training Course.  Free Certification Exam
 for All Training Attendees Through End of 2005. For more info visit:
 http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user



---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DataView on first creation calls count query twice

2005-11-23 Thread Martijn Dashorst
Yeah, create a wicket-extensions specific changes.xml file please.

I'm not sure about the seperate build cycle of the wicket extensions
project. At the moment both projects are highly tied to one another.
Same goes for Quick start and examples.

Martijn
On 11/23/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
Igor,Did you adjust the changes.xml?
wicket-extensions
doesnt have changes.xml. should i put it into wicket's changes? i
thought we were talking about extensions having its own release cycle
so maybe we should have a separate changes file for it.
BTW, I also stumbled upon this one. But it wasn't reproducable ;-).i
actually hit it today myself. i cleared the size cache in
onbeginrequest, so if you called something that needed the size between
the creation of dataview and its render onbeginreqest would reset the
cache and size would get called again. stupid bug - easy fix, now the
cache is cleared in onendrequest :)
-Igor

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


Re: [Wicket-user] DatePicker and opera

2005-11-23 Thread Dipu

Yes , original jscalendar works in Opera.

Dipu
- Original Message - 
From: Eelco Hillenius [EMAIL PROTECTED]

To: wicket-user@lists.sourceforge.net
Sent: Wednesday, November 23, 2005 4:04 PM
Subject: Re: [Wicket-user] DatePicker and opera


Does the original jscalendar work in Opera? If it does, the problem is
with the component, otherwise it is jscalendar.

Eelco


On 11/23/05, Matej Knopp [EMAIL PROTECTED] wrote:

Hi,

DatePicker doesn't work in opera. It shows a window with this error 
message:

Calendar setup:
Nothing to setup (no fields found). Please check your code.

Has anyone a clue, what's going on? To me, it seems that somehow the
javascript can't touch input field, even if the javascript is executed
after the input field. But I can't figure out any solution...

-Matej


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
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://ads.osdn.com/?ad_idv37alloc_id865op=ick
___
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://ads.osdn.com/?ad_idv37alloc_id865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Accessing Path Info

2005-11-23 Thread Eelco Hillenius
What I'm - kind of offline - am working on right now is something that
at least partially acomplishes that. It's a big refactor (luckily as
we always made sure not to expose too much without breaking public
API's so far) and I'm combining it with other things like improved
state management and stuff like browser detection. I hope to report
back on this early next week.

Eelco

 I wonder if we could make wicket urls to look completely REST-full :-D
 except that we'd still use the session cookie in the headers (which is
 not REST)



---
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://ads.osdn.com/?ad_idv37alloc_id865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DatePicker and opera

2005-11-23 Thread Matej Knopp

Well, the original calendar works with opera well.
I guess the problem is in component.

The generat source code is like this

input value= maxlength=16 type=text wicket:id=createdFrom 
style=width: 9em; name=createdFrom id=1:form:createdFrom/


span wicket:id=fromDatePickerwicket:panel
	img wicket:id=trigger style=cursor: pointer; border: none; 
src=/cargo/app/resources/wicket.extensions.markup.html.datepicker.DatePickerSettings/calendar_icon_1.gif 
id=1:form:fromDatePicker:trigger/

script type=text/javascript wicket:id=script
Calendar.setup(
{
inputField : 1:form:createdFrom,
button : 1:form:fromDatePicker:trigger,
showsTime : true,
ifFormat : %d.%m.%Y %H:%M
});/script
/wicket-panel/span

The problem is, that for some reason, opera can't refer to the input 
with name 1:form:createdFrom.


I wish I had more time to check it deeper. Maybe the long name is a 
problem, I don't know. Or maybe, when the script gets executed, the 
input field is just not initialized yet.


-Matej

Eelco Hillenius wrote:

Does the original jscalendar work in Opera? If it does, the problem is
with the component, otherwise it is jscalendar.

Eelco


On 11/23/05, Matej Knopp [EMAIL PROTECTED] wrote:


Hi,

DatePicker doesn't work in opera. It shows a window with this error message:
Calendar setup:
   Nothing to setup (no fields found). Please check your code.

Has anyone a clue, what's going on? To me, it seems that somehow the
javascript can't touch input field, even if the javascript is executed
after the input field. But I can't figure out any solution...

-Matej


---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
___
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://ads.osdn.com/?ad_idv37alloc_id865op=click
___
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://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] DatePicker and opera

2005-11-23 Thread Eelco Hillenius
Unfortunately, I'm a bit too bussy with other things too. I'll open a
bug report for it, but I'd appreciate it when someone else could look
into the problem.

Eelco


On 11/23/05, Dipu [EMAIL PROTECTED] wrote:
 Yes , original jscalendar works in Opera.

 Dipu
 - Original Message -
 From: Eelco Hillenius [EMAIL PROTECTED]
 To: wicket-user@lists.sourceforge.net
 Sent: Wednesday, November 23, 2005 4:04 PM
 Subject: Re: [Wicket-user] DatePicker and opera


 Does the original jscalendar work in Opera? If it does, the problem is
 with the component, otherwise it is jscalendar.

 Eelco


 On 11/23/05, Matej Knopp [EMAIL PROTECTED] wrote:
  Hi,
 
  DatePicker doesn't work in opera. It shows a window with this error
  message:
  Calendar setup:
  Nothing to setup (no fields found). Please check your code.
 
  Has anyone a clue, what's going on? To me, it seems that somehow the
  javascript can't touch input field, even if the javascript is executed
  after the input field. But I can't figure out any solution...
 
  -Matej
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
  Register for a JBoss Training Course.  Free Certification Exam
  for All Training Attendees Through End of 2005. For more info visit:
  http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click
  ___
  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://ads.osdn.com/?ad_idv37alloc_id865op=ick
 ___
 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://ads.osdn.com/?ad_idv37alloc_id865opclick
 ___
 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://ads.osdn.com/?ad_idv37alloc_id865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Accessing Path Info

2005-11-23 Thread Nick Heudecker
Let me know if you need/want a hand with it.

On 11/23/05, Eelco Hillenius [EMAIL PROTECTED] wrote:
 What I'm - kind of offline - am working on right now is something that
 at least partially acomplishes that. It's a big refactor (luckily as
 we always made sure not to expose too much without breaking public
 API's so far) and I'm combining it with other things like improved
 state management and stuff like browser detection. I hope to report
 back on this early next week.

 Eelco

  I wonder if we could make wicket urls to look completely REST-full :-D
  except that we'd still use the session cookie in the headers (which is
  not REST)
 


 ---
 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://ads.osdn.com/?ad_idv37alloc_id865opclick
 ___
 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://ads.osdn.com/?ad_idv37alloc_id865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Eelco Hillenius
Because bookmarkable page links do not 'post back' to the server but
instead they refer to bookmarkable pages they can't be called as links
from WicketTester, right?

Eelco

On 11/23/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 sorry, but I do not understand the question. What is the bug?

 Juergen

 On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
  I am having problems with WicketTester.clickLink(..) when the link is
  a BookmarkablePageLink.
 
  At first, if the link is a bookmarkable one, I don't need to test it,
  since I can test the page alone.
 
  But I was think in the following: if my link was simple Link subclass,
  and I had a test for it:
 
  add(new Link(myLink) {
 public void onClick() {
 setResponsePage(new MyPage());
 }
  }
 
  tester.clickLink(myLink);
  tester.assertRenderedPage(MyPage.class);
 
  so I choose to replace it for a bookmarkable link, and run the
  regression test. The test will fail, because clickLink(..) doesn't
  work with BookmarkablePageLink. That way, I would have to remove the
  clickLink(..) test.
 
  Do people agree it is a bug?
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
  Register for a JBoss Training Course.  Free Certification Exam
  for All Training Attendees Through End of 2005. For more info visit:
  http://ads.osdn.com/?ad_idv28alloc_id845opclick
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 ---
 This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
 Register for a JBoss Training Course.  Free Certification Exam
 for All Training Attendees Through End of 2005. For more info visit:
 http://ads.osdn.com/?ad_idv28alloc_id845opclick
 ___
 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://ads.osdn.com/?ad_idv37alloc_id865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Eduardo Rocha
Sorry for not being clearer. The bug is that the following does not work:

code (HomePage.class):

add(new BookmarkablePageLink(myPageLink, MyPage.class));

test (HomePageTest.class):

tester.clickLink(myPageLink);
assertRenderedPage(MyPage.class);

The assertion fails, because the HomePage.class is rendered again.

I would like to make sure this is a bug, so I could work on a patch.

This happens because WicketTester treats the BookmarkablePageLink as a
ordinary link, and at the end, the onClick method on
BookmarkablePageLink is called, which does nothing.

2005/11/23, Eelco Hillenius [EMAIL PROTECTED]:
 Because bookmarkable page links do not 'post back' to the server but
 instead they refer to bookmarkable pages they can't be called as links
 from WicketTester, right?

 Eelco

 On 11/23/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
  sorry, but I do not understand the question. What is the bug?
 
  Juergen
 
  On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
   I am having problems with WicketTester.clickLink(..) when the link is
   a BookmarkablePageLink.
  
   At first, if the link is a bookmarkable one, I don't need to test it,
   since I can test the page alone.
  
   But I was think in the following: if my link was simple Link subclass,
   and I had a test for it:
  
   add(new Link(myLink) {
  public void onClick() {
  setResponsePage(new MyPage());
  }
   }
  
   tester.clickLink(myLink);
   tester.assertRenderedPage(MyPage.class);
  
   so I choose to replace it for a bookmarkable link, and run the
   regression test. The test will fail, because clickLink(..) doesn't
   work with BookmarkablePageLink. That way, I would have to remove the
   clickLink(..) test.
  
   Do people agree it is a bug?
  
  
   ---
   This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
   Register for a JBoss Training Course.  Free Certification Exam
   for All Training Attendees Through End of 2005. For more info visit:
   http://ads.osdn.com/?ad_idv28alloc_id845opclick
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
  Register for a JBoss Training Course.  Free Certification Exam
  for All Training Attendees Through End of 2005. For more info visit:
  http://ads.osdn.com/?ad_idv28alloc_id845opclick
  ___
  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://ads.osdn.com/?ad_idv37alloc_id865opclick
 ___
 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://ads.osdn.com/?ad_idv37alloc_id865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Adding Support for optgroup

2005-11-23 Thread Igor Vaynberg
your wish is my command. now you just have to wait a few hours until anon cvs syncs.-IgorOn 11/23/05, Andrew Berman 
[EMAIL PROTECTED] wrote:I won't be able to give it a shot until it works with HEAD as I've made
the switch already and am using 1.2 specific stuff. Once it is
compatible with HEAD, I'll check it out.

--AndrewOn 11/23/05, Igor Vaynberg 
[EMAIL PROTECTED] wrote:
just checked in my first pass at this so you guys can check it out and
give me feedback. i had to check it into wicket_1_1 branch because
component reference doesnt work in head yet. i also put the new
components into extensions because the core is getting too crowded
imho. if people want me to move it into core we can discuss that
separately. the components are in wicket.extensions.markup.html.form.select package. and the examples are in component reference on the bottom of the form section.these
components give you pretty much total control of how the
select/option/optgroup tags are rendered. there is a convinience
SelectOptions class that will create a quick list of options like the
current choice components do. this one uses IOptionRenderer instead of
IChoiceRenderer since it uses the actual model object instead of a
string id. see the examples.
-IgorOn 11/22/05, Mark Derricutt 

[EMAIL PROTECTED] wrote:
Something along those lines yeh.On 11/23/05, Igor Vaynberg 


[EMAIL PROTECTED] wrote:
so you want to specify the optgroup tags in your model? something likeclass Category { String name; List choices }and provide ListCategory as the model? so that the name of categories become optgroup tags?









Re: [Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Ingram Chen
I did some debugging and found that setRequestToComponent() of MockHttpServletRequestdoes not build request parameters for BookmarkablePageLink. It builds interface=ILinkListenerinstead. however, BookmarkablePageLink does nonthing in onLinkClicked() method. 
I think that we can add bookmarkablePage=xxx request parameter in setRequestToComponent() to solve this issue. On 11/24/05, Eduardo Rocha
 [EMAIL PROTECTED] wrote:
Sorry for not being clearer. The bug is that the following does not work:code (HomePage.class):add(new BookmarkablePageLink(myPageLink, MyPage.class));test (HomePageTest.class):
tester.clickLink(myPageLink);assertRenderedPage(MyPage.class);The assertion fails, because the HomePage.class is rendered again.I would like to make sure this is a bug, so I could work on a patch.
This happens because WicketTester treats the BookmarkablePageLink as aordinary link, and at the end, the onClick method onBookmarkablePageLink is called, which does nothing.2005/11/23, Eelco Hillenius 
[EMAIL PROTECTED]: Because bookmarkable page links do not 'post back' to the server but instead they refer to bookmarkable pages they can't be called as links
 from WicketTester, right? Eelco On 11/23/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:  sorry, but I do not understand the question. What is the bug?
   Juergen   On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:   I am having problems with WicketTester.clickLink
(..) when the link is   a BookmarkablePageLink. At first, if the link is a bookmarkable one, I don't need to test it,   since I can test the page alone.
 But I was think in the following: if my link was simple Link subclass,   and I had a test for it: add(new Link(myLink) {
  public void onClick() {  setResponsePage(new MyPage());  }   } tester.clickLink(myLink);   
tester.assertRenderedPage(MyPage.class); so I choose to replace it for a bookmarkable link, and run the   regression test. The test will fail, because clickLink(..) doesn't
   work with BookmarkablePageLink. That way, I would have to remove the   clickLink(..) test. Do people agree it is a bug?  
 ---   This SF.Net email is sponsored by the JBoss Inc.Get Certified Today   Register for a JBoss Training Course.Free Certification Exam
   for All Training Attendees Through End of 2005. For more info visit:   http://ads.osdn.com/?ad_idv28alloc_id845opclick
   ___   Wicket-user mailing list   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user  ---
  This SF.Net email is sponsored by the JBoss Inc.Get Certified Today  Register for a JBoss Training Course.Free Certification Exam  for All Training Attendees Through End of 2005. For more info visit:
  http://ads.osdn.com/?ad_idv28alloc_id845opclick  ___  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://ads.osdn.com/?ad_idv37alloc_id865opclick
 ___ 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://ads.osdn.com/?ad_idv37alloc_id865opclick___
Wicket-user mailing listWicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
-- Ingram ChenJava [EMAIL PROTECTED]Institue of BioMedical Sciences Academia Sinica Taiwanblog: 
http://www.javaworld.com.tw/roller/page/ingramchen


Re: [Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Juergen Donnerstag
To make all type of Links working consistently IMO is a good idea.
Hence I agree that it is a bug (or RFE) and I would very much
appreciate if you would provide a patch for it.

Juergen

On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
 Sorry for not being clearer. The bug is that the following does not work:

 code (HomePage.class):

add(new BookmarkablePageLink(myPageLink, MyPage.class));

 test (HomePageTest.class):

tester.clickLink(myPageLink);
assertRenderedPage(MyPage.class);

 The assertion fails, because the HomePage.class is rendered again.

 I would like to make sure this is a bug, so I could work on a patch.

 This happens because WicketTester treats the BookmarkablePageLink as a
 ordinary link, and at the end, the onClick method on
 BookmarkablePageLink is called, which does nothing.

 2005/11/23, Eelco Hillenius [EMAIL PROTECTED]:
  Because bookmarkable page links do not 'post back' to the server but
  instead they refer to bookmarkable pages they can't be called as links
  from WicketTester, right?
 
  Eelco
 
  On 11/23/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
   sorry, but I do not understand the question. What is the bug?
  
   Juergen
  
   On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
I am having problems with WicketTester.clickLink(..) when the link is
a BookmarkablePageLink.
   
At first, if the link is a bookmarkable one, I don't need to test it,
since I can test the page alone.
   
But I was think in the following: if my link was simple Link subclass,
and I had a test for it:
   
add(new Link(myLink) {
   public void onClick() {
   setResponsePage(new MyPage());
   }
}
   
tester.clickLink(myLink);
tester.assertRenderedPage(MyPage.class);
   
so I choose to replace it for a bookmarkable link, and run the
regression test. The test will fail, because clickLink(..) doesn't
work with BookmarkablePageLink. That way, I would have to remove the
clickLink(..) test.
   
Do people agree it is a bug?
   
   
---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845opclick
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user
   
  
  
   ---
   This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
   Register for a JBoss Training Course.  Free Certification Exam
   for All Training Attendees Through End of 2005. For more info visit:
   http://ads.osdn.com/?ad_idv28alloc_id845opclick
   ___
   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://ads.osdn.com/?ad_idv37alloc_id865opclick
  ___
  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://ads.osdn.com/?ad_idv37alloc_id865opclick
 ___
 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://ads.osdn.com/?ad_idv37alloc_id865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Adding Support for optgroup

2005-11-23 Thread Andrew Berman
I should've knownOn 11/23/05, Igor Vaynberg [EMAIL PROTECTED] wrote:
your wish is my command. now you just have to wait a few hours until anon cvs syncs.-IgorOn 11/23/05, 
Andrew Berman 
[EMAIL PROTECTED] wrote:I won't be able to give it a shot until it works with HEAD as I've made
the switch already and am using 1.2 specific stuff. Once it is
compatible with HEAD, I'll check it out.

--AndrewOn 11/23/05, Igor Vaynberg 

[EMAIL PROTECTED] wrote:
just checked in my first pass at this so you guys can check it out and
give me feedback. i had to check it into wicket_1_1 branch because
component reference doesnt work in head yet. i also put the new
components into extensions because the core is getting too crowded
imho. if people want me to move it into core we can discuss that
separately. the components are in wicket.extensions.markup.html.form.select package. and the examples are in component reference on the bottom of the form section.these
components give you pretty much total control of how the
select/option/optgroup tags are rendered. there is a convinience
SelectOptions class that will create a quick list of options like the
current choice components do. this one uses IOptionRenderer instead of
IChoiceRenderer since it uses the actual model object instead of a
string id. see the examples.
-IgorOn 11/22/05, Mark Derricutt 


[EMAIL PROTECTED] wrote:
Something along those lines yeh.On 11/23/05, Igor Vaynberg 



[EMAIL PROTECTED] wrote:
so you want to specify the optgroup tags in your model? something likeclass Category { String name; List choices }and provide ListCategory as the model? so that the name of categories become optgroup tags?











Re: [Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Eduardo Rocha
I was trying to use Link.getURL(), to not repeat the creation of the
parameters on WicketTester, but this method is protected, so I have no
idea to move on :(

The idea was simply take that URL, parse parameters and add them to
MockHttpServletRequest. Supose people agree on making getURL() public,
is there a method on Wicket for parsing url parameters?

2005/11/23, Juergen Donnerstag [EMAIL PROTECTED]:
 To make all type of Links working consistently IMO is a good idea.
 Hence I agree that it is a bug (or RFE) and I would very much
 appreciate if you would provide a patch for it.

 Juergen

 On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
  Sorry for not being clearer. The bug is that the following does not work:
 
  code (HomePage.class):
 
 add(new BookmarkablePageLink(myPageLink, MyPage.class));
 
  test (HomePageTest.class):
 
 tester.clickLink(myPageLink);
 assertRenderedPage(MyPage.class);
 
  The assertion fails, because the HomePage.class is rendered again.
 
  I would like to make sure this is a bug, so I could work on a patch.
 
  This happens because WicketTester treats the BookmarkablePageLink as a
  ordinary link, and at the end, the onClick method on
  BookmarkablePageLink is called, which does nothing.
 
  2005/11/23, Eelco Hillenius [EMAIL PROTECTED]:
   Because bookmarkable page links do not 'post back' to the server but
   instead they refer to bookmarkable pages they can't be called as links
   from WicketTester, right?
  
   Eelco
  
   On 11/23/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
sorry, but I do not understand the question. What is the bug?
   
Juergen
   
On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
 I am having problems with WicketTester.clickLink(..) when the link is
 a BookmarkablePageLink.

 At first, if the link is a bookmarkable one, I don't need to test it,
 since I can test the page alone.

 But I was think in the following: if my link was simple Link subclass,
 and I had a test for it:

 add(new Link(myLink) {
public void onClick() {
setResponsePage(new MyPage());
}
 }

 tester.clickLink(myLink);
 tester.assertRenderedPage(MyPage.class);

 so I choose to replace it for a bookmarkable link, and run the
 regression test. The test will fail, because clickLink(..) doesn't
 work with BookmarkablePageLink. That way, I would have to remove the
 clickLink(..) test.

 Do people agree it is a bug?


 ---
 This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
 Register for a JBoss Training Course.  Free Certification Exam
 for All Training Attendees Through End of 2005. For more info visit:
 http://ads.osdn.com/?ad_idv28alloc_id845opclick
 ___
 Wicket-user mailing list
 Wicket-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/wicket-user

   
   
---
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28alloc_id845opclick
___
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://ads.osdn.com/?ad_idv37alloc_id865opclick
   ___
   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://ads.osdn.com/?ad_idv37alloc_id865opclick
  ___
  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://ads.osdn.com/?ad_idv37alloc_id865opclick
 ___
 Wicket-user 

Re: [Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Juergen Donnerstag
yes, WebResponse and WebRequest. Please see the subclasses already available

What about the bug/idea reported by Ingram?

Juergen

On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
 I was trying to use Link.getURL(), to not repeat the creation of the
 parameters on WicketTester, but this method is protected, so I have no
 idea to move on :(

 The idea was simply take that URL, parse parameters and add them to
 MockHttpServletRequest. Supose people agree on making getURL() public,
 is there a method on Wicket for parsing url parameters?

 2005/11/23, Juergen Donnerstag [EMAIL PROTECTED]:
  To make all type of Links working consistently IMO is a good idea.
  Hence I agree that it is a bug (or RFE) and I would very much
  appreciate if you would provide a patch for it.
 
  Juergen
 
  On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
   Sorry for not being clearer. The bug is that the following does not work:
  
   code (HomePage.class):
  
  add(new BookmarkablePageLink(myPageLink, MyPage.class));
  
   test (HomePageTest.class):
  
  tester.clickLink(myPageLink);
  assertRenderedPage(MyPage.class);
  
   The assertion fails, because the HomePage.class is rendered again.
  
   I would like to make sure this is a bug, so I could work on a patch.
  
   This happens because WicketTester treats the BookmarkablePageLink as a
   ordinary link, and at the end, the onClick method on
   BookmarkablePageLink is called, which does nothing.
  
   2005/11/23, Eelco Hillenius [EMAIL PROTECTED]:
Because bookmarkable page links do not 'post back' to the server but
instead they refer to bookmarkable pages they can't be called as links
from WicketTester, right?
   
Eelco
   
On 11/23/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
 sorry, but I do not understand the question. What is the bug?

 Juergen

 On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
  I am having problems with WicketTester.clickLink(..) when the link 
  is
  a BookmarkablePageLink.
 
  At first, if the link is a bookmarkable one, I don't need to test 
  it,
  since I can test the page alone.
 
  But I was think in the following: if my link was simple Link 
  subclass,
  and I had a test for it:
 
  add(new Link(myLink) {
 public void onClick() {
 setResponsePage(new MyPage());
 }
  }
 
  tester.clickLink(myLink);
  tester.assertRenderedPage(MyPage.class);
 
  so I choose to replace it for a bookmarkable link, and run the
  regression test. The test will fail, because clickLink(..) doesn't
  work with BookmarkablePageLink. That way, I would have to remove the
  clickLink(..) test.
 
  Do people agree it is a bug?
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.  Get Certified 
  Today
  Register for a JBoss Training Course.  Free Certification Exam
  for All Training Attendees Through End of 2005. For more info visit:
  http://ads.osdn.com/?ad_idv28alloc_id845opclick
  ___
  Wicket-user mailing list
  Wicket-user@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/wicket-user
 


 ---
 This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
 Register for a JBoss Training Course.  Free Certification Exam
 for All Training Attendees Through End of 2005. For more info visit:
 http://ads.osdn.com/?ad_idv28alloc_id845opclick
 ___
 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://ads.osdn.com/?ad_idv37alloc_id865opclick
___
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://ads.osdn.com/?ad_idv37alloc_id865opclick
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  

Re: [Wicket-user] WicketTester and BookmarkablePageLink

2005-11-23 Thread Eduardo Rocha
Currently it is not possible to retrieve the pageClass from a
BookmarkablePageLink, so it is not possible to write
bookmarkablePage=xxx. Besides that, I think we would be rewriting
code.

2005/11/23, Juergen Donnerstag [EMAIL PROTECTED]:
 yes, WebResponse and WebRequest. Please see the subclasses already available

 What about the bug/idea reported by Ingram?

 Juergen

 On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
  I was trying to use Link.getURL(), to not repeat the creation of the
  parameters on WicketTester, but this method is protected, so I have no
  idea to move on :(
 
  The idea was simply take that URL, parse parameters and add them to
  MockHttpServletRequest. Supose people agree on making getURL() public,
  is there a method on Wicket for parsing url parameters?
 
  2005/11/23, Juergen Donnerstag [EMAIL PROTECTED]:
   To make all type of Links working consistently IMO is a good idea.
   Hence I agree that it is a bug (or RFE) and I would very much
   appreciate if you would provide a patch for it.
  
   Juergen
  
   On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
Sorry for not being clearer. The bug is that the following does not 
work:
   
code (HomePage.class):
   
   add(new BookmarkablePageLink(myPageLink, MyPage.class));
   
test (HomePageTest.class):
   
   tester.clickLink(myPageLink);
   assertRenderedPage(MyPage.class);
   
The assertion fails, because the HomePage.class is rendered again.
   
I would like to make sure this is a bug, so I could work on a patch.
   
This happens because WicketTester treats the BookmarkablePageLink as a
ordinary link, and at the end, the onClick method on
BookmarkablePageLink is called, which does nothing.
   
2005/11/23, Eelco Hillenius [EMAIL PROTECTED]:
 Because bookmarkable page links do not 'post back' to the server but
 instead they refer to bookmarkable pages they can't be called as links
 from WicketTester, right?

 Eelco

 On 11/23/05, Juergen Donnerstag [EMAIL PROTECTED] wrote:
  sorry, but I do not understand the question. What is the bug?
 
  Juergen
 
  On 11/23/05, Eduardo Rocha [EMAIL PROTECTED] wrote:
   I am having problems with WicketTester.clickLink(..) when the 
   link is
   a BookmarkablePageLink.
  
   At first, if the link is a bookmarkable one, I don't need to test 
   it,
   since I can test the page alone.
  
   But I was think in the following: if my link was simple Link 
   subclass,
   and I had a test for it:
  
   add(new Link(myLink) {
  public void onClick() {
  setResponsePage(new MyPage());
  }
   }
  
   tester.clickLink(myLink);
   tester.assertRenderedPage(MyPage.class);
  
   so I choose to replace it for a bookmarkable link, and run the
   regression test. The test will fail, because clickLink(..) 
   doesn't
   work with BookmarkablePageLink. That way, I would have to remove 
   the
   clickLink(..) test.
  
   Do people agree it is a bug?
  
  
   ---
   This SF.Net email is sponsored by the JBoss Inc.  Get Certified 
   Today
   Register for a JBoss Training Course.  Free Certification Exam
   for All Training Attendees Through End of 2005. For more info 
   visit:
   http://ads.osdn.com/?ad_idv28alloc_id845opclick
   ___
   Wicket-user mailing list
   Wicket-user@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/wicket-user
  
 
 
  ---
  This SF.Net email is sponsored by the JBoss Inc.  Get Certified 
  Today
  Register for a JBoss Training Course.  Free Certification Exam
  for All Training Attendees Through End of 2005. For more info visit:
  http://ads.osdn.com/?ad_idv28alloc_id845opclick
  ___
  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://ads.osdn.com/?ad_idv37alloc_id865opclick
 ___
 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!  

Re: [Wicket-user] wicket:id on body tag

2005-11-23 Thread Scott Sauyet

== Juergen Donnerstag [EMAIL PROTECTED]

== Scott Sauyet [EMAIL PROTECTED]



RFE: allow wicket:id on body tag which currently is not possible due
to wickets body onLoad handling.


Okay.  It's at http://tinyurl.com/7azmc [ ... ]

I'll look to see if I can create a patch for this.


Okay, a patch is attached that modifies WebPage and BodyOnloadContainer. 
 It's a suggestion for something less than the wicket:id on the body 
tag.  It simply adds


public void addBodyAttributeModifier(AttributeModifier modifier)

to WebPage, so that you can do, for instance,

addBodyAttributeModifier(new AttributeModifier(class, true, new 
Model(blah)));


I don't know if my use-case is enough of a reason to clutter up the 
interface of WebPage.  I also don't know if there is a reason to widen 
this facility beyond adding AttributeModifiers.  But for what it's 
worth, here is my simple suggestion.


  -- Scott
? lib/commons-logging-1.0.4.jar
? lib/concurrent-1.3.4.jar
? lib/junit-3.8.1.jar
? lib/log4j-1.2.11.jar
? lib/ognl-2.6.7.jar
? lib/servletapi-2.3.jar
? src/test/com/voicetribe/util/parse/metapattern
Index: src/java/wicket/markup/html/BodyOnLoadContainer.java
===
RCS file: 
/cvsroot/wicket/wicket/src/java/wicket/markup/html/BodyOnLoadContainer.java,v
retrieving revision 1.6
diff -u -r1.6 BodyOnLoadContainer.java
--- src/java/wicket/markup/html/BodyOnLoadContainer.java2 Oct 2005 
10:06:29 -   1.6
+++ src/java/wicket/markup/html/BodyOnLoadContainer.java23 Nov 2005 
19:08:46 -
@@ -17,6 +17,8 @@
  */
 package wicket.markup.html;
 
+import java.util.Iterator;
+
 import wicket.AttributeModifier;
 import wicket.Component;
 import wicket.IComponentResolver;
@@ -75,6 +77,9 @@
 {
add(new AttributeModifier(onload, true, new 
Model(onLoad)));
 }
+for (Iterator it = 
((WebPage)this.getPage()).getBodyAttributeModifiers().iterator(); it.hasNext(); 
) {
+add((AttributeModifier) it.next());
+}
}

// go on with default implementation
Index: src/java/wicket/markup/html/WebPage.java
===
RCS file: /cvsroot/wicket/wicket/src/java/wicket/markup/html/WebPage.java,v
retrieving revision 1.52
diff -u -r1.52 WebPage.java
--- src/java/wicket/markup/html/WebPage.java7 Nov 2005 19:41:05 -   
1.52
+++ src/java/wicket/markup/html/WebPage.java23 Nov 2005 19:51:51 -
@@ -20,6 +20,8 @@
 import java.io.UnsupportedEncodingException;
 import java.lang.reflect.Method;
 import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.List;
 import java.util.Iterator;
 
 import org.apache.commons.logging.Log;
@@ -27,6 +29,7 @@
 
 import wicket.Application;
 import wicket.ApplicationPages;
+import wicket.AttributeModifier;
 import wicket.Component;
 import wicket.IBehaviourListener;
 import wicket.Page;
@@ -474,4 +477,18 @@
public void afterCallComponent(final Component component, final Method 
method)
{
}
+
+/** AttributeModifiers to be added to the body. */
+private List bodyAttributeModifiers = new ArrayList();
+
+public void addBodyAttributeModifier(AttributeModifier modifier) 
+{
+bodyAttributeModifiers.add(modifier);
+}
+
+List getBodyAttributeModifiers() 
+{
+return bodyAttributeModifiers;
+}
+
 }
\ No newline at end of file


Re: [Wicket-user] wicket:id on body tag

2005-11-23 Thread Juergen Donnerstag
 Okay, a patch is attached that modifies WebPage and BodyOnloadContainer.
  It's a suggestion for something less than the wicket:id on the body
 tag.  It simply adds

 public void addBodyAttributeModifier(AttributeModifier modifier)

 to WebPage, so that you can do, for instance,

 addBodyAttributeModifier(new AttributeModifier(class, true, new
 Model(blah)));

 I don't know if my use-case is enough of a reason to clutter up the
 interface of WebPage.  I also don't know if there is a reason to widen
 this facility beyond adding AttributeModifiers.  But for what it's
 worth, here is my simple suggestion.

Honestly, I'm not in favour of cluttering the interface. What about an
Interface with one method which if your Page implements it, the method
is called. That method could be addBodyAttributeModifier. Thus, we do
not clutter the interface, but it is far less obvious for wicket user
what to do to achieve it = good javadoc/wiki

Juergen


---
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://ads.osdn.com/?ad_idv37alloc_id865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] wicket:id on body tag

2005-11-23 Thread Scott Sauyet

I don't know if my use-case is enough of a reason to clutter up the
interface of WebPage.  I also don't know if there is a reason to widen
this facility beyond adding AttributeModifiers.  But for what it's
worth, here is my simple suggestion.


Honestly, I'm not in favour of cluttering the interface. What about an
Interface with one method which if your Page implements it, the method
is called. That method could be addBodyAttributeModifier. Thus, we do
not clutter the interface, but it is far less obvious for wicket user
what to do to achieve it = good javadoc/wiki


You're right.  Much cleaner.  Where should that interface live? 
wicket.markup.html?


  -- Scott



---
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://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] Upload Progress bar

2005-11-23 Thread Johan Compagner
just an idea.The progress bar thread could be a SharedResource request.Those request are not synchonized.And you can give back the progress number everytime the Resource is requested.johan
On 11/23/05, Andrew Lombardi [EMAIL PROTECTED] wrote:
I've got a need to show an Upload progress bar in a Wicket app thatI've built.We're uploading some fairly large files and would liketo see some statuses.Figured out with Igor how to go aboutinjecting a CountingInputStream into the process for FileUpload, but
have run into a roadblock!What ends up happening, is the page runs a _javascript_, to showanother page that meta refreshes and shows a status grabbed from thesession.And at the same time submits the form to start the upload.
Only problem is, it seems to block on the form submissionuploadingthe file, and never shows the status page until after its doneprocessing the form.Obviously too late.Igor mentioned that this was probably because Wicket synchronizes
with the session.And we both think there must be a way around thisthat is missing.the code I have overrides:protected WebRequest newWebRequest(HttpServletRequest servletRequest)and then subclasses ServletWebRequest offering a wrapped
MultipartServletWebRequest which passes back a custom FileItem thatwraps the InputStream in a CountingInputStream, that in turn updatesthe Session.Whew!That was long.Ideas and thoughts?Thanks!
---This SF.Net email is sponsored by the JBoss Inc.Get Certified TodayRegister for a JBoss Training Course.Free Certification Examfor All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click___Wicket-user mailing list
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user



Re: [Wicket-user] wicket:id on body tag

2005-11-23 Thread Scott Sauyet

Juergen Donnerstag wrote:

I don't know if my use-case is enough of a reason to clutter up the
interface of WebPage.  I also don't know if there is a reason to widen
this facility beyond adding AttributeModifiers.  But for what it's
worth, here is my simple suggestion.



Honestly, I'm not in favour of cluttering the interface. What about an
Interface with one method which if your Page implements it, the method
is called. That method could be addBodyAttributeModifier. Thus, we do
not clutter the interface, but it is far less obvious for wicket user
what to do to achieve it = good javadoc/wiki


Attached is another patch doing something similar to this suggestion.  I 
added wicket.markup.html.IBodyTagContributor with the method


public AttributeModifier[] getBodyAttributeModifiers();

I couldn't really use addBodyAttributeModifier(), as it's 
BodyOnLoadContainer which is going to be calling the interface.


I'm not sure if it's more Wicketish to return an array like this or a 
List.  (I haven't really used Java 1.5 much, but this is one place where 
I really long for the generic version with ListAttributeModifier.)


Thanks for the pointer.  This solution feels much more acceptable to me. 
  I still don't know if there is any reason to expand on this, but now 
it's easy to simply expand the interface, although I suppose that needs 
to be done before the interface is made public.


  -- Scott
Index: src/java/wicket/markup/html/BodyOnLoadContainer.java
===
--- src/java/wicket/markup/html/BodyOnLoadContainer.java(revision 103)
+++ src/java/wicket/markup/html/BodyOnLoadContainer.java(working copy)
@@ -75,6 +75,13 @@
 {
add(new AttributeModifier(onload, true, new 
Model(onLoad)));
 }
+if (this.getPage() instanceof IBodyTagContributor) {
+IBodyTagContributor bodyContributor = (IBodyTagContributor) 
this.getPage();
+AttributeModifier[] modifiers = 
bodyContributor.getBodyAttributeModifiers();
+for (int i = 0; i  modifiers.length; i++) {
+add(modifiers[i]);
+}
+}
}

// go on with default implementation
Index: src/java/wicket/markup/html/IBodyTagContributor.java
===
--- src/java/wicket/markup/html/IBodyTagContributor.java(revision 0)
+++ src/java/wicket/markup/html/IBodyTagContributor.java(revision 0)
@@ -0,0 +1,38 @@
+/*
+ * $Id$
+ * $Revision$
+ * 
+ * 
==
+ * 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.markup.html;
+
+import wicket.AttributeModifier;
+
+
+/**
+ * An interface to be implemented by components which are able to add 
+ * information to the body tag associated with the markup.
+ * 
+ * @author Scott Sauyet
+ */
+public interface IBodyTagContributor
+{
+   /**
+* Fetch a list of [EMAIL PROTECTED] wicket.AttributeModifier 
AttributeModifiers} for
+ * the body tag.
+ *
+ * @return all AttributeModifiers which contribute to the lt;BODYgt; tag.
+*/
+   public AttributeModifier[] getBodyAttributeModifiers();
+}


RE: [Wicket-user] Wicket i18n at the page level

2005-11-23 Thread David Leangen

  I have a site that needs to support more than one
  locale. The user should be able to switch between 
  them from any point in the site.

 No need to do anything. It is supported out of the 
 box. Please see the examples as well.

 Well, no critique intended but I wouldn't (and didn't) 
 choose the 'one HTML page for each supported language' 
 because it is hard to maintain. 

 Having a component on every place localized text is, 
 doesn't seem to be a very good solution for me. As 
 well as not be able to localize button captions.


Wow! Thanks for the great tips!!


I'll follow up later and maybe post results to the wiki.


Cheers,
Dave



---
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://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


[Wicket-user] How do I register customed Converter into Application ?

2005-11-23 Thread Ingram Chen
Dear all,  I wrote several converters which extends AbstractConverter, but no ideas abouthow to set them as 'default' converter. any idea ?-- Ingram ChenJava [EMAIL PROTECTED]
Institue of BioMedical Sciences Academia Sinica Taiwanblog: http://www.javaworld.com.tw/roller/page/ingramchen


Re: [Wicket-user] Upload Progress bar

2005-11-23 Thread Andrew Lombardi
johan,ok, i've attempted that, and ran into the same blocking-type behaviour.  I've added the following to the init() of my Application:        DynamicByteArrayResource dbar = new DynamicByteArrayResource() {            protected byte[] getData() {                if(RequestCycle.get()!=null) {                ProgressSession sess = (ProgressSession) RequestCycle.get().getSession();                if(sess!=null) {                    int count = sess.getCount();                    String countStatus = "count: "+count;                    return countStatus.getBytes();                }                }                return "".getBytes();            }            public String getContentType() {                return "text/html";            }        };        Application.get().getSharedResources().add("statusResource", dbar);ProgressSession being a Session implementation holding property count.And then in a Page component, I've grabbed a ResourceReference and printed out the accessor url with this:        ResourceReference ref = new ResourceReference( "statusResource");        String url = "">        System.out.println("url:"+url);And the resource gets pulled up fine without the upload occuring at the same time.  but once the upload occurs, it seems to exhibit a blocking behaviour.any ideas?  it shouldn't behave this way right?  i'm using 1.1 final.-kinOn Nov 23, 2005, at 3:02 PM, Johan Compagner wrote:just an idea.The progress bar thread could be a SharedResource request.Those request are not synchonized.And you can give back the progress number everytime the Resource is requested.johan On 11/23/05, Andrew Lombardi [EMAIL PROTECTED] wrote: I've got a need to show an Upload progress bar in a Wicket app thatI've built.  We're uploading some fairly large files and would liketo see some statuses.  Figured out with Igor how to go aboutinjecting a CountingInputStream into the process for FileUpload, but have run into a roadblock!What ends up happening, is the page runs a _javascript_, to showanother page that meta refreshes and shows a status grabbed from thesession.  And at the same time submits the form to start the upload. Only problem is, it seems to block on the form submission  uploadingthe file, and never shows the status page until after its doneprocessing the form.  Obviously too late.Igor mentioned that this was probably because Wicket synchronizes with the session.  And we both think there must be a way around thisthat is missing.the code I have overrides:protected WebRequest newWebRequest(HttpServletRequest servletRequest)and then subclasses ServletWebRequest offering a wrapped MultipartServletWebRequest which passes back a custom FileItem thatwraps the InputStream in a CountingInputStream, that in turn updatesthe Session.  Whew!  That was long.Ideas and thoughts?Thanks! ---This SF.Net email is sponsored by the JBoss Inc.  Get Certified TodayRegister for a JBoss Training Course.  Free Certification Examfor All Training Attendees Through End of 2005. For more info visit: http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click___Wicket-user mailing list Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user 

Re: [Wicket-user] Upload Progress bar

2005-11-23 Thread Nick Heudecker
I don't see how the upload wouldn't block the request thread. You'd need to have another thread running to return the status to the user, and I'm not sure that possible, or even advisable. 
On 11/24/05, Andrew Lombardi [EMAIL PROTECTED] wrote:
johan,ok, i've attempted that, and ran into the same blocking-type behaviour. I've added the following to the init() of my Application:   DynamicByteArrayResource dbar = new DynamicByteArrayResource() {
  protected byte[] getData() {if(RequestCycle.get()!=null) {ProgressSession sess = (ProgressSession) RequestCycle.get().getSession();if(sess!=null) {
  int count = sess.getCount();  String countStatus = count: +count;  return countStatus.getBytes();}
}return .getBytes();  }  public String getContentType() {return text/html;
  }};Application.get().getSharedResources().add(statusResource, dbar);ProgressSession being a Session implementation holding property count.
And then in a Page component, I've grabbed a ResourceReference and printed out the accessor url with this:   ResourceReference ref = new ResourceReference( statusResource);
String url = "">System.out.println(url:+url);And the resource gets pulled up fine without the upload occuring at the same time. but once the upload occurs, it seems to exhibit a blocking behaviour.
any ideas? it shouldn't behave this way right? i'm using 1.1 final.-kinOn Nov 23, 2005, at 3:02 PM, Johan Compagner wrote:
just an idea.The progress bar thread could be a SharedResource request.Those request are not synchonized.And you can give back the progress number everytime the Resource is requested.
johan On 11/23/05, Andrew Lombardi 
[EMAIL PROTECTED] wrote: I've got a need to show an Upload progress bar in a Wicket app that
I've built.We're uploading some fairly large files and would liketo see some statuses.Figured out with Igor how to go aboutinjecting a CountingInputStream into the process for FileUpload, but have run into a roadblock!
What ends up happening, is the page runs a _javascript_, to showanother page that meta refreshes and shows a status grabbed from thesession.And at the same time submits the form to start the upload. Only problem is, it seems to block on the form submissionuploading
the file, and never shows the status page until after its doneprocessing the form.Obviously too late.Igor mentioned that this was probably because Wicket synchronizes with the session.And we both think there must be a way around this
that is missing.the code I have overrides:protected WebRequest newWebRequest(HttpServletRequest servletRequest)and then subclasses ServletWebRequest offering a wrapped MultipartServletWebRequest which passes back a custom FileItem that
wraps the InputStream in a CountingInputStream, that in turn updatesthe Session.Whew!That was long.Ideas and thoughts?Thanks! ---
This SF.Net email is sponsored by the JBoss Inc.Get Certified TodayRegister for a JBoss Training Course.Free Certification Examfor All Training Attendees Through End of 2005. For more info visit: 
http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click___Wicket-user mailing list 
Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user
 



Re: [Wicket-user] Upload Progress bar

2005-11-23 Thread Igor Vaynberg
thats the whole point. the request to retrieve the status would come from another request thread, maybe an iframe with a meta refresh tag or something. why wouldnt this be advisable? http is a multithreaded protocol, as long as the operation of retrieving a resource does not touch any objects in an unthreadsafe manner it should be fine. like retrieving a package resource, why should threads like that block? for pages we need to synchronize on the session because we save the users a lot of headaches by allowing them not to worry about thread safety.
resources are a different matter. imagine a page with a component that renders twenty package resources that are images. we dont want the browser to only be able to retrieve them one by one, its a performance bottleneck which will lead to much longer page loading times. and no, resource caching is not a solution that will fix performance.
however, seems like that is exactly what is happening currently. wicketservlet.doget() calls requestcycle.request() and the first thing that does is synchronize on the session before it knows if the request is for a resource or for a page. to me this looks like a major bug. what do others think?
-IgorOn 11/23/05, Nick Heudecker [EMAIL PROTECTED] wrote:
I don't see how the upload wouldn't block the request thread. You'd need to have another thread running to return the status to the user, and I'm not sure that possible, or even advisable. 

On 11/24/05, Andrew Lombardi [EMAIL PROTECTED] wrote:

johan,ok, i've attempted that, and ran into the same blocking-type behaviour. I've added the following to the init() of my Application:   DynamicByteArrayResource dbar = new DynamicByteArrayResource() {
  protected byte[] getData() {if(RequestCycle.get()!=null) {ProgressSession sess = (ProgressSession) RequestCycle.get().getSession();if(sess!=null) {
  int count = sess.getCount();  String countStatus = count: +count;  return countStatus.getBytes();}
}return .getBytes();  }  public String getContentType() {return text/html;
  }};Application.get().getSharedResources().add(statusResource, dbar);ProgressSession being a Session implementation holding property count.
And then in a Page component, I've grabbed a ResourceReference and printed out the accessor url with this:   ResourceReference ref = new ResourceReference( statusResource);
String url = "">System.out.println(url:+url);And the resource gets pulled up fine without the upload occuring at the same time. but once the upload occurs, it seems to exhibit a blocking behaviour.
any ideas? it shouldn't behave this way right? i'm using 1.1 final.-kinOn Nov 23, 2005, at 3:02 PM, Johan Compagner wrote:
just an idea.The progress bar thread could be a SharedResource request.Those request are not synchonized.And you can give back the progress number everytime the Resource is requested.
johan On 11/23/05, Andrew Lombardi 

[EMAIL PROTECTED] wrote: I've got a need to show an Upload progress bar in a Wicket app that
I've built.We're uploading some fairly large files and would liketo see some statuses.Figured out with Igor how to go aboutinjecting a CountingInputStream into the process for FileUpload, but have run into a roadblock!
What ends up happening, is the page runs a _javascript_, to showanother page that meta refreshes and shows a status grabbed from thesession.And at the same time submits the form to start the upload. Only problem is, it seems to block on the form submissionuploading
the file, and never shows the status page until after its doneprocessing the form.Obviously too late.Igor mentioned that this was probably because Wicket synchronizes with the session.And we both think there must be a way around this
that is missing.the code I have overrides:protected WebRequest newWebRequest(HttpServletRequest servletRequest)and then subclasses ServletWebRequest offering a wrapped MultipartServletWebRequest which passes back a custom FileItem that
wraps the InputStream in a CountingInputStream, that in turn updatesthe Session.Whew!That was long.Ideas and thoughts?Thanks! ---
This SF.Net email is sponsored by the JBoss Inc.Get Certified TodayRegister for a JBoss Training Course.Free Certification Examfor All Training Attendees Through End of 2005. For more info visit: 

http://ads.osdn.com/?ad_id=7628alloc_id=16845op=click___Wicket-user mailing list 

Wicket-user@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/wicket-user