Re: SubmitLink question

2009-02-16 Thread Martijn Reuvers
Hello Igor,

I am new to this list, so what do you mean with a quickstart?

Martijn

On Mon, Feb 16, 2009 at 5:46 AM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 quickstart please

 -igor

 On Sun, Feb 15, 2009 at 2:00 PM, Martijn Reuvers
 martijn.reuv...@gmail.com wrote:
 Hello everyone,

 I have a question about a SubmitLink. I am using wicket 1.4.rc2 and am
 trying to add some logic to the onSubmit() of the link. However when I
 do not use the constructor where you need to pass the Form to it, it
 generates really 'weird' html and the link does not work. The link is
 a child (somewhere down the hierarchy) of a Form. The form is a
 transparent resolver, if I pass the form along it happily works and
 generates the needed javascript in the onclick of the link.

 Without form parameter SubmitLink generates something like:  a
 href=# onclickspanDetailed information/span/a. As you can see
 the onclick is not finished (the spans are from a Label). Any ideas?

 Best regards,
 Martijn

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



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



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



Re: SubmitLink question

2009-02-16 Thread Martin Voigt
Wicket is built using apache maven 2. A quickstart is a
self-containing project created from the wicket-quickstart archetype
which uses Jetty as it's servlet container and is usually used to
demonstrate bugs or issues.

Go here: http://wicket.apache.org/quickstart.html and generate a
quickstart project quite easily. Then try to reproduce your problem in
the generated project, and if the problem still occurs, it is likely
that the source of the problem lies within wicket and not within your
custom code. In that case, create a JIRA issue here:
http://issues.apache.org/jira/browse/WICKET and attach your quickstart
project reproducing the problem.

Martin

2009/2/16 Martijn Reuvers martijn.reuv...@gmail.com:
 Hello Igor,

 I am new to this list, so what do you mean with a quickstart?

 Martijn

 On Mon, Feb 16, 2009 at 5:46 AM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 quickstart please

 -igor

 On Sun, Feb 15, 2009 at 2:00 PM, Martijn Reuvers
 martijn.reuv...@gmail.com wrote:
 Hello everyone,

 I have a question about a SubmitLink. I am using wicket 1.4.rc2 and am
 trying to add some logic to the onSubmit() of the link. However when I
 do not use the constructor where you need to pass the Form to it, it
 generates really 'weird' html and the link does not work. The link is
 a child (somewhere down the hierarchy) of a Form. The form is a
 transparent resolver, if I pass the form along it happily works and
 generates the needed javascript in the onclick of the link.

 Without form parameter SubmitLink generates something like:  a
 href=# onclickspanDetailed information/span/a. As you can see
 the onclick is not finished (the spans are from a Label). Any ideas?

 Best regards,
 Martijn

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



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



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



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



Problem in Wicket Stuff - Jquery - DatePicker

2009-02-16 Thread Dipu
In Wicket Stuff - Jquery - DatePicker - DatePickerBehavior

the following line in the onBind() method

 if (component instanceof ITextFormatProvider) {
format_ = ((ITextFormatProvider) component).getTextFormat();

should be

 if (component instanceof ITextFormatProvider) {
format_ = ((ITextFormatProvider)
component).getTextFormat().toLowerCase();


i have created a patch, can some one apply the patch please.


regards
dipu
Index: src/main/java/org/wicketstuff/jquery/datepicker/DatePickerBehavior.java
===
--- src/main/java/org/wicketstuff/jquery/datepicker/DatePickerBehavior.java 
(revision 4574)
+++ src/main/java/org/wicketstuff/jquery/datepicker/DatePickerBehavior.java 
(working copy)
@@ -157,7 +157,7 @@
 component.setOutputMarkupId(true);
 
 if (component instanceof ITextFormatProvider) {
-   format_ = ((ITextFormatProvider) component).getTextFormat();
+   format_ = ((ITextFormatProvider) 
component).getTextFormat().toLowerCase();
 } else {
TextField tf = (TextField) component;
IConverter cnv = tf.getConverter(tf.getType());
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Wicket meetup in Switzerland?

2009-02-16 Thread Thomas Mäder
Hi Folks,

I would be willing to organize a Wicket meetup in Switzerland if there is
enough interest. I propose a meeting somewhere in Zürich. The format I
imagine is that participants could (don't have to) shortly (15-20min.)
present their work with Wicket (demos are always nice). That would be
followed by general mingling with drinks  snacks.
For the date, I would shoot for the week starting March 16, 17:30-20:30h.
Would you be interested in participating in/hosting/sponsoring such a thing?
Either reply here or to me privately, and if there is enough interest, I'll
set up a thing on the wiki.

Thomas

-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Adding multiple ajax behavious on same event

2009-02-16 Thread rag...@directi

I am using an AjaxLink which has a javascript for onclick event now i want to
add AjaxFormValidatingBehavior  to this link on the same event onclick
...i tried adding the same...but the link does not  work properly...i think
the actual javascript is replacedcan any one please help me how to do
this...

I had a look at IAjaxCallDecorator  also.. If i hv understood
IAjaxCallDecorator  correctly i can use it to append to the javascriptso
one way could be to have a look at the javascript generated by
AjaxFormValidatingBehavior   and append it to the javascript of
ajaxlink.but is there a cleaner way to do this..
-- 
View this message in context: 
http://www.nabble.com/Adding-multiple-ajax-behavious-on-same-event-tp22035278p22035278.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: SubmitLink question

2009-02-16 Thread Martijn Reuvers
Hi Martin,

Thanks for the info! I'll give it a try and see if I can reproduce it somehow.

Martijn

On Mon, Feb 16, 2009 at 10:15 AM, Martin Voigt
martin.vo...@artnology.com wrote:
 Wicket is built using apache maven 2. A quickstart is a
 self-containing project created from the wicket-quickstart archetype
 which uses Jetty as it's servlet container and is usually used to
 demonstrate bugs or issues.

 Go here: http://wicket.apache.org/quickstart.html and generate a
 quickstart project quite easily. Then try to reproduce your problem in
 the generated project, and if the problem still occurs, it is likely
 that the source of the problem lies within wicket and not within your
 custom code. In that case, create a JIRA issue here:
 http://issues.apache.org/jira/browse/WICKET and attach your quickstart
 project reproducing the problem.

 Martin

 2009/2/16 Martijn Reuvers martijn.reuv...@gmail.com:
 Hello Igor,

 I am new to this list, so what do you mean with a quickstart?

 Martijn

 On Mon, Feb 16, 2009 at 5:46 AM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 quickstart please

 -igor

 On Sun, Feb 15, 2009 at 2:00 PM, Martijn Reuvers
 martijn.reuv...@gmail.com wrote:
 Hello everyone,

 I have a question about a SubmitLink. I am using wicket 1.4.rc2 and am
 trying to add some logic to the onSubmit() of the link. However when I
 do not use the constructor where you need to pass the Form to it, it
 generates really 'weird' html and the link does not work. The link is
 a child (somewhere down the hierarchy) of a Form. The form is a
 transparent resolver, if I pass the form along it happily works and
 generates the needed javascript in the onclick of the link.

 Without form parameter SubmitLink generates something like:  a
 href=# onclickspanDetailed information/span/a. As you can see
 the onclick is not finished (the spans are from a Label). Any ideas?

 Best regards,
 Martijn

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



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



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



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



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



Drop Down Box - Ajax Behaviour

2009-02-16 Thread Daniel Ferreira Castro
I read the examples of Ajax Forms and I am trying to adapt it to my needs.
I have a form with a input text, a drop down box, a feedback panel and a
submit button.

My submit is an ajaxButton.
My form setsOutputMarkupId(true);
My dropdown sets OutputMarkupId(true);

When I submit my form it inserts an item on a table.
My intention is after the form submit the dropdown uptades itself, adding
the previously inserted item to its options.

how to do it?

-- 
Two rules to succeed in life:
1 - don´t tell people everything you know.

We shall go on to the end.
We shall fight in France
We shall fightover the seas and oceans.
We shall fight with growing confidence and growing strength in the air.
We shall defend our island whatever the cost may be
We shall fight on beaches, we shall fight on the landing grounds,
We shall fight in the fields and in the streets,
We shall fight on the hills.
We shall never surrender.
Winston Churchill


RE: Wicket at ApacheCon EU'09 in Amsterdam

2009-02-16 Thread Hoover, William
That is a good point... That is the very reason why they are now trying
to push WebBeans as part of the standard profile ;o)

-Original Message-
From: Oleg Taranenko [mailto:taranenko.for...@googlemail.com] 
Sent: Friday, February 13, 2009 4:05 PM
To: users@wicket.apache.org
Subject: Re: Wicket at ApacheCon EU'09 in Amsterdam

Hmm...

some time ago (approx 1,5 year ) was attempts to marry JBoss Seam and
Wicket. Was it successful? May be this is an example, why wicket should
to be treated as a standard?

Oleg

On Fri, Feb 13, 2009 at 4:59 PM, Hoover, William
whoo...@nemours.orgwrote:

 First of all, thank you for entertaining this idea :o)

 See comments below...

 -Original Message-
 From: Johan Compagner [mailto:jcompag...@gmail.com]
 Sent: Friday, February 13, 2009 9:38 AM
 To: users@wicket.apache.org
 Subject: Re: Wicket at ApacheCon EU'09 in Amsterdam

 
  From a developers point-of-view standardization can often be a thorn

  in our side, but for management it can offer a 
  vendor-independent/implementation-independent solution.
  Maintaining/upgrading infrastructure is difficult, expensive and 
  time consuming. From the point-of-view of management a standard can 
  often minimize the risk of vender lock-in.



 But the examples you gave me have multiply implementations. But wicket

 doesnt have multiply implementations, what would that mean?
 That we have IComponent, IRequestCycle, ISession and IApplication and 
 so on?
 And that IBM would make its own implementation of all the components 
 including the base? And JBoss and X and Y?

 Answer: They do not have multiple implementations now, but they could 
 potentially have them in the future. It would mean that other 
 communities could follow a standard and mangement could be satisfied 
 that Wicket has the backing of a recognized standard.

 There is no vendor locking for wicket.. (and all other open source web

 frameworks by the way) what is the locking?

 Answer: I agree that other frameworks that have a standard have been 
 disastrous as far as portability between implementations (such as the 
 loosly organized JSF specification), but the locking I'm referring to 
 is in realation to the vendor (Wicket in this case) from a business 
 standpoint. I for one do not have an issue with being tightly coupled 
 to Wicket, but I can see why managment may have an issue with it. A 
 question we need to ask ourselves from a management standpoit is if 
 for whatever reason we had to migrate from Wicket to another 
 framework, what revenue impact would that have on our organization in 
 doing so? If we chose a standards base solution would this minimize 
 the risk due to multiple vendor offerings?

 And wicket runs pretty much on all simple servlet containers.. Some 
 bugs in some not counting...
 So give me a concreet example what a standardized wicket would look 
 like.
 What vendor-independent/implementation-independent solutions there 
 would be then..

 Answer: This is a preliminary concept, but the Swing-like architecture

 for the web could be a starting point?


 
  Another thing to consider is that a broader multi-community 
  involvement could also bread innovation. There may be other 
  innovators

  from other communities that may have valuable input that could 
  improve

  Wicket in ways that may have not been previously considered. IMHO, 
  the

  biggest argument for JSR/JCP is that there is often a broader
 involvement in the process.
  Hibernate, for instance, was in a similar position a few years back 
  when they introduced a new persistence concept. They have since 
  become

  heavily involved in the JPA specification process. When I first 
  worked

  with Hibernate, like many, I was very impressed (similar to the 
  first time I worked with Wicket :o), but looking back at how 
  Hiberante initially did things to how they do them now there are 
  some huge improvements due to the JPA specification.
 
 
 look hibernate is an implementation of a persistence.. And they 
 adapted (and where involved) into the specifications yes Ok now 
 translate that to wicket..
 What is wicket an implementation of? a webframework? ahh.. tapestry is

 also a webframework and struts is also a webframework They all 
 implement the standard webframework spec.. which is the servlet spec..
 So

 JPA Spec == Servlet Spec
 Hibernate == Wicket
 TopLink == Tapestry

 So wicket is already in the JSR/JCP ! we are an 
 enhancement/implementation of the servlet spec :) ok ok. Maybe you 
 say.. sevlet spec implementation == servlet .jar and tomcat  ;) not 
 the thing you would build on top of that again But then if you have 
 wicket,tapestry and struts (and x and y) and then you want to define a

 Web Framework spec that all of them can adapt to what would that then 
 be? What would that then gain? Would that mean that tapestry 
 components/pages could run inside wicket?
 It is just not as easy to do as with a persistence spec. Which is 
 pretty easy 

RE: Wicket at ApacheCon EU'09 in Amsterdam

2009-02-16 Thread Hoover, William
http://opensource.atlassian.com/confluence/spring/display/JSR168/2008/04
/18/Plans+for+JSR+286+Support 

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Friday, February 13, 2009 4:15 PM
To: users@wicket.apache.org
Subject: Re: Wicket at ApacheCon EU'09 in Amsterdam

how will having wicket as a standard help this?

look at spring, it is no jsr but a lot of projects integrate with it,
and it in return integrates with other projects.

anyways, there is already a start of wicket seam support by the seam
folks.

http://in.relation.to/Bloggers/SeamlessWicket

-igor

On Fri, Feb 13, 2009 at 1:05 PM, Oleg Taranenko
taranenko.for...@googlemail.com wrote:
 Hmm...

 some time ago (approx 1,5 year ) was attempts to marry JBoss Seam and 
 Wicket. Was it successful? May be this is an example, why wicket 
 should to be treated as a standard?

 Oleg

 On Fri, Feb 13, 2009 at 4:59 PM, Hoover, William
whoo...@nemours.orgwrote:

 First of all, thank you for entertaining this idea :o)

 See comments below...

 -Original Message-
 From: Johan Compagner [mailto:jcompag...@gmail.com]
 Sent: Friday, February 13, 2009 9:38 AM
 To: users@wicket.apache.org
 Subject: Re: Wicket at ApacheCon EU'09 in Amsterdam

 
  From a developers point-of-view standardization can often be a 
  thorn in our side, but for management it can offer a 
  vendor-independent/implementation-independent solution.
  Maintaining/upgrading infrastructure is difficult, expensive and 
  time consuming. From the point-of-view of management a standard can

  often minimize the risk of vender lock-in.



 But the examples you gave me have multiply implementations. But 
 wicket doesnt have multiply implementations, what would that mean?
 That we have IComponent, IRequestCycle, ISession and IApplication and

 so on?
 And that IBM would make its own implementation of all the components 
 including the base? And JBoss and X and Y?

 Answer: They do not have multiple implementations now, but they could

 potentially have them in the future. It would mean that other 
 communities could follow a standard and mangement could be satisfied 
 that Wicket has the backing of a recognized standard.

 There is no vendor locking for wicket.. (and all other open source 
 web frameworks by the way) what is the locking?

 Answer: I agree that other frameworks that have a standard have been 
 disastrous as far as portability between implementations (such as the

 loosly organized JSF specification), but the locking I'm referring to

 is in realation to the vendor (Wicket in this case) from a business 
 standpoint. I for one do not have an issue with being tightly coupled

 to Wicket, but I can see why managment may have an issue with it. A 
 question we need to ask ourselves from a management standpoit is if 
 for whatever reason we had to migrate from Wicket to another 
 framework, what revenue impact would that have on our organization in

 doing so? If we chose a standards base solution would this minimize 
 the risk due to multiple vendor offerings?

 And wicket runs pretty much on all simple servlet containers.. Some 
 bugs in some not counting...
 So give me a concreet example what a standardized wicket would look 
 like.
 What vendor-independent/implementation-independent solutions there 
 would be then..

 Answer: This is a preliminary concept, but the Swing-like 
 architecture for the web could be a starting point?


 
  Another thing to consider is that a broader multi-community 
  involvement could also bread innovation. There may be other 
  innovators

  from other communities that may have valuable input that could 
  improve

  Wicket in ways that may have not been previously considered. IMHO, 
  the

  biggest argument for JSR/JCP is that there is often a broader
 involvement in the process.
  Hibernate, for instance, was in a similar position a few years back

  when they introduced a new persistence concept. They have since 
  become

  heavily involved in the JPA specification process. When I first 
  worked

  with Hibernate, like many, I was very impressed (similar to the 
  first time I worked with Wicket :o), but looking back at how 
  Hiberante initially did things to how they do them now there are 
  some huge improvements due to the JPA specification.
 
 
 look hibernate is an implementation of a persistence.. And they 
 adapted (and where involved) into the specifications yes Ok now 
 translate that to wicket..
 What is wicket an implementation of? a webframework? ahh.. tapestry 
 is also a webframework and struts is also a webframework They all 
 implement the standard webframework spec.. which is the servlet 
 spec..
 So

 JPA Spec == Servlet Spec
 Hibernate == Wicket
 TopLink == Tapestry

 So wicket is already in the JSR/JCP ! we are an 
 enhancement/implementation of the servlet spec :) ok ok. Maybe you 
 say.. sevlet spec implementation == servlet .jar and tomcat  ;) not 
 the thing you would build on top 

Encoding Russian pages

2009-02-16 Thread Tim Squires
Hi,

I have been sent Russian translations to my default English pages.  Wicket
picks up the _ru.properties bundles correctly but somewhere along the way,
the encoding is not changing from UTF-8.  I gather that the Russian
translated pages will need an encoding of cp1251.

I have tried to force the encoding in the Page template using

protected void configureResponse() {
super.configureResponse();
final String encoding = text/ + getMarkupType() + ; charset=cp1251;
getResponse().setContentType(encoding);
}

and in the application class

@Override
protected void init() {
super.init();
getMarkupSettings().setDefaultMarkupEncoding(cp1251);
}

but still Firefox and IE in Linux and Win show a page encoding of UTF-8.

From the wiki

http://cwiki.apache.org/WICKET/how-to-change-the-character-encoding.html

and other mail, it looks like it's a problem outside of Wicket but I was
hoping someone here would know a fix.

You can see the test version at http://imagebank.crystalmark.co.uk

I'm pretty sure my pc's are setup OK because I can see other Russian
websites ok (although I cannot actually read them).

Can anyone point me to what I have missed?

Thanks,
Tim




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



Re: inmethod datagrid, validation, and feedback

2009-02-16 Thread Will Jaynes
On Sun, Feb 15, 2009 at 10:40 PM, Timo Rantalaiho timo.rantala...@ri.fiwrote:

 On Sun, 15 Feb 2009, Will Jaynes wrote:
  So, how would one show those error messages? And where would such code
 get
  hooked in?

 I'm not sure about the place but basically you have to add a
 FeedbackPanel and update it in the ajax event that causes
 the error,

  final Component feedback = new FeedbackPanel(feedback)
  .setOutputMarkupPlaceHolder(true);
  add(feedback);
  ...
  @Override protected void onSubmit(AjaxRequestTarget target) {
  target.addComponent(feedback);
  ...
  }

 Best wishes,
 Timo


 AH, yes. Thanks. And the place to do it is in the SubmitCancelColumn :

columns.add(new SubmitCancelColumn(esd, new Model(Edit))
{
@Override
protected void onError(AjaxRequestTarget target, IModel
rowModel, WebMarkupContainer rowComponent)
{
target.addComponent(feedback);
super.onError(target, rowModel, rowComponent);
}
});


Re: Encoding Russian pages

2009-02-16 Thread Thomas Mäder
Hi Tim,

.properteis files are ALWAYS in ISO59something encoding (see the Javadoc to
java.lang.Properties. If you want to use a different encoding, you'll have
to either recode your properties files, use xml properties or somehow load
the .properties files yourself.

Thomas

On Mon, Feb 16, 2009 at 2:04 PM, Tim Squires w...@tnwdb.com wrote:

 Hi,

 I have been sent Russian translations to my default English pages.  Wicket
 picks up the _ru.properties bundles correctly but somewhere along the way,
 the encoding is not changing from UTF-8.  I gather that the Russian
 translated pages will need an encoding of cp1251.

 I have tried to force the encoding in the Page template using

 protected void configureResponse() {
super.configureResponse();
final String encoding = text/ + getMarkupType() + ;
 charset=cp1251;
getResponse().setContentType(encoding);
 }

 and in the application class

 @Override
 protected void init() {
super.init();
getMarkupSettings().setDefaultMarkupEncoding(cp1251);
 }

 but still Firefox and IE in Linux and Win show a page encoding of UTF-8.

 From the wiki

 http://cwiki.apache.org/WICKET/how-to-change-the-character-encoding.html

 and other mail, it looks like it's a problem outside of Wicket but I was
 hoping someone here would know a fix.

 You can see the test version at http://imagebank.crystalmark.co.uk

 I'm pretty sure my pc's are setup OK because I can see other Russian
 websites ok (although I cannot actually read them).

 Can anyone point me to what I have missed?

 Thanks,
 Tim




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




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


SVN Checkout slow?

2009-02-16 Thread Thomas Mäder
Hi Guys,

I'm trying to check out wicket  wicket-extensions 1.4. RC2 from the svn
repository (via http). This is taking something like half an hour. Is that
normal?

Thomas

-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


RE: Wicket at ApacheCon EU'09 in Amsterdam

2009-02-16 Thread cpopetz


As the programmer currently maintaining/improving the seam/wicket
integration:

(a) I recently got a change to wicket from Igor in less than a day, upon
request, to support this integration.  I doubt I would have had as much luck
if the behavior of wicket was in a JSR, but in any case, the lack of a JSR
didn't hinder me.

(b) I've coded things to JSR specs before, and found it no easier (and often
less) than reading wicket's source, which is very well commented, and asking
questions.  The ability to target a technology for integration is not about
whether it's standardized.

(c) I won't comment on the why of Seam turning into WebBeans using JSR,
but having been on the WebBeans mailing list for a while, I don't think I
would ever volunteer to shepherd anything through that process.  It was
dreadful, slow, and a lot of compromises were made that IMHO had no
technical merit and were completely politically motivated.

-Clint


whoover wrote:
 
 That is a good point... That is the very reason why they are now trying
 to push WebBeans as part of the standard profile ;o)
 
 -Original Message-
 From: Oleg Taranenko [mailto:taranenko.for...@googlemail.com] 
 Sent: Friday, February 13, 2009 4:05 PM
 To: users@wicket.apache.org
 Subject: Re: Wicket at ApacheCon EU'09 in Amsterdam
 
 Hmm...
 
 some time ago (approx 1,5 year ) was attempts to marry JBoss Seam and
 Wicket. Was it successful? May be this is an example, why wicket should
 to be treated as a standard?
 
 Oleg
 
 On Fri, Feb 13, 2009 at 4:59 PM, Hoover, William
 whoo...@nemours.orgwrote:
 
 First of all, thank you for entertaining this idea :o)

 See comments below...

 -Original Message-
 From: Johan Compagner [mailto:jcompag...@gmail.com]
 Sent: Friday, February 13, 2009 9:38 AM
 To: users@wicket.apache.org
 Subject: Re: Wicket at ApacheCon EU'09 in Amsterdam

 
  From a developers point-of-view standardization can often be a thorn
 
  in our side, but for management it can offer a 
  vendor-independent/implementation-independent solution.
  Maintaining/upgrading infrastructure is difficult, expensive and 
  time consuming. From the point-of-view of management a standard can 
  often minimize the risk of vender lock-in.



 But the examples you gave me have multiply implementations. But wicket
 
 doesnt have multiply implementations, what would that mean?
 That we have IComponent, IRequestCycle, ISession and IApplication and 
 so on?
 And that IBM would make its own implementation of all the components 
 including the base? And JBoss and X and Y?

 Answer: They do not have multiple implementations now, but they could 
 potentially have them in the future. It would mean that other 
 communities could follow a standard and mangement could be satisfied 
 that Wicket has the backing of a recognized standard.

 There is no vendor locking for wicket.. (and all other open source web
 
 frameworks by the way) what is the locking?

 Answer: I agree that other frameworks that have a standard have been 
 disastrous as far as portability between implementations (such as the 
 loosly organized JSF specification), but the locking I'm referring to 
 is in realation to the vendor (Wicket in this case) from a business 
 standpoint. I for one do not have an issue with being tightly coupled 
 to Wicket, but I can see why managment may have an issue with it. A 
 question we need to ask ourselves from a management standpoit is if 
 for whatever reason we had to migrate from Wicket to another 
 framework, what revenue impact would that have on our organization in 
 doing so? If we chose a standards base solution would this minimize 
 the risk due to multiple vendor offerings?

 And wicket runs pretty much on all simple servlet containers.. Some 
 bugs in some not counting...
 So give me a concreet example what a standardized wicket would look 
 like.
 What vendor-independent/implementation-independent solutions there 
 would be then..

 Answer: This is a preliminary concept, but the Swing-like architecture
 
 for the web could be a starting point?


 
  Another thing to consider is that a broader multi-community 
  involvement could also bread innovation. There may be other 
  innovators

  from other communities that may have valuable input that could 
  improve

  Wicket in ways that may have not been previously considered. IMHO, 
  the

  biggest argument for JSR/JCP is that there is often a broader
 involvement in the process.
  Hibernate, for instance, was in a similar position a few years back 
  when they introduced a new persistence concept. They have since 
  become

  heavily involved in the JPA specification process. When I first 
  worked

  with Hibernate, like many, I was very impressed (similar to the 
  first time I worked with Wicket :o), but looking back at how 
  Hiberante initially did things to how they do them now there are 
  some huge improvements due to the JPA specification.
 
 
 look hibernate is an implementation of a 

Re: SVN Checkout slow?

2009-02-16 Thread Martijn Dashorst
try svn.eu.apache.org instead.

Martijn

On Mon, Feb 16, 2009 at 2:34 PM, Thomas Mäder
thomas.mae...@devotek-it.ch wrote:
 Hi Guys,

 I'm trying to check out wicket  wicket-extensions 1.4. RC2 from the svn
 repository (via http). This is taking something like half an hour. Is that
 normal?

 Thomas

 --
 Thomas Mäder
 Wicket  Eclipse Consulting
 www.devotek-it.ch




-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: SVN Checkout slow?

2009-02-16 Thread Thomas Mäder
Thanks, that's 100x faster.

Thomas

On Mon, Feb 16, 2009 at 2:46 PM, Martijn Dashorst 
martijn.dasho...@gmail.com wrote:

 try svn.eu.apache.org instead.

 Martijn

 On Mon, Feb 16, 2009 at 2:34 PM, Thomas Mäder
 thomas.mae...@devotek-it.ch wrote:
  Hi Guys,
 
  I'm trying to check out wicket  wicket-extensions 1.4. RC2 from the svn
  repository (via http). This is taking something like half an hour. Is
 that
  normal?
 
  Thomas
 
  --
  Thomas Mäder
  Wicket  Eclipse Consulting
  www.devotek-it.ch
 



 --
 Become a Wicket expert, learn from the best: http://wicketinaction.com
 Apache Wicket 1.3.5 is released
 Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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




-- 
Thomas Mäder
Wicket  Eclipse Consulting
www.devotek-it.ch


Re: Encoding Russian pages

2009-02-16 Thread Maarten Bosteels
If you think about re-implementing ResourceBundle to support UTF-8
properties files
have a look at spring's ReloadableResourceBundleMessageSource.

http://static.springframework.org/spring/docs/1.2.x/api/org/springframework/context/support/ReloadableResourceBundleMessageSource.html#setDefaultEncoding(java.lang.String)

regards,
Maarten

On Mon, Feb 16, 2009 at 2:09 PM, Thomas Mäder
thomas.mae...@devotek-it.chwrote:

 Hi Tim,

 .properteis files are ALWAYS in ISO59something encoding (see the Javadoc to
 java.lang.Properties. If you want to use a different encoding, you'll have
 to either recode your properties files, use xml properties or somehow load
 the .properties files yourself.

 Thomas

 On Mon, Feb 16, 2009 at 2:04 PM, Tim Squires w...@tnwdb.com wrote:

  Hi,
 
  I have been sent Russian translations to my default English pages.
  Wicket
  picks up the _ru.properties bundles correctly but somewhere along the
 way,
  the encoding is not changing from UTF-8.  I gather that the Russian
  translated pages will need an encoding of cp1251.
 
  I have tried to force the encoding in the Page template using
 
  protected void configureResponse() {
 super.configureResponse();
 final String encoding = text/ + getMarkupType() + ;
  charset=cp1251;
 getResponse().setContentType(encoding);
  }
 
  and in the application class
 
  @Override
  protected void init() {
 super.init();
 getMarkupSettings().setDefaultMarkupEncoding(cp1251);
  }
 
  but still Firefox and IE in Linux and Win show a page encoding of UTF-8.
 
  From the wiki
 
  http://cwiki.apache.org/WICKET/how-to-change-the-character-encoding.html
 
  and other mail, it looks like it's a problem outside of Wicket but I was
  hoping someone here would know a fix.
 
  You can see the test version at http://imagebank.crystalmark.co.uk
 
  I'm pretty sure my pc's are setup OK because I can see other Russian
  websites ok (although I cannot actually read them).
 
  Can anyone point me to what I have missed?
 
  Thanks,
  Tim
 
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 


 --
 Thomas Mäder
 Wicket  Eclipse Consulting
 www.devotek-it.ch



exception handling for session dependent URLs

2009-02-16 Thread Michael Sparer

I recently came across a link to one of my projects where a user linked to a
session dependent URL such as /?wicket:interface=:0::IBehaviorListener:2:3

when clicking on that URL, a PageExpiredException gets thrown and a redirect
to the SessionExpiredPage takes place. So far so good - that's the way it
should be.
However this works only for the first request (as long as the user doesn't
have a session). If the user has a session and clicks on that link different
exceptions might get thrown. with the URL mentioned above I've seen either a
IllegalStateException (when it couldn't find a IBehaviorListener with the
corresponding ID) or a ClassCastException (when it tried to cast a
HeaderContributor to an IBehaviorListener in BehaviorRequestTarget).

I must admit I didn't look into the code that thoroughly as I wanted to ask
you first how you go about this problem (or it may be already fixed in
1.3.6/1.4 - I'm using 1.3.5). I thinks accidentally pasting session
dependent URLs in blogs etc. shouldn't result in server errors ... would it
be save to throw e.g. a PageExpiredException instead of
IllegalStateExceptions?

Michael




-
Michael Sparer
http://techblog.molindo.at
-- 
View this message in context: 
http://www.nabble.com/exception-handling-for-session-dependent-URLs-tp22037821p22037821.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Drop Down Box - Ajax Behaviour

2009-02-16 Thread Eyal Golan
Where do yo u have the values in the DropDown in the first place?
If you use a model, why not updating it?


Eyal Golan
egola...@gmail.com

Visit: http://jvdrums.sourceforge.net/
LinkedIn: http://www.linkedin.com/in/egolan74

P  Save a tree. Please don't print this e-mail unless it's really necessary


On Mon, Feb 16, 2009 at 2:13 PM, Daniel Ferreira Castro
dfcas...@gmail.comwrote:

 I read the examples of Ajax Forms and I am trying to adapt it to my needs.
 I have a form with a input text, a drop down box, a feedback panel and a
 submit button.

 My submit is an ajaxButton.
 My form setsOutputMarkupId(true);
 My dropdown sets OutputMarkupId(true);

 When I submit my form it inserts an item on a table.
 My intention is after the form submit the dropdown uptades itself, adding
 the previously inserted item to its options.

 how to do it?

 --
 Two rules to succeed in life:
 1 - don´t tell people everything you know.
 
 We shall go on to the end.
 We shall fight in France
 We shall fightover the seas and oceans.
 We shall fight with growing confidence and growing strength in the air.
 We shall defend our island whatever the cost may be
 We shall fight on beaches, we shall fight on the landing grounds,
 We shall fight in the fields and in the streets,
 We shall fight on the hills.
 We shall never surrender.
 Winston Churchill



Re: Encoding Russian pages

2009-02-16 Thread Tim Squires
After more than 10 years using .properties and I did not twig that it may
be the .properties encoding limitation.

After an hour and a touch of RSA all .properties are now xml and it's
working great.  Thanks for the tip.

And thanks Maarten for the pointer to Spring resource bundles.

Tim

 Hi Tim,

 .properteis files are ALWAYS in ISO59something encoding (see the Javadoc
 to
 java.lang.Properties. If you want to use a different encoding, you'll have
 to either recode your properties files, use xml properties or somehow load
 the .properties files yourself.

 Thomas

 On Mon, Feb 16, 2009 at 2:04 PM, Tim Squires w...@tnwdb.com wrote:

 Hi,

 I have been sent Russian translations to my default English pages.
 Wicket
 picks up the _ru.properties bundles correctly but somewhere along the
 way,
 the encoding is not changing from UTF-8.  I gather that the Russian
 translated pages will need an encoding of cp1251.

 I have tried to force the encoding in the Page template using

 protected void configureResponse() {
super.configureResponse();
final String encoding = text/ + getMarkupType() + ;
 charset=cp1251;
getResponse().setContentType(encoding);
 }

 and in the application class

 @Override
 protected void init() {
super.init();
getMarkupSettings().setDefaultMarkupEncoding(cp1251);
 }

 but still Firefox and IE in Linux and Win show a page encoding of UTF-8.

 From the wiki

 http://cwiki.apache.org/WICKET/how-to-change-the-character-encoding.html

 and other mail, it looks like it's a problem outside of Wicket but I was
 hoping someone here would know a fix.

 You can see the test version at http://imagebank.crystalmark.co.uk

 I'm pretty sure my pc's are setup OK because I can see other Russian
 websites ok (although I cannot actually read them).

 Can anyone point me to what I have missed?

 Thanks,
 Tim




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




 --
 Thomas Mäder
 Wicket  Eclipse Consulting
 www.devotek-it.ch




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



RE: Wicket at ApacheCon EU'09 in Amsterdam

2009-02-16 Thread Hoover, William
Rod Johnson (creator of spring) talks about JCP, JEE, and Spring:

http://java.sys-con.com/node/732455

-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com] 
Sent: Friday, February 13, 2009 4:15 PM
To: users@wicket.apache.org
Subject: Re: Wicket at ApacheCon EU'09 in Amsterdam

how will having wicket as a standard help this?

look at spring, it is no jsr but a lot of projects integrate with it,
and it in return integrates with other projects.

anyways, there is already a start of wicket seam support by the seam
folks.

http://in.relation.to/Bloggers/SeamlessWicket

-igor

On Fri, Feb 13, 2009 at 1:05 PM, Oleg Taranenko
taranenko.for...@googlemail.com wrote:
 Hmm...

 some time ago (approx 1,5 year ) was attempts to marry JBoss Seam and 
 Wicket. Was it successful? May be this is an example, why wicket 
 should to be treated as a standard?

 Oleg

 On Fri, Feb 13, 2009 at 4:59 PM, Hoover, William
whoo...@nemours.orgwrote:

 First of all, thank you for entertaining this idea :o)

 See comments below...

 -Original Message-
 From: Johan Compagner [mailto:jcompag...@gmail.com]
 Sent: Friday, February 13, 2009 9:38 AM
 To: users@wicket.apache.org
 Subject: Re: Wicket at ApacheCon EU'09 in Amsterdam

 
  From a developers point-of-view standardization can often be a 
  thorn in our side, but for management it can offer a 
  vendor-independent/implementation-independent solution.
  Maintaining/upgrading infrastructure is difficult, expensive and 
  time consuming. From the point-of-view of management a standard can

  often minimize the risk of vender lock-in.



 But the examples you gave me have multiply implementations. But 
 wicket doesnt have multiply implementations, what would that mean?
 That we have IComponent, IRequestCycle, ISession and IApplication and

 so on?
 And that IBM would make its own implementation of all the components 
 including the base? And JBoss and X and Y?

 Answer: They do not have multiple implementations now, but they could

 potentially have them in the future. It would mean that other 
 communities could follow a standard and mangement could be satisfied 
 that Wicket has the backing of a recognized standard.

 There is no vendor locking for wicket.. (and all other open source 
 web frameworks by the way) what is the locking?

 Answer: I agree that other frameworks that have a standard have been 
 disastrous as far as portability between implementations (such as the

 loosly organized JSF specification), but the locking I'm referring to

 is in realation to the vendor (Wicket in this case) from a business 
 standpoint. I for one do not have an issue with being tightly coupled

 to Wicket, but I can see why managment may have an issue with it. A 
 question we need to ask ourselves from a management standpoit is if 
 for whatever reason we had to migrate from Wicket to another 
 framework, what revenue impact would that have on our organization in

 doing so? If we chose a standards base solution would this minimize 
 the risk due to multiple vendor offerings?

 And wicket runs pretty much on all simple servlet containers.. Some 
 bugs in some not counting...
 So give me a concreet example what a standardized wicket would look 
 like.
 What vendor-independent/implementation-independent solutions there 
 would be then..

 Answer: This is a preliminary concept, but the Swing-like 
 architecture for the web could be a starting point?


 
  Another thing to consider is that a broader multi-community 
  involvement could also bread innovation. There may be other 
  innovators

  from other communities that may have valuable input that could 
  improve

  Wicket in ways that may have not been previously considered. IMHO, 
  the

  biggest argument for JSR/JCP is that there is often a broader
 involvement in the process.
  Hibernate, for instance, was in a similar position a few years back

  when they introduced a new persistence concept. They have since 
  become

  heavily involved in the JPA specification process. When I first 
  worked

  with Hibernate, like many, I was very impressed (similar to the 
  first time I worked with Wicket :o), but looking back at how 
  Hiberante initially did things to how they do them now there are 
  some huge improvements due to the JPA specification.
 
 
 look hibernate is an implementation of a persistence.. And they 
 adapted (and where involved) into the specifications yes Ok now 
 translate that to wicket..
 What is wicket an implementation of? a webframework? ahh.. tapestry 
 is also a webframework and struts is also a webframework They all 
 implement the standard webframework spec.. which is the servlet 
 spec..
 So

 JPA Spec == Servlet Spec
 Hibernate == Wicket
 TopLink == Tapestry

 So wicket is already in the JSR/JCP ! we are an 
 enhancement/implementation of the servlet spec :) ok ok. Maybe you 
 say.. sevlet spec implementation == servlet .jar and tomcat  ;) not 
 the thing you would build on top 

Wicket and standardization (was: Wicket at ApacheCon EU'09 in Amsterdam)

2009-02-16 Thread Erik van Oosten

Please change the subject of this thread.

   Erik.

--
Erik van Oosten
http://www.day-to-day-stuff.blogspot.com/


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



Re: SubmitLink question

2009-02-16 Thread Martijn Reuvers
Hello Martin,

I've reproduced the problem and created a JIRA issue with it see:
https://issues.apache.org/jira/browse/WICKET-2106 and attached a test
project. I hope this is sufficient information. Thanks for your help!

Martijn

On Mon, Feb 16, 2009 at 10:15 AM, Martin Voigt
martin.vo...@artnology.com wrote:
 Wicket is built using apache maven 2. A quickstart is a
 self-containing project created from the wicket-quickstart archetype
 which uses Jetty as it's servlet container and is usually used to
 demonstrate bugs or issues.

 Go here: http://wicket.apache.org/quickstart.html and generate a
 quickstart project quite easily. Then try to reproduce your problem in
 the generated project, and if the problem still occurs, it is likely
 that the source of the problem lies within wicket and not within your
 custom code. In that case, create a JIRA issue here:
 http://issues.apache.org/jira/browse/WICKET and attach your quickstart
 project reproducing the problem.

 Martin

 2009/2/16 Martijn Reuvers martijn.reuv...@gmail.com:
 Hello Igor,

 I am new to this list, so what do you mean with a quickstart?

 Martijn

 On Mon, Feb 16, 2009 at 5:46 AM, Igor Vaynberg igor.vaynb...@gmail.com 
 wrote:
 quickstart please

 -igor

 On Sun, Feb 15, 2009 at 2:00 PM, Martijn Reuvers
 martijn.reuv...@gmail.com wrote:
 Hello everyone,

 I have a question about a SubmitLink. I am using wicket 1.4.rc2 and am
 trying to add some logic to the onSubmit() of the link. However when I
 do not use the constructor where you need to pass the Form to it, it
 generates really 'weird' html and the link does not work. The link is
 a child (somewhere down the hierarchy) of a Form. The form is a
 transparent resolver, if I pass the form along it happily works and
 generates the needed javascript in the onclick of the link.

 Without form parameter SubmitLink generates something like:  a
 href=# onclickspanDetailed information/span/a. As you can see
 the onclick is not finished (the spans are from a Label). Any ideas?

 Best regards,
 Martijn

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



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



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



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



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



simple radiogroup with true/false and a propertymodel

2009-02-16 Thread Steve Swinsburg

Hi all,

I can't figure out how the RadioGroup component works in Wicket

My use case is this. I have a bunch of parameters which I need a true/ 
false answer for. So each group of choices (true or false) will map to  
a boolean parameter in my PropertyModel.


What is wrong with this code:


CompoundPropertyModel preferencesModel = new  
CompoundPropertyModel(profilePreferences);


Form form = new Form(form, preferencesModel);

RadioGroup emailRequests = new RadioGroup(emailRequestsEnabledGroup,  
new PropertyModel(preferencesModel, emailRequestsEnabled));

emailRequests.add(new Radio(requestsOn, new Model(true)));
emailRequests.add(new Radio(requestsOff, new Model(false)));

and markup:
tr wicket:id=emailRequestsEnabledGroup
td class=iteminput type=radio wicket:id=requestsOn //td
td class=iteminput type=radio wicket:id=requestsOff //td
/tr


In my onSubmit I just get the modelObject and save it as I do with  
other forms. I was hoping that the boolean parameter in that object  
would be set to true/false depending on the radio button. It's not  
being set at all though.


An example of what I want to do is illustrated by the Facebook   
Settings  Notifications page where it has a bunch of radiobuttons  
with On/Off



cheers,
Steve





smime.p7s
Description: S/MIME cryptographic signature


Re: AbstractAjaxTimerBehavior / Firefox / Page constructor

2009-02-16 Thread Adriano dos Santos Fernandes

Johan Compagner escreveu:

That settings just triggers some code that checks if the pagemap name
is equal to the window name if that isnt the case then it does a
redict to a new page so that every browser window has its own pagemap

Why do you have that setting enabled? With the disk store it is not
really needed anymore

The problem gone away removing this setting, thanks!

My page is very simple, with one img wicket:id=loading / tag (i.e., 
src is not empty).



Adriano


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



.html-templates compiler

2009-02-16 Thread kan
Just random thought...
Has anybody thought to make wicket html-template compiler? I think it
could be quite useful - it can check all wicket:id, all hrefs and so
on checked at compile-time. And also it can gain some performance,
because it will not require to parse html at run-time.

-- 
WBR, kan.

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



Re: .html-templates compiler

2009-02-16 Thread Igor Vaynberg
the point of all those wicket:ids is to generate dynamic markup.
dynamic meaning runtime.

-igor

On Mon, Feb 16, 2009 at 8:22 AM, kan kan@gmail.com wrote:
 Just random thought...
 Has anybody thought to make wicket html-template compiler? I think it
 could be quite useful - it can check all wicket:id, all hrefs and so
 on checked at compile-time. And also it can gain some performance,
 because it will not require to parse html at run-time.

 --
 WBR, kan.

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



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



Re: exception handling for session dependent URLs

2009-02-16 Thread Igor Vaynberg
please create a jira issue.

-igor

On Mon, Feb 16, 2009 at 6:00 AM, Michael Sparer michael.spa...@gmx.at wrote:

 I recently came across a link to one of my projects where a user linked to a
 session dependent URL such as /?wicket:interface=:0::IBehaviorListener:2:3

 when clicking on that URL, a PageExpiredException gets thrown and a redirect
 to the SessionExpiredPage takes place. So far so good - that's the way it
 should be.
 However this works only for the first request (as long as the user doesn't
 have a session). If the user has a session and clicks on that link different
 exceptions might get thrown. with the URL mentioned above I've seen either a
 IllegalStateException (when it couldn't find a IBehaviorListener with the
 corresponding ID) or a ClassCastException (when it tried to cast a
 HeaderContributor to an IBehaviorListener in BehaviorRequestTarget).

 I must admit I didn't look into the code that thoroughly as I wanted to ask
 you first how you go about this problem (or it may be already fixed in
 1.3.6/1.4 - I'm using 1.3.5). I thinks accidentally pasting session
 dependent URLs in blogs etc. shouldn't result in server errors ... would it
 be save to throw e.g. a PageExpiredException instead of
 IllegalStateExceptions?

 Michael




 -
 Michael Sparer
 http://techblog.molindo.at
 --
 View this message in context: 
 http://www.nabble.com/exception-handling-for-session-dependent-URLs-tp22037821p22037821.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: simple radiogroup with true/false and a propertymodel

2009-02-16 Thread Igor Vaynberg
did you add emailRequests to the form or somewhere under?

-igor

On Mon, Feb 16, 2009 at 8:12 AM, Steve Swinsburg
s.swinsb...@lancaster.ac.uk wrote:
 Hi all,
 I can't figure out how the RadioGroup component works in Wicket
 My use case is this. I have a bunch of parameters which I need a true/false
 answer for. So each group of choices (true or false) will map to a boolean
 parameter in my PropertyModel.
 What is wrong with this code:

 CompoundPropertyModel preferencesModel = new
 CompoundPropertyModel(profilePreferences);
 Form form = new Form(form, preferencesModel);
 RadioGroup emailRequests = new RadioGroup(emailRequestsEnabledGroup, new
 PropertyModel(preferencesModel, emailRequestsEnabled));
 emailRequests.add(new Radio(requestsOn, new Model(true)));
 emailRequests.add(new Radio(requestsOff, new Model(false)));
 and markup:
 tr wicket:id=emailRequestsEnabledGroup
 td class=iteminput type=radio wicket:id=requestsOn //td
 td class=iteminput type=radio wicket:id=requestsOff //td
 /tr

 In my onSubmit I just get the modelObject and save it as I do with other
 forms. I was hoping that the boolean parameter in that object would be set
 to true/false depending on the radio button. It's not being set at all
 though.
 An example of what I want to do is illustrated by the Facebook  Settings 
 Notifications page where it has a bunch of radiobuttons with On/Off

 cheers,
 Steve




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



Re: .html-templates compiler

2009-02-16 Thread kan
But html-template just is a regular file, a class resource compiled in
jar, you cannot change/generate it dynamically in run-time.
Dynamic markup allows to build a component-tree in run-time, but
doesn't allow to change html-template or assigned java-class itself.

2009/2/16 Igor Vaynberg igor.vaynb...@gmail.com:
 the point of all those wicket:ids is to generate dynamic markup.
 dynamic meaning runtime.

 -igor

 On Mon, Feb 16, 2009 at 8:22 AM, kan kan@gmail.com wrote:
 Just random thought...
 Has anybody thought to make wicket html-template compiler? I think it
 could be quite useful - it can check all wicket:id, all hrefs and so
 on checked at compile-time. And also it can gain some performance,
 because it will not require to parse html at run-time.

 --
 WBR, kan.

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



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





-- 
WBR, kan.

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



Re: simple radiogroup with true/false and a propertymodel

2009-02-16 Thread Stephen Swinsburg
yeah its added and it renders and everything seems to work except its  
not setting any data.


cheers,
steve


On 16/02/2009, at 5:21 PM, Igor Vaynberg wrote:


did you add emailRequests to the form or somewhere under?

-igor

On Mon, Feb 16, 2009 at 8:12 AM, Steve Swinsburg
s.swinsb...@lancaster.ac.uk wrote:

Hi all,
I can't figure out how the RadioGroup component works in Wicket
My use case is this. I have a bunch of parameters which I need a  
true/false
answer for. So each group of choices (true or false) will map to a  
boolean

parameter in my PropertyModel.
What is wrong with this code:

CompoundPropertyModel preferencesModel = new
CompoundPropertyModel(profilePreferences);
Form form = new Form(form, preferencesModel);
RadioGroup emailRequests = new  
RadioGroup(emailRequestsEnabledGroup, new

PropertyModel(preferencesModel, emailRequestsEnabled));
emailRequests.add(new Radio(requestsOn, new Model(true)));
emailRequests.add(new Radio(requestsOff, new Model(false)));
and markup:
tr wicket:id=emailRequestsEnabledGroup
td class=iteminput type=radio wicket:id=requestsOn //td
td class=iteminput type=radio wicket:id=requestsOff //td
/tr

In my onSubmit I just get the modelObject and save it as I do with  
other
forms. I was hoping that the boolean parameter in that object would  
be set
to true/false depending on the radio button. It's not being set at  
all

though.
An example of what I want to do is illustrated by the Facebook   
Settings 

Notifications page where it has a bunch of radiobuttons with On/Off

cheers,
Steve





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





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



Re: exception handling for session dependent URLs

2009-02-16 Thread Michael Sparer

aye aye captain :-)

https://issues.apache.org/jira/browse/WICKET-2107



igor.vaynberg wrote:
 
 please create a jira issue.
 
 -igor
 
 On Mon, Feb 16, 2009 at 6:00 AM, Michael Sparer michael.spa...@gmx.at
 wrote:

 I recently came across a link to one of my projects where a user linked
 to a
 session dependent URL such as
 /?wicket:interface=:0::IBehaviorListener:2:3

 when clicking on that URL, a PageExpiredException gets thrown and a
 redirect
 to the SessionExpiredPage takes place. So far so good - that's the way it
 should be.
 However this works only for the first request (as long as the user
 doesn't
 have a session). If the user has a session and clicks on that link
 different
 exceptions might get thrown. with the URL mentioned above I've seen
 either a
 IllegalStateException (when it couldn't find a IBehaviorListener with the
 corresponding ID) or a ClassCastException (when it tried to cast a
 HeaderContributor to an IBehaviorListener in BehaviorRequestTarget).

 I must admit I didn't look into the code that thoroughly as I wanted to
 ask
 you first how you go about this problem (or it may be already fixed in
 1.3.6/1.4 - I'm using 1.3.5). I thinks accidentally pasting session
 dependent URLs in blogs etc. shouldn't result in server errors ... would
 it
 be save to throw e.g. a PageExpiredException instead of
 IllegalStateExceptions?

 Michael




 -
 Michael Sparer
 http://techblog.molindo.at
 --
 View this message in context:
 http://www.nabble.com/exception-handling-for-session-dependent-URLs-tp22037821p22037821.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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


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


-
Michael Sparer
http://techblog.molindo.at
-- 
View this message in context: 
http://www.nabble.com/exception-handling-for-session-dependent-URLs-tp22037821p22042612.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: .html-templates compiler

2009-02-16 Thread Igor Vaynberg
sorry, what are you trying to do with this?

if we preparse the markup and break it up into tags at compile time we
still have to store it somehow and load it at runtime. so that format
would need to be more efficient at storing markup than xml already is,
but the parser is a very tinny percentage of the request and it only
happens on the first load of markup - we cache the parsed structure.
so you would have a very small gain at the high price of introducing a
compilation step into the build process...

is it worth it?

-igor

On Mon, Feb 16, 2009 at 9:46 AM, kan kan@gmail.com wrote:
 But html-template just is a regular file, a class resource compiled in
 jar, you cannot change/generate it dynamically in run-time.
 Dynamic markup allows to build a component-tree in run-time, but
 doesn't allow to change html-template or assigned java-class itself.

 2009/2/16 Igor Vaynberg igor.vaynb...@gmail.com:
 the point of all those wicket:ids is to generate dynamic markup.
 dynamic meaning runtime.

 -igor

 On Mon, Feb 16, 2009 at 8:22 AM, kan kan@gmail.com wrote:
 Just random thought...
 Has anybody thought to make wicket html-template compiler? I think it
 could be quite useful - it can check all wicket:id, all hrefs and so
 on checked at compile-time. And also it can gain some performance,
 because it will not require to parse html at run-time.

 --
 WBR, kan.

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



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





 --
 WBR, kan.

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



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



Re: simple radiogroup with true/false and a propertymodel

2009-02-16 Thread Igor Vaynberg
ive used that exact usecase dozens of times, quickstart please

-igor

On Mon, Feb 16, 2009 at 10:01 AM, Stephen Swinsburg
s.swinsb...@lancaster.ac.uk wrote:
 yeah its added and it renders and everything seems to work except its not
 setting any data.

 cheers,
 steve


 On 16/02/2009, at 5:21 PM, Igor Vaynberg wrote:

 did you add emailRequests to the form or somewhere under?

 -igor

 On Mon, Feb 16, 2009 at 8:12 AM, Steve Swinsburg
 s.swinsb...@lancaster.ac.uk wrote:

 Hi all,
 I can't figure out how the RadioGroup component works in Wicket
 My use case is this. I have a bunch of parameters which I need a
 true/false
 answer for. So each group of choices (true or false) will map to a
 boolean
 parameter in my PropertyModel.
 What is wrong with this code:

 CompoundPropertyModel preferencesModel = new
 CompoundPropertyModel(profilePreferences);
 Form form = new Form(form, preferencesModel);
 RadioGroup emailRequests = new RadioGroup(emailRequestsEnabledGroup,
 new
 PropertyModel(preferencesModel, emailRequestsEnabled));
 emailRequests.add(new Radio(requestsOn, new Model(true)));
 emailRequests.add(new Radio(requestsOff, new Model(false)));
 and markup:
 tr wicket:id=emailRequestsEnabledGroup
 td class=iteminput type=radio wicket:id=requestsOn //td
 td class=iteminput type=radio wicket:id=requestsOff //td
 /tr

 In my onSubmit I just get the modelObject and save it as I do with other
 forms. I was hoping that the boolean parameter in that object would be
 set
 to true/false depending on the radio button. It's not being set at all
 though.
 An example of what I want to do is illustrated by the Facebook  Settings
 
 Notifications page where it has a bunch of radiobuttons with On/Off

 cheers,
 Steve




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




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



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



Re: simple radiogroup with true/false and a propertymodel

2009-02-16 Thread Stephen Swinsburg

will do in the next few days. thanks igor.

cheers,
Steve

On 16/02/2009, at 6:10 PM, Igor Vaynberg wrote:


ive used that exact usecase dozens of times, quickstart please

-igor

On Mon, Feb 16, 2009 at 10:01 AM, Stephen Swinsburg
s.swinsb...@lancaster.ac.uk wrote:
yeah its added and it renders and everything seems to work except  
its not

setting any data.

cheers,
steve


On 16/02/2009, at 5:21 PM, Igor Vaynberg wrote:


did you add emailRequests to the form or somewhere under?

-igor

On Mon, Feb 16, 2009 at 8:12 AM, Steve Swinsburg
s.swinsb...@lancaster.ac.uk wrote:


Hi all,
I can't figure out how the RadioGroup component works in Wicket
My use case is this. I have a bunch of parameters which I need a
true/false
answer for. So each group of choices (true or false) will map to a
boolean
parameter in my PropertyModel.
What is wrong with this code:

CompoundPropertyModel preferencesModel = new
CompoundPropertyModel(profilePreferences);
Form form = new Form(form, preferencesModel);
RadioGroup emailRequests = new  
RadioGroup(emailRequestsEnabledGroup,

new
PropertyModel(preferencesModel, emailRequestsEnabled));
emailRequests.add(new Radio(requestsOn, new Model(true)));
emailRequests.add(new Radio(requestsOff, new Model(false)));
and markup:
tr wicket:id=emailRequestsEnabledGroup
td class=iteminput type=radio wicket:id=requestsOn //td
td class=iteminput type=radio wicket:id=requestsOff // 
td

/tr

In my onSubmit I just get the modelObject and save it as I do  
with other
forms. I was hoping that the boolean parameter in that object  
would be

set
to true/false depending on the radio button. It's not being set  
at all

though.
An example of what I want to do is illustrated by the Facebook   
Settings



Notifications page where it has a bunch of radiobuttons with On/Off

cheers,
Steve





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





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




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




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



Re: exception handling for session dependent URLs

2009-02-16 Thread Igor Vaynberg
i think this might have to wait until 1.5.

we definetely cannot change this for 1.3.6 because it will change
existing behavior too much. and since 1.4 is already in the RC i would
rather not change it there either.

since we will be rewriting all url handling in 1.5 anyways it will be
a good time to implement this.

-igor

On Mon, Feb 16, 2009 at 10:09 AM, Michael Sparer michael.spa...@gmx.at wrote:

 aye aye captain :-)

 https://issues.apache.org/jira/browse/WICKET-2107



 igor.vaynberg wrote:

 please create a jira issue.

 -igor

 On Mon, Feb 16, 2009 at 6:00 AM, Michael Sparer michael.spa...@gmx.at
 wrote:

 I recently came across a link to one of my projects where a user linked
 to a
 session dependent URL such as
 /?wicket:interface=:0::IBehaviorListener:2:3

 when clicking on that URL, a PageExpiredException gets thrown and a
 redirect
 to the SessionExpiredPage takes place. So far so good - that's the way it
 should be.
 However this works only for the first request (as long as the user
 doesn't
 have a session). If the user has a session and clicks on that link
 different
 exceptions might get thrown. with the URL mentioned above I've seen
 either a
 IllegalStateException (when it couldn't find a IBehaviorListener with the
 corresponding ID) or a ClassCastException (when it tried to cast a
 HeaderContributor to an IBehaviorListener in BehaviorRequestTarget).

 I must admit I didn't look into the code that thoroughly as I wanted to
 ask
 you first how you go about this problem (or it may be already fixed in
 1.3.6/1.4 - I'm using 1.3.5). I thinks accidentally pasting session
 dependent URLs in blogs etc. shouldn't result in server errors ... would
 it
 be save to throw e.g. a PageExpiredException instead of
 IllegalStateExceptions?

 Michael




 -
 Michael Sparer
 http://techblog.molindo.at
 --
 View this message in context:
 http://www.nabble.com/exception-handling-for-session-dependent-URLs-tp22037821p22037821.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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





 -
 Michael Sparer
 http://techblog.molindo.at
 --
 View this message in context: 
 http://www.nabble.com/exception-handling-for-session-dependent-URLs-tp22037821p22042612.html
 Sent from the Wicket - User mailing list archive at Nabble.com.


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



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



Re: Effects library in Wicket

2009-02-16 Thread Anton Veretennikov
Also look at other JQuery integrations with Wicket:
http://code.google.com/p/wickext/
and
http://code.google.com/p/jquery4wicket/
From one of postings on wickext forum I saw they plan to merge.

-- Tony

On Mon, Feb 16, 2009 at 9:12 AM, Jeremy Thomerson
jer...@wickettraining.com wrote:
 See some of the JS integrations in:
 https://wicket-stuff.svn.sourceforge.net/svnroot/wicket-stuff/trunk/wicketstuff-core/

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

 On Sun, Feb 15, 2009 at 8:04 PM, Azzeddine Daddah waarhei...@gmail.comwrote:

 Hi Wicket users,
 Is there any effects library integrated in Wicket? In the Wicket examples
 they just use the reference of the javascript files in the head of the page
 and then append the javascript causing the effect to the component like:
 target.appendJavascript(new Effect.Highlight($(' + c2.getMarkupId() +
 ')););

 Regards,
 Hbiloo



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



Truly killing the session

2009-02-16 Thread Martin Makundi
Hi!

I have found out that in order to truly have a new Session instance
(at login, for instance), the following commands are needed:
Session.unset();
getApplication().getSessionStore().removeAttribute(getRequest(),
Session.SESSION_ATTRIBUTE_NAME);
getSession().replaceSession();

I am not absolutely sure which of these are exclusively necessary, but
without calling
getApplication().getSessionStore().removeAttribute(getRequest(),
Session.SESSION_ATTRIBUTE_NAME) the old Session object 'magically'
pops back up even if the replaceSession is called.

Should invalidate automatically call
getApplication().getSessionStore().removeAttribute(getRequest(),
Session.SESSION_ATTRIBUTE_NAME)

??
Martin

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



Clustering on Tomcat

2009-02-16 Thread Doug Leeper

The Wiki info to setup clustering on Tomcat (
http://cwiki.apache.org/WICKET/tomcat-clustering.html
http://cwiki.apache.org/WICKET/tomcat-clustering.html ) indicates that there
is a bug in the latest Tomcat that causes Wicket to fail during session
replication.

My questions are:
- what Tomcat bug is being referenced here?
- what version of tomcat actually has the bug?
- has anyone tried Tomcat 6.x with session replication?

Thanks in advance,
- Doug

-- 
View this message in context: 
http://www.nabble.com/Clustering-on-Tomcat-tp22043732p22043732.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Spanish Wicket User Group

2009-02-16 Thread dtoffe

Hi all,

Just to announce the spanish speaking Wicket User Group:

http://groups.google.com.ar/group/wicket-es

We are few yet but the number of members is growing, everybody is
welcomed.

Cheers,

Daniel
==
Hola a todos,

Solo para anunciar el Grupo de Usuarios de Wicket en español:

http://groups.google.com.ar/group/wicket-es

Aún somos pocos pero la cantidad de miembros va creciendo, todos son
bienvenidos.

Saludos,

Daniel

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


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



Re: N-level CompoundPropertyModel

2009-02-16 Thread Johan Compagner
yes initmodel shouldnt call getModel() on the parent
because that was a big performance penalty on some solutions because that
would create and walk over the complete hierarchy of things
and then many many in between models are created, that dont do really
anything.

But why not something like this:

public class BigPage {
  public BigPage(BigObject object) {
  setModel(new CompoundPropertyModel(object));
   add(new SmallComponent(smallObject, getModel()));
  }
}

public class SmallComponent {
   public SmallComponent(CompoundPropertyModel model) {
   add(new Label(name, model.bind(smallObject.name));
}
}

johan


On Mon, Feb 16, 2009 at 05:50, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 hrm, looks like johan changed it here

 526472  4/7/07 12:13 PM 3   jcompagner  component initModel will
 not call
 getModel on the parent, but will directly use the field (so that not
 all kinds of inbetween models are created) if model is an iwrapmodel
 and the wrapped modes is an inherited one then the model will be
 cleared on detach Compound.getTarget() removed. Compound will not
 unwrap in getObject() anymore AbstractPropertyModel will unwrap until
 all models are processed

 seems to me that the change breaks what i thought the contract of
 initmodel was... we should discuss on dev, mind sending a message?

 -igor


 On Sun, Feb 15, 2009 at 10:08 AM, Willis Blackburn wbo...@panix.com
 wrote:
  Igor,
 
  Are you sure that will work?  I don't think that SmallComponent's
 initModel
  method is ever called, because when the Label that is part of
 SmallComponent
  is searching for a model (in Component.initModel), it invokes the
  getModelImpl method of SmallComponent, which doesn't call initModel.
  (The
  comment in the code says Don't call getModel() that could initialize
 many
  in-between useless models.
 
  W
 
  On Feb 15, 2009, at 12:23 PM, Igor Vaynberg wrote:
 
  public class smallcomponent extends component {
   protected imodel initmodel() {
  imodel model=super.initmodel();
  return new compoundpropertymodel(model);
   }
  }
 
  -igor
 
  On Sun, Feb 15, 2009 at 8:19 AM, Willis Blackburn wbo...@panix.com
  wrote:
 
  Hello,
 
  I have a situation that keeps coming up.  All of my solutions have
 seemed
  clumsy, which makes me think that there's a better way of approaching
  this
  that I just haven't figured out.  Can someone point me in the right
  direction?
 
  What I want is to have a Page that uses CompoundPropertyModel, and then
  include a component on that page that also uses CompoundPropertyModel.
   So
  roughly it looks like this:
 
  public class BigObject {
   public SmallObject get SmallObject() { ... }
  }
 
  public class SmallObject {
   public String getName() { ... }
  }
 
  public class BigPage {
   public BigPage(BigObject object) {
   setModel(new CompoundPropertyModel(object));
   add(new SmallComponent(smallObject));
   }
  }
 
  public class SmallComponent {
   public SmallComponent() {
   add(new Label(name));
   }
  }
 
  If I try to do just this, then I get an error because the label that's
  part
  of SmallComponent finds the BigPage model and fails because there's no
  property of BigObject called name.
 
  So obviously SmallComponent needs some model:
 
  public class SmallComponent {
   public SmallComponent(IModel model) {
   setModel(new CompoundPropertyModel(model));
   add(new Label(name));
   }
  }
 
  But what model to give it?  I tried passing it new
  ComponentPropertyModel(smallObject), which didn't work because
  ComponentPropertyModel implements IComponentAssignedModel and thus
 can't
  be
  directly wrapped in CompoundPropertyModel.  Adding a call to wrap() in
  the
  SmallComponent constructor fixed the problem, but I'm not sure if I can
  just
  call wrap and carry on or if there will be some unforeseen consequence
 of
  that down the road.  Is there a standard way of doing this?
 
  Thanks,
  Willis
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

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




Re: Feedback Next To Component

2009-02-16 Thread walnutmon

I am trying to build something like that, but I believe that you need
associated markup for each component with a FormComponentFeedbackBorder, and
since I am going to be updating many fields with this behavior, I'd rather
not have to change all of the associated HTML.




Serkan Camurcuoglu-3 wrote:
 
 there is something called 
 org.apache.wicket.markup.html.form.validation.FormComponentFeedbackBorder, 
 are you trying to build something like it?
 
 
 walnutmon wrote:
 That makes sense, I did pull out the surrounding markup so that it could
 be
 edited by calls to the behavior, but that's not really much better.  Are
 there any approaches that you can think of that may be more extensible? 
 I'd
 prefer to not write directly to the page at all, since I'm not
 particularly
 familiar with how that works, and I'm nervous about introducing hard to
 find
 bugs down the road for other developers not as familiar with the
 framework.


 Jonathan Locke wrote:
   
 behaviors aren't really designed to work like components and render
 markup
 like that, so it's a bit weird... what if you want to go extend or
 change
 the markup for the feedback error? it's now embedded in a bunch of code.


 walnutmon wrote:
 
 In order to add feedback next to the component I used a behavior.  I
 had
 some code from Igor which got me on the right track, although I was
 unable to actually get it to work the same way, I simplified it down to
 the following code:

 AbstractBehavior printMessagesNextToComponent = new AbstractBehavior()
{

@Override
public void onRendered(Component component)
{
super.onRendered(component);
FeedbackMessage message = 
 component.getFeedbackMessage();
if (message != null)
{
final Response out = component.getResponse();
out.write();
out.write(message.getMessage().toString());
out.write();
}
}
};

 It almost seems too simple, I've tried it and with limited testing it
 seems to work just fine, although there are some odd behaviors with
 Ajax... does anyone have any comments, better solutions, or possible
 breaking conditions that I should check out?

   
 

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

-- 
View this message in context: 
http://www.nabble.com/Feedback-Next-To-Component-tp21959520p22044542.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: N-level CompoundPropertyModel

2009-02-16 Thread Willis Blackburn

Johan,

The below solution requires that SmallComponent know it's parent has  
CompoundPropertyModel and that there is a member called  
smallObject.  I'm trying to keep SmallComponent generic, like the  
Wicket built-in components.


W


On Feb 16, 2009, at 2:46 PM, Johan Compagner wrote:


yes initmodel shouldnt call getModel() on the parent
because that was a big performance penalty on some solutions because  
that

would create and walk over the complete hierarchy of things
and then many many in between models are created, that dont do really
anything.

But why not something like this:

public class BigPage {
 public BigPage(BigObject object) {
 setModel(new CompoundPropertyModel(object));
  add(new SmallComponent(smallObject, getModel()));
 }
}

public class SmallComponent {
  public SmallComponent(CompoundPropertyModel model) {
  add(new Label(name, model.bind(smallObject.name));
}
}

johan


On Mon, Feb 16, 2009 at 05:50, Igor Vaynberg  
igor.vaynb...@gmail.comwrote:



hrm, looks like johan changed it here

526472  4/7/07 12:13 PM 3   jcompagner  component initModel  
will

not call
getModel on the parent, but will directly use the field (so that not
all kinds of inbetween models are created) if model is an iwrapmodel
and the wrapped modes is an inherited one then the model will be
cleared on detach Compound.getTarget() removed. Compound will not
unwrap in getObject() anymore AbstractPropertyModel will unwrap until
all models are processed

seems to me that the change breaks what i thought the contract of
initmodel was... we should discuss on dev, mind sending a message?

-igor


On Sun, Feb 15, 2009 at 10:08 AM, Willis Blackburn wbo...@panix.com
wrote:

Igor,

Are you sure that will work?  I don't think that SmallComponent's

initModel

method is ever called, because when the Label that is part of

SmallComponent

is searching for a model (in Component.initModel), it invokes the
getModelImpl method of SmallComponent, which doesn't call initModel.

(The
comment in the code says Don't call getModel() that could  
initialize

many

in-between useless models.

W

On Feb 15, 2009, at 12:23 PM, Igor Vaynberg wrote:


public class smallcomponent extends component {
protected imodel initmodel() {
   imodel model=super.initmodel();
   return new compoundpropertymodel(model);
}
}

-igor

On Sun, Feb 15, 2009 at 8:19 AM, Willis Blackburn  
wbo...@panix.com

wrote:


Hello,

I have a situation that keeps coming up.  All of my solutions have

seemed
clumsy, which makes me think that there's a better way of  
approaching

this
that I just haven't figured out.  Can someone point me in the  
right

direction?

What I want is to have a Page that uses CompoundPropertyModel,  
and then
include a component on that page that also uses  
CompoundPropertyModel.

So
roughly it looks like this:

public class BigObject {
public SmallObject get SmallObject() { ... }
}

public class SmallObject {
public String getName() { ... }
}

public class BigPage {
public BigPage(BigObject object) {
setModel(new CompoundPropertyModel(object));
add(new SmallComponent(smallObject));
}
}

public class SmallComponent {
public SmallComponent() {
add(new Label(name));
}
}

If I try to do just this, then I get an error because the label  
that's

part
of SmallComponent finds the BigPage model and fails because  
there's no

property of BigObject called name.

So obviously SmallComponent needs some model:

public class SmallComponent {
public SmallComponent(IModel model) {
setModel(new CompoundPropertyModel(model));
add(new Label(name));
}
}

But what model to give it?  I tried passing it new
ComponentPropertyModel(smallObject), which didn't work because
ComponentPropertyModel implements IComponentAssignedModel and thus

can't

be
directly wrapped in CompoundPropertyModel.  Adding a call to  
wrap() in

the
SmallComponent constructor fixed the problem, but I'm not sure  
if I can

just
call wrap and carry on or if there will be some unforeseen  
consequence

of

that down the road.  Is there a standard way of doing this?

Thanks,
Willis


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




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




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




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





-
To unsubscribe, e-mail: 

Re: N-level CompoundPropertyModel

2009-02-16 Thread Johan Compagner
do it then a bit different

public class BigPage {
 public BigPage(BigObject object) {
  CompoundPropertyModel model = new CompoundPropertyModel(object)
   setModel(model)
   add(new SmallComponent(smallObject, model.bind(smallObject.name));
   }
  }

public class SmallComponent {
public SmallComponent(IModel model) {
add(new Label(name, model);
}
}

or

public class BigPage {
 public BigPage(BigObject object) {
  CompoundPropertyModel model = new CompoundPropertyModel(object)
   setModel(model)
   add(new SmallComponent(smallObject, model.bind(smallObject));
   }
  }

public class SmallComponent {
public SmallComponent(IModel model) {
setModel(new CompoundPropertyModel(model));
add(new Label(name);
}
}



On Mon, Feb 16, 2009 at 20:59, Willis Blackburn wbo...@panix.com wrote:

 Johan,

 The below solution requires that SmallComponent know it's parent has
 CompoundPropertyModel and that there is a member called smallObject.  I'm
 trying to keep SmallComponent generic, like the Wicket built-in components.

 W



 On Feb 16, 2009, at 2:46 PM, Johan Compagner wrote:

  yes initmodel shouldnt call getModel() on the parent
 because that was a big performance penalty on some solutions because that
 would create and walk over the complete hierarchy of things
 and then many many in between models are created, that dont do really
 anything.

 But why not something like this:

 public class BigPage {
  public BigPage(BigObject object) {
  setModel(new CompoundPropertyModel(object));
  add(new SmallComponent(smallObject, getModel()));
  }
 }

 public class SmallComponent {
  public SmallComponent(CompoundPropertyModel model) {
  add(new Label(name, model.bind(smallObject.name));
 }
 }

 johan


 On Mon, Feb 16, 2009 at 05:50, Igor Vaynberg igor.vaynb...@gmail.com
 wrote:

  hrm, looks like johan changed it here

 526472  4/7/07 12:13 PM 3   jcompagner  component initModel will
 not call
 getModel on the parent, but will directly use the field (so that not
 all kinds of inbetween models are created) if model is an iwrapmodel
 and the wrapped modes is an inherited one then the model will be
 cleared on detach Compound.getTarget() removed. Compound will not
 unwrap in getObject() anymore AbstractPropertyModel will unwrap until
 all models are processed

 seems to me that the change breaks what i thought the contract of
 initmodel was... we should discuss on dev, mind sending a message?

 -igor


 On Sun, Feb 15, 2009 at 10:08 AM, Willis Blackburn wbo...@panix.com
 wrote:

 Igor,

 Are you sure that will work?  I don't think that SmallComponent's

 initModel

 method is ever called, because when the Label that is part of

 SmallComponent

 is searching for a model (in Component.initModel), it invokes the
 getModelImpl method of SmallComponent, which doesn't call initModel.

 (The

 comment in the code says Don't call getModel() that could initialize

 many

 in-between useless models.

 W

 On Feb 15, 2009, at 12:23 PM, Igor Vaynberg wrote:

  public class smallcomponent extends component {
 protected imodel initmodel() {
   imodel model=super.initmodel();
   return new compoundpropertymodel(model);
 }
 }

 -igor

 On Sun, Feb 15, 2009 at 8:19 AM, Willis Blackburn wbo...@panix.com
 wrote:


 Hello,

 I have a situation that keeps coming up.  All of my solutions have

 seemed

 clumsy, which makes me think that there's a better way of approaching
 this
 that I just haven't figured out.  Can someone point me in the right
 direction?

 What I want is to have a Page that uses CompoundPropertyModel, and
 then
 include a component on that page that also uses CompoundPropertyModel.
 So
 roughly it looks like this:

 public class BigObject {
 public SmallObject get SmallObject() { ... }
 }

 public class SmallObject {
 public String getName() { ... }
 }

 public class BigPage {
 public BigPage(BigObject object) {
setModel(new CompoundPropertyModel(object));
add(new SmallComponent(smallObject));
 }
 }

 public class SmallComponent {
 public SmallComponent() {
add(new Label(name));
 }
 }

 If I try to do just this, then I get an error because the label that's
 part
 of SmallComponent finds the BigPage model and fails because there's no
 property of BigObject called name.

 So obviously SmallComponent needs some model:

 public class SmallComponent {
 public SmallComponent(IModel model) {
setModel(new CompoundPropertyModel(model));
add(new Label(name));
 }
 }

 But what model to give it?  I tried passing it new
 ComponentPropertyModel(smallObject), which didn't work because
 ComponentPropertyModel implements IComponentAssignedModel and thus

 can't

 be
 directly wrapped in CompoundPropertyModel.  Adding a call to wrap() in
 the
 SmallComponent constructor fixed the problem, but I'm not sure if I
 can
 just
 call wrap and carry on or if there will be some unforeseen consequence

 of

 that down the road.  Is there a standard way of doing this?

 Thanks,
 Willis


 

Re: RadioGroup, differences between FireFox and Internet Explorer?

2009-02-16 Thread metalotus

I have the same issue. Some places in my application, adding
AjaxFormChoiceComponentUpdatingBehavior to a RadioChoice simply does not
work under IE7. The ajax response is invoked, but the browser does not
actually select the new radio button.

For example, in one place I have such behavior and it works fine, in another
it does not work under IE7 only. I noticed the POST looks different. Here is
a comparison of the POST:

POST from a place where it works:

ChartTypeForm95_hf_0

utilChartRadioButtonsId 

BAR


POST from a place where it is broken:

view:wizardpanel:hostAddressEditorWindow:mainPanel:contentsPanelID:modalDialogForm:contentsPanelID:tabpanel:panel:emtabpanel:panel:panel:form:matchOptions
  

RESERVED


On, the not working post, why does it not look more similar to the working
post, such as:


formXYZ

matchOptions

RESERVED



My guess is this that when there are nested form elements, the POST is
different, and that breaks under IE7.

-- 
View this message in context: 
http://www.nabble.com/RadioGroup%2C-differences-between-FireFox-and-Internet-Explorer--tp21033535p22044721.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: N-level CompoundPropertyModel

2009-02-16 Thread Willis Blackburn

Johan,

I had a similar idea, except that I used PropertyModel (which is what  
CompoundPropertyModel.bind does anyway).


The issue that I had with this one is that every component exposes a  
setModel method, so I always wonder how my components will behave if  
someone calls it.  In this case, if someone calls BigPage.setModel,  
then SmallComponent will be left pointing to the wrong model.  I try  
to have only component that holds the model object directly and let  
other components access it indirectly.


I suppose that I could do this:

add(new SmallComponent(smallObject, new PropertyModel(this,  
modelObject.smallObject)))


However, ComponentPropertyModel does the same thing in a clearer and  
slightly more efficient manner.


W


On Feb 16, 2009, at 3:04 PM, Johan Compagner wrote:


do it then a bit different

public class BigPage {
public BigPage(BigObject object) {
 CompoundPropertyModel model = new CompoundPropertyModel(object)
  setModel(model)
  add(new SmallComponent(smallObject,  
model.bind(smallObject.name));

  }
 }

public class SmallComponent {
   public SmallComponent(IModel model) {
   add(new Label(name, model);
   }
}

or

public class BigPage {
public BigPage(BigObject object) {
 CompoundPropertyModel model = new CompoundPropertyModel(object)
  setModel(model)
  add(new SmallComponent(smallObject, model.bind(smallObject));
  }
 }

public class SmallComponent {
   public SmallComponent(IModel model) {
   setModel(new CompoundPropertyModel(model));
   add(new Label(name);
   }
}



On Mon, Feb 16, 2009 at 20:59, Willis Blackburn wbo...@panix.com  
wrote:



Johan,

The below solution requires that SmallComponent know it's parent has
CompoundPropertyModel and that there is a member called  
smallObject.  I'm
trying to keep SmallComponent generic, like the Wicket built-in  
components.


W



On Feb 16, 2009, at 2:46 PM, Johan Compagner wrote:

yes initmodel shouldnt call getModel() on the parent
because that was a big performance penalty on some solutions  
because that

would create and walk over the complete hierarchy of things
and then many many in between models are created, that dont do  
really

anything.

But why not something like this:

public class BigPage {
public BigPage(BigObject object) {
setModel(new CompoundPropertyModel(object));
add(new SmallComponent(smallObject, getModel()));
}
}

public class SmallComponent {
public SmallComponent(CompoundPropertyModel model) {
add(new Label(name, model.bind(smallObject.name));
}
}

johan


On Mon, Feb 16, 2009 at 05:50, Igor Vaynberg  
igor.vaynb...@gmail.com

wrote:


hrm, looks like johan changed it here


526472  4/7/07 12:13 PM 3   jcompagner  component  
initModel will

not call
getModel on the parent, but will directly use the field (so that  
not
all kinds of inbetween models are created) if model is an  
iwrapmodel

and the wrapped modes is an inherited one then the model will be
cleared on detach Compound.getTarget() removed. Compound will not
unwrap in getObject() anymore AbstractPropertyModel will unwrap  
until

all models are processed

seems to me that the change breaks what i thought the contract of
initmodel was... we should discuss on dev, mind sending a message?

-igor


On Sun, Feb 15, 2009 at 10:08 AM, Willis Blackburn wbo...@panix.com 


wrote:


Igor,

Are you sure that will work?  I don't think that SmallComponent's


initModel


method is ever called, because when the Label that is part of


SmallComponent


is searching for a model (in Component.initModel), it invokes the
getModelImpl method of SmallComponent, which doesn't call  
initModel.



(The

comment in the code says Don't call getModel() that could  
initialize



many


in-between useless models.

W

On Feb 15, 2009, at 12:23 PM, Igor Vaynberg wrote:

public class smallcomponent extends component {

protected imodel initmodel() {
 imodel model=super.initmodel();
 return new compoundpropertymodel(model);
}
}

-igor

On Sun, Feb 15, 2009 at 8:19 AM, Willis Blackburn wbo...@panix.com 


wrote:



Hello,

I have a situation that keeps coming up.  All of my solutions  
have



seemed


clumsy, which makes me think that there's a better way of  
approaching

this
that I just haven't figured out.  Can someone point me in the  
right

direction?

What I want is to have a Page that uses CompoundPropertyModel,  
and

then
include a component on that page that also uses  
CompoundPropertyModel.

So
roughly it looks like this:

public class BigObject {
public SmallObject get SmallObject() { ... }
}

public class SmallObject {
public String getName() { ... }
}

public class BigPage {
public BigPage(BigObject object) {
  setModel(new CompoundPropertyModel(object));
  add(new SmallComponent(smallObject));
}
}

public class SmallComponent {
public SmallComponent() {
  add(new Label(name));
}
}

If I try to do just this, then I get an error because the  
label that's

part
of SmallComponent finds the BigPage model and fails because  
there's no


Re: SVN Checkout slow?

2009-02-16 Thread Martijn Dashorst
A disk in the svn machine gave up and died. Access was/is slow for
svn.apache.org until the disk has been replaced. Infra expects to
update in a day or so (they said 24h)

Martijn

On Mon, Feb 16, 2009 at 2:34 PM, Thomas Mäder
thomas.mae...@devotek-it.ch wrote:
 Hi Guys,

 I'm trying to check out wicket  wicket-extensions 1.4. RC2 from the svn
 repository (via http). This is taking something like half an hour. Is that
 normal?

 Thomas

 --
 Thomas Mäder
 Wicket  Eclipse Consulting
 www.devotek-it.ch




-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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



Re: Drop Down Box - Ajax Behaviour

2009-02-16 Thread Daniel Ferreira Castro
I have this method that is run on the momento of the form construction
The ListCategoria keyValuePairsTemp  stores the values of the DropDown

private DropDownChoice criaCategoriaPaiDropdown() {
setOutputMarkupId(true);
choiceRenderer = new CategoriaChoiceRenderer();
getHibernateTransaction();
ListCategoria keyValuePairsTemp = (ListCategoria) CategoriaDAO
.getAllCategorias(hibernateSession);
Categoria categoria = null;
// Trata o caso de não existir categoria cadastrada
if (keyValuePairsTemp.size()  1) {
categoria = new Categoria();
} else {
categoria = keyValuePairsTemp.get(0);
}

PropertyModel categoriaPaiModel = new PropertyModel(categoria,
categoriaPai);
categoriaPai = new DropDownChoice(categoriaPai, categoriaPaiModel,
keyValuePairsTemp, choiceRenderer);
return categoriaPai;
}


On Mon, Feb 16, 2009 at 11:06 AM, Eyal Golan egola...@gmail.com wrote:

 Where do yo u have the values in the DropDown in the first place?
 If you use a model, why not updating it?


 Eyal Golan
 egola...@gmail.com

 Visit: http://jvdrums.sourceforge.net/
 LinkedIn: http://www.linkedin.com/in/egolan74

 P  Save a tree. Please don't print this e-mail unless it's really necessary


 On Mon, Feb 16, 2009 at 2:13 PM, Daniel Ferreira Castro
 dfcas...@gmail.comwrote:

  I read the examples of Ajax Forms and I am trying to adapt it to my
 needs.
  I have a form with a input text, a drop down box, a feedback panel and a
  submit button.
 
  My submit is an ajaxButton.
  My form setsOutputMarkupId(true);
  My dropdown sets OutputMarkupId(true);
 
  When I submit my form it inserts an item on a table.
  My intention is after the form submit the dropdown uptades itself, adding
  the previously inserted item to its options.
 
  how to do it?
 
  --
  Two rules to succeed in life:
  1 - don´t tell people everything you know.
  
  We shall go on to the end.
  We shall fight in France
  We shall fightover the seas and oceans.
  We shall fight with growing confidence and growing strength in the air.
  We shall defend our island whatever the cost may be
  We shall fight on beaches, we shall fight on the landing grounds,
  We shall fight in the fields and in the streets,
  We shall fight on the hills.
  We shall never surrender.
  Winston Churchill
 




-- 
Two rules to succeed in life:
1 - don´t tell people everything you know.

We shall go on to the end.
We shall fight in France
We shall fightover the seas and oceans.
We shall fight with growing confidence and growing strength in the air.
We shall defend our island whatever the cost may be
We shall fight on beaches, we shall fight on the landing grounds,
We shall fight in the fields and in the streets,
We shall fight on the hills.
We shall never surrender.
Winston Churchill


Re: simple radiogroup with true/false and a propertymodel

2009-02-16 Thread Stephen Swinsburg

quickstart checked out ok via:

CompoundPropertyModel testModel = new CompoundPropertyModel(testObject);
Form form = new Form(form, testModel);

RadioGroup groupOne = new RadioGroup(groupOne, new  
PropertyModel(testModel, paramOne));

groupOne.add(new Radio(on, new Model(new Boolean(true;
groupOne.add(new Radio(off, new Model(new Boolean(false;
form.add(groupOne);

and in the onSubmit()

TestObject testObject = (TestObject) form.getModelObject();
System.out.println(one:  + testObject.isParamOne());


was alternating between true/false. Must be somewhere in my real  
onSubmit. Good to know my code was right though ;)


cheers,
Steve


On 16/02/2009, at 6:18 PM, Stephen Swinsburg wrote:


will do in the next few days. thanks igor.

cheers,
Steve

On 16/02/2009, at 6:10 PM, Igor Vaynberg wrote:


ive used that exact usecase dozens of times, quickstart please

-igor

On Mon, Feb 16, 2009 at 10:01 AM, Stephen Swinsburg
s.swinsb...@lancaster.ac.uk wrote:
yeah its added and it renders and everything seems to work except  
its not

setting any data.

cheers,
steve


On 16/02/2009, at 5:21 PM, Igor Vaynberg wrote:


did you add emailRequests to the form or somewhere under?

-igor

On Mon, Feb 16, 2009 at 8:12 AM, Steve Swinsburg
s.swinsb...@lancaster.ac.uk wrote:


Hi all,
I can't figure out how the RadioGroup component works in Wicket
My use case is this. I have a bunch of parameters which I need a
true/false
answer for. So each group of choices (true or false) will map to a
boolean
parameter in my PropertyModel.
What is wrong with this code:

CompoundPropertyModel preferencesModel = new
CompoundPropertyModel(profilePreferences);
Form form = new Form(form, preferencesModel);
RadioGroup emailRequests = new  
RadioGroup(emailRequestsEnabledGroup,

new
PropertyModel(preferencesModel, emailRequestsEnabled));
emailRequests.add(new Radio(requestsOn, new Model(true)));
emailRequests.add(new Radio(requestsOff, new Model(false)));
and markup:
tr wicket:id=emailRequestsEnabledGroup
td class=iteminput type=radio wicket:id=requestsOn // 
td
td class=iteminput type=radio wicket:id=requestsOff // 
td

/tr

In my onSubmit I just get the modelObject and save it as I do  
with other
forms. I was hoping that the boolean parameter in that object  
would be

set
to true/false depending on the radio button. It's not being set  
at all

though.
An example of what I want to do is illustrated by the Facebook   
Settings


Notifications page where it has a bunch of radiobuttons with On/ 
Off


cheers,
Steve





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





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




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




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





Re: Drop Down Box - Ajax Behaviour

2009-02-16 Thread Daniel Ferreira Castro
*This is my form source code*

package com.jasp.ecommfwk.pages.forms;

import java.io.Serializable;
import java.util.List;

import org.apache.log4j.Logger;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.ajax.form.AjaxFormSubmitBehavior;
import org.apache.wicket.ajax.markup.html.form.AjaxButton;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.CompoundPropertyModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.StringResourceModel;
import org.hibernate.Transaction;
import org.hibernate.classic.Session;

import com.jasp.ecommfwk.util.markup.html.form.CategoriaChoiceRenderer;
import com.jasp.persistence.hierarchy.Categoria;
import com.jasp.persistence.hierarchy.dao.CategoriaDAO;
import com.jasp.persistence.util.HibernateUtil;

@SuppressWarnings(unchecked)
public class CategoriaForm extends FormCategoria implements Serializable {
private static final long serialVersionUID = -1940617589157076677L;

private static Logger logger = Logger.getLogger(CategoriaForm.class);

private Session hibernateSession;

private transient Transaction hibernateTransaction;

// Textos i18n carregados aqui
private final StringResourceModel labelCategoriaValue = new
StringResourceModel(
categoria.label, this, null, new Object[] { getLocale() });
private final StringResourceModel labelPaiValue = new
StringResourceModel(
categoria.labelPai, this, null, new Object[] { getLocale() });

// End of  i18n load

// Declare component's form
private DropDownChoice categoriaPai;
private TextField nomeCategoria;
private Label labelCategoria;
private Label labelCategoriaPai;
private CategoriaChoiceRenderer choiceRenderer;
private AjaxButton cadastrar;
private FeedbackPanel feedbackPanel;

private void inicializaComponentesForm() {
categoriaPai = criaCategoriaPaiDropdown();
nomeCategoria = criaNomeCategoriaTextField();
nomeCategoria.setRequired(true);
labelCategoria = new Label(labelCategoria, labelCategoriaValue);
labelCategoriaPai = new Label(labelCategoriaPai, labelPaiValue);

cadastrar = new AjaxButton(cadastrar, this) {
private static final long serialVersionUID =
6045168066074475539L;

@Override
protected void onSubmit(AjaxRequestTarget target, Form? form)
{
getHibernateTransaction();
int idBanco = Integer.parseInt(categoriaPai.getValue());
Categoria escolhida = null;
Categoria nova = new Categoria();
nova.setNome(nomeCategoria.getValue());
hibernateSession.persist(nova);
if (0  idBanco) {
escolhida = new Categoria(idBanco);
hibernateSession.clear();
//Seto o pai
nova.setCategoriaPai(escolhida);
hibernateSession.merge(nova);
}
hibernateTransaction.commit();
closeTransaction();
String mensageSucesso = Categoria  + nova.getNome()
+  cadastrada com sucesso!;
info(mensageSucesso);
target.addComponent(feedbackPanel);
/*
This is the part that I am having trouble with.
The idea is after the form submission the Dropdown categoriaPai  should be
updated with the recent created item
*/
this.add(new AjaxFormSubmitBehavior(onchange){

@Override
protected void onError(AjaxRequestTarget target) {
// TODO Auto-generated method stub

}

@Override
protected void onSubmit(AjaxRequestTarget target) {
// TODO Auto-generated method stub
target.addComponent(categoriaPai);
}

});
}

@Override
protected void onError(AjaxRequestTarget target, Form? form) {
// repaint the feedback panel so errors are shown
target.addComponent(feedbackPanel);
}
};

}

public CategoriaForm(String id) {
super(id);
setOutputMarkupId(true);
inicializaComponentesForm();
feedbackPanel = criaFeedbackPanel();
// Adicionando todos os componentes ao form
this.add(categoriaPai);
this.add(nomeCategoria);
this.add(labelCategoria);
this.add(labelCategoriaPai);
this.add(cadastrar);
this.add(feedbackPanel);

}
/*
This is the method used 

Wicket source code using Maven

2009-02-16 Thread Daniel Ferreira Castro
How to do to be able to download the source code of Wicket throught Maven?


I tried to insert it on my project pom, but didn't have success

repositories
repository
idwicket-snaps/id
urlhttp://wicketstuff.org/maven/repository/url
snapshots
enabledtrue/enabled
/snapshots
releases
enabledtrue/enabled
/releases
nameWicket/name
/repository
/repositories
-- 
Two rules to succeed in life:
1 - don´t tell people everything you know.

We shall go on to the end.
We shall fight in France
We shall fightover the seas and oceans.
We shall fight with growing confidence and growing strength in the air.
We shall defend our island whatever the cost may be
We shall fight on beaches, we shall fight on the landing grounds,
We shall fight in the fields and in the streets,
We shall fight on the hills.
We shall never surrender.
Winston Churchill


Re: Wicket source code using Maven

2009-02-16 Thread Igor Vaynberg
mvn eclipse:eclipse -DdownloadSources=true

-igor

On Mon, Feb 16, 2009 at 5:38 PM, Daniel Ferreira Castro
dfcas...@gmail.com wrote:
 How to do to be able to download the source code of Wicket throught Maven?


 I tried to insert it on my project pom, but didn't have success

repositories
repository
idwicket-snaps/id
urlhttp://wicketstuff.org/maven/repository/url
snapshots
enabledtrue/enabled
/snapshots
releases
enabledtrue/enabled
/releases
nameWicket/name
/repository
/repositories
 --
 Two rules to succeed in life:
 1 - don´t tell people everything you know.
 
 We shall go on to the end.
 We shall fight in France
 We shall fightover the seas and oceans.
 We shall fight with growing confidence and growing strength in the air.
 We shall defend our island whatever the cost may be
 We shall fight on beaches, we shall fight on the landing grounds,
 We shall fight in the fields and in the streets,
 We shall fight on the hills.
 We shall never surrender.
 Winston Churchill


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



Re: Wicket source code using Maven

2009-02-16 Thread Daniel Ferreira Castro
Thanks

On Mon, Feb 16, 2009 at 10:43 PM, Igor Vaynberg igor.vaynb...@gmail.comwrote:

 mvn eclipse:eclipse -DdownloadSources=true

 -igor

 On Mon, Feb 16, 2009 at 5:38 PM, Daniel Ferreira Castro
 dfcas...@gmail.com wrote:
  How to do to be able to download the source code of Wicket throught
 Maven?
 
 
  I tried to insert it on my project pom, but didn't have success
 
 repositories
 repository
 idwicket-snaps/id
 urlhttp://wicketstuff.org/maven/repository/url
 snapshots
 enabledtrue/enabled
 /snapshots
 releases
 enabledtrue/enabled
 /releases
 nameWicket/name
 /repository
 /repositories
  --
  Two rules to succeed in life:
  1 - don´t tell people everything you know.
  
  We shall go on to the end.
  We shall fight in France
  We shall fightover the seas and oceans.
  We shall fight with growing confidence and growing strength in the air.
  We shall defend our island whatever the cost may be
  We shall fight on beaches, we shall fight on the landing grounds,
  We shall fight in the fields and in the streets,
  We shall fight on the hills.
  We shall never surrender.
  Winston Churchill
 

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




-- 
Two rules to succeed in life:
1 - don´t tell people everything you know.

We shall go on to the end.
We shall fight in France
We shall fightover the seas and oceans.
We shall fight with growing confidence and growing strength in the air.
We shall defend our island whatever the cost may be
We shall fight on beaches, we shall fight on the landing grounds,
We shall fight in the fields and in the streets,
We shall fight on the hills.
We shall never surrender.
Winston Churchill


Wizard Step question

2009-02-16 Thread John Armstrong
Making progress on my Wizard (thanks Igor!) but I had another question
that I was not able to find an answer too.

Is there a way to send a WizardStep to another Step outside of
prev/next controls? In my example I have a Confirm Step that does
final validation on the data before sending it to the datastore. If
something is wrong I want to kick the user to the specific step that
will let them fix it rather then forcing them to find it on their own.

It felt like the DynamicStep functionality might apply but the docs
are sparse and no one has any comprehensive examples that I could
find.

Thanks,
John-

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



WicketURLEncoder.QUERY_INSTANCE result not (even near) same as java.net.URLEncoder?

2009-02-16 Thread Martin Makundi
Hi!

The constructor WicketURLEncoder(Type type) explains a whole lot about
the compatibility of QUERY_INSTANCE and java.net.URLEncoder.

However, the results differ significantly. Specifically the
dontNeedEncoding characters. We had a bit of a surprise integrating
our app with another app expecting more strict encoding.

Does this difference remain intentional?

**
Martin

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