RE: BookmarkablePageLink works differently in 1.5?

2011-09-22 Thread Chris Colman
>attach a patch to a jira issue.

New JIRA issue created:
https://issues.apache.org/jira/browse/WICKET-4079

Looks like others have had the same issue so it seems like it would be a 
generally useful improvement:

http://stackoverflow.com/questions/6154430/how-do-i-mimic-hybridurlcodingstrategy-in-wicket-1-5

>
>On Thu, Sep 22, 2011 at 7:41 PM, Chris Colman
> wrote:
>>>mount(new MountedMapper("/content/home", HomePage.class, new
>>>MyCustomPageParameterEncoder());
>>
>> I could implement a CustomerPageParameterEncoder by copying what 1.4 did.
>>
>> It might be useful if 1.5 provided a PageParameterEncoder that
>encoded/decoded in the 1.4 style to make it easier for people porting from
>1.4 -> 1.5.
>>
>>>
>>>-igor
>>>
>>>On Tue, Sep 20, 2011 at 9:12 PM, Chris Colman
>>> wrote:
 The pages are mounted but with 1.4 I mounted them all like:

 mountPage("/content/home");
 mountPage("/content/about");
 mountPage("/content/product");
 ...

 Any links to the page would suffix the parameters to the mount point
>>>like:

 /content/home/o/123
 /content/about/o/123
 /content/product/o/123/p/756
 ...

 With 1.4 I could mount them all in a similar way and let the page
>itself
>>>interpret the parameters according to what it expected.

 I guess in 1.5 I will have to mount each page in a way that explicitly
>>>declares its particular parameter composition:

 mountPage("/content/home/${dummy_o}/${o}");
 mountPage("/content/about/${dummy_o}/${o}");
 mountPage("/content/product/${dummy_o}/${o}/${dummy_c}/${c}");
 ...

 I kind of arrived at that conclusion yesterday. The problem I was
>having
>>>today was more to do with getting BookmarkablePageLink to produce URLs
>with
>>>the /n/v/ style instead of the ?n=v style but I think I've almost worked
>>>that out.

 I have to simulate the name/value pairing of 1.4 /n/v style parameters
>by
>>>outputting a dummy parameter name (where the name used to be in 1.4) and
>>>the real value.



>-Original Message-
>From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
>Sent: Wednesday, 21 September 2011 12:25 PM
>To: users@wicket.apache.org
>Subject: Re: BookmarkablePageLink works differently in 1.5?
>
>mountmapper also uses pageparameters, can you not mount your pages?
>
>-igor
>
>
>On Tue, Sep 20, 2011 at 6:31 PM, Chris Colman
> wrote:
>> It looks like the parameter encoding/decoding is all done via the
>> interface:
>>
>> IPageParametersEncoder
>>
>> Which has only a single implementation which obviously
>encodes/decodes
>> the  new 1.5 style.
>>
>> Would it be possible to provide a 1.4 legacy implementation of
>> IPageParametersEncoder to allowing upgrading a 1.4 wicket application
>>>to
>> 1.5 but maintain support for existing URLs that already exist for the
>> 1.4 built web application?
>>
>> Could the setting of the IPageParameterEncoder implementation be an
>> application or page setting?
>>
>>>-Original Message-
>>>From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
>>>Sent: Wednesday, 21 September 2011 11:14 AM
>>>To: users@wicket.apache.org
>>>Subject: BookmarkablePageLink works differently in 1.5?
>>>
>>>It seems that in Wicket 1.5 BookmarkablePageLink's produce URLs that
>>>employ query parameters
>>>
>>>Eg.,
>>>
>>>?name1=value1&name2=value2
>>>
>>>instead of the directory style parameters of 1.4.x
>>>
>>>Eg.,
>>>/name1/value1/name2/value2
>>>
>>>While this may not be a problem for new Wicket applications the
>>>thousands of URLs of existing 1.4 Wicket applications are referenced
>>>from many existing websites and search engines on the web.
>>>
>>>Is there a replacement for BookmarkablePageLink in 1.5 that can
>produce
>>>the 1.4 style URLs? (Or could BookmarkablePageLink take an option
>like
>>>'legacyStyle' that, when set to true, will create legacy (1.4) style
>>>URLs?)
>>>
>>>Regards,
>>>Chris
>>>
>>>
>>
>> -
>> 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
>

RE: DecimalFormatLabel (proposed)

2011-09-22 Thread Pranav kacholia
I figured this would work best if we use things like CompoundPropertyModel. 

 

Imagine you have a property of type int called myInt  in POJO called myPojo

 

Then the code becomes extremely simple 

 

WebMarkupContainer container = new WebMarkupContainer("container", new
CompoundPropertyModel(myPojo));

container.add(new DecimalFormatLabel("myInt", new DecimalFormat());

 

 

 

From: uiron [via Apache Wicket]
[mailto:ml-node+s1842946n383594...@n4.nabble.com] 
Sent: 23 September 2011 12:17
To: Pranav kacholia
Subject: Re: DecimalFormatLabel (proposed)

 

Wouldn't it be better to create a model of String type which is 
constructed with a Number and NumberFormat as arguments, and use it as 
model for standard label? 

On 2011.09.22 23:45, Pranav kacholia wrote: 


> I have foound many places where i need to format a number and display it
in a 
> label. Can we have a simple child of Label as follows which can be used to

> do the same? 
> 
>  
> package ; 
> 
> import java.text.DecimalFormat; 
> import org.apache.wicket.markup.ComponentTag; 
> import org.apache.wicket.markup.MarkupStream; 
> import org.apache.wicket.markup.html.basic.Label; 
> import org.apache.wicket.model.IModel; 
> import org.apache.wicket.model.Model; 
> 
> /** 
>   * 
>   * @author pkacholia 
>   */ 
> public class DecimalFormatLabel extends Label { 
> 
>  final private DecimalFormat formatter; 
> 
>  public DecimalFormatLabel(String id, IModel  model,

> DecimalFormat format) { 
>  super(id, model); 
>  formatter = format; 
>  } 
> 
>  public DecimalFormatLabel(String id, Number obj, DecimalFormat
format) { 
>  this(id, new Model(obj), format); 
>  } 
> 
>  public DecimalFormatLabel(String id, DecimalFormat format) { 
>  super(id); 
>  formatter = format; 
>  } 
> 
>  /** 
>   * {@inheritDoc} 
>   */ 
>  @Override 
>  public void onComponentTagBody(final MarkupStream markupStream, final

> ComponentTag openTag) { 
>  String response; 
>  try { 
>  response = formatter.format(getDefaultModelObject()); 
>  } catch (IllegalArgumentException ex) { 
>  error(getString("NaN")); 
>  response = ""; 
>  } catch (NullPointerException ex) { 
>  error(getString("NullFormatter")); 
>  response = ""; 
>  } 
>  replaceComponentTagBody(markupStream, openTag, response); 
>  } 
> } 
> 
> 
> 
> 
> 
> -- 
> View this message in context:
http://apache-wicket.1842946.n4.nabble.com/DecimalFormatLabel-proposed-tp383
4813p3834813.html
> Sent from the Users forum mailing list archive at Nabble.com. 
> 
> - 
> To unsubscribe, e-mail: [hidden email] 
> For additional commands, e-mail: [hidden email] 
> 



- 
To unsubscribe, e-mail: [hidden email] 
For additional commands, e-mail: [hidden email] 




  _  

If you reply to this email, your message will be added to the discussion
below:

http://apache-wicket.1842946.n4.nabble.com/DecimalFormatLabel-proposed-tp383
4813p3835944.html 

To unsubscribe from DecimalFormatLabel (proposed), click
  here. 



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DecimalFormatLabel-proposed-tp3834813p3835958.html
Sent from the Users forum 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: DecimalFormatLabel (proposed)

2011-09-22 Thread Viktoras
Wouldn't it be better to create a model of String type which is 
constructed with a Number and NumberFormat as arguments, and use it as 
model for standard label?


On 2011.09.22 23:45, Pranav kacholia wrote:

I have foound many places where i need to format a number and display it in a
label. Can we have a simple child of Label as follows which can be used to
do the same?


package ;

import java.text.DecimalFormat;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.MarkupStream;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;

/**
  *
  * @author pkacholia
  */
public class DecimalFormatLabel extends Label {

 final private DecimalFormat formatter;

 public DecimalFormatLabel(String id, IModel  model,
DecimalFormat format) {
 super(id, model);
 formatter = format;
 }

 public DecimalFormatLabel(String id, Number obj, DecimalFormat format) {
 this(id, new Model(obj), format);
 }

 public DecimalFormatLabel(String id, DecimalFormat format) {
 super(id);
 formatter = format;
 }

 /**
  * {@inheritDoc}
  */
 @Override
 public void onComponentTagBody(final MarkupStream markupStream, final
ComponentTag openTag) {
 String response;
 try {
 response = formatter.format(getDefaultModelObject());
 } catch (IllegalArgumentException ex) {
 error(getString("NaN"));
 response = "";
 } catch (NullPointerException ex) {
 error(getString("NullFormatter"));
 response = "";
 }
 replaceComponentTagBody(markupStream, openTag, response);
 }
}





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DecimalFormatLabel-proposed-tp3834813p3834813.html
Sent from the Users forum 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: Help with URL Rewrite in IFrame!

2011-09-22 Thread Igor Vaynberg
dont really understand what you mean...

-igor


On Thu, Sep 22, 2011 at 9:57 PM, kugaprakash  wrote:
> Hi,
> Appreciate the response.
> Is there any way to redirect the URL when wicket gets it?  Is there a URL
> rewriting capability?
> NOTE: Need to rewrite the URL only for the IFrame, and not the whole page.
>
> thanks
> Kuga
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Help-with-URL-Rewrite-in-IFrame-tp3835409p3835738.html
> Sent from the Users forum 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: Do AJAX calls exnted life of a Session

2011-09-22 Thread Igor Vaynberg
ajax requests do extend the session timeout. if you have a page that
you do not want to expire add an ajax timer behavior to it that does
nothing - that way as long as its open in a browser it will stay
alive.

-igor


On Thu, Sep 22, 2011 at 9:30 PM, Arjun Dhar  wrote:
> Hi In Wicket,
> when we make AJAX calls (via wicket supported AJAX calls), do they extend
> the life of a session?
>
> I have javascript code that warns the User their session is about to expire,
> but these pages rely on Ajax heavily. Ideally any Ajax call should reset the
> timer (if it is resetting the session timeout).
>
> Typically pure AJAX can be independent of session, but not sure how this
> works in Wicket. if its been thought of or not.
>
> thanks,
> Arjun
>
> -
> Software documentation is like sex: when it is good, it is very, very good; 
> and when it is bad, it is still better than nothing!
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Do-AJAX-calls-exnted-life-of-a-Session-tp3835710p3835710.html
> Sent from the Users forum 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: inlineframe usage

2011-09-22 Thread kugaprakash
Hi,
Can you please let me know if you had a solution? Also would appreciate any
sample code. we have a similar issue, I have a wicket panel, with few
components and then have an IFrame. 
Thanks
Kuga

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/inlineframe-usage-tp1860124p3835767.html
Sent from the Users forum 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: Help with URL Rewrite in IFrame!

2011-09-22 Thread kugaprakash
Hi,
Appreciate the response.
Is there any way to redirect the URL when wicket gets it?  Is there a URL
rewriting capability?
NOTE: Need to rewrite the URL only for the IFrame, and not the whole page.

thanks
Kuga

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Help-with-URL-Rewrite-in-IFrame-tp3835409p3835738.html
Sent from the Users forum 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



embed youtube player

2011-09-22 Thread fachhoch
I want to embed youtube into my page , for this I created a panel which
implements IMarkupResourceStreamProvider, in method getMarkupResourceStream 
I am generating markup to embed video based on the selected video,as the
markup is cached  after the first time I always get the same video ,
so  is there a way to tell wicket not to cache markup of this panel ? 

and please advice  me if  there is much cleaner  way to embed youtube in
wicket page?
 










--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/embed-youtube-player-tp3835617p3835617.html
Sent from the Users forum 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: Glitch in PageParameter API

2011-09-22 Thread Jorge Gallardo
Thx Igor, much appreciated

On Thu, Sep 22, 2011 at 9:10 PM, Igor Vaynberg wrote:

> done
>
> -igor
>
>
> On Thu, Sep 22, 2011 at 6:45 PM, Jorge Gallardo
>  wrote:
> > Igor,
> >
> > The inner class has a private constructor, hence I cannot extend it.
> > Could you please at least in the interim make the constructor public?
> >
> > Thanks
> > JG
> >
> > On Wed, Sep 21, 2011 at 3:19 PM, Igor Vaynberg  >wrote:
> >
> >> there is no need for a workaround, this is a codesmell - nothing more.
> >>
> >> -igor
> >>
> >>
> >> On Wed, Sep 21, 2011 at 1:12 PM, Jorge Gallardo
> >>  wrote:
> >> > https://issues.apache.org/jira/browse/WICKET-4076 created
> >> >
> >> > What is your suggested workaround?
> >> >
> >> > Thanks
> >> > JG
> >> >
> >> > On Wed, Sep 21, 2011 at 3:06 PM, Igor Vaynberg <
> igor.vaynb...@gmail.com
> >> >wrote:
> >> >
> >> >> sure, as long as INamedParameters#getAllNamed() still uses
> >> >> PageParameters#NamedPair which of course will not fix anything
> >> >>
> >> >> -igor
> >> >>
> >> >> On Wed, Sep 21, 2011 at 12:55 PM, Bruno Borges <
> bruno.bor...@gmail.com>
> >> >> wrote:
> >> >> > Well, it could be done in 1.5.x this way:
> >> >> >
> >> >> > PageParameters.NamedPairs extends INamedParameters.NamedPairs
> >> >> >
> >> >> > In 1.6 then PP.NP  could be dropped.
> >> >> >
> >> >> > What about that?
> >> >> >
> >> >> >
> >> >> > *Bruno Borges*
> >> >> > (21) 7672-7099
> >> >> > *www.brunoborges.com*
> >> >> >
> >> >> >
> >> >> >
> >> >> > On Wed, Sep 21, 2011 at 12:13 PM, Igor Vaynberg <
> >> igor.vaynb...@gmail.com
> >> >> >wrote:
> >> >> >
> >> >> >> cant do in 1.5.x. make a ticket and schedule for 1.6.0
> >> >> >>
> >> >> >> -igor
> >> >> >>
> >> >> >>
> >> >> >> On Wed, Sep 21, 2011 at 8:12 AM, Martin Grigorov <
> >> mgrigo...@apache.org>
> >> >> >> wrote:
> >> >> >> > On Wed, Sep 21, 2011 at 6:08 PM, Jorge Gallardo
> >> >> >> >  wrote:
> >> >> >> >> Folks,
> >> >> >> >>
> >> >> >> >> In an attempt to create my own implementation of
> >> PageParameterEncoder
> >> >> >> and
> >> >> >> >> PageParameters, I encountered the following problem with the
> API:
> >> >> >> >>
> >> >> >> >> The interface INamedParameters<
> >> >> >>
> >> >>
> >>
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/INamedParameters.html
> >> >> >> >
> >> >> >> >> defines
> >> >> >> >> the method getAllNamed()<
> >> >> >>
> >> >>
> >>
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/INamedParameters.html#getAllNamed()
> >> >> >> >
> >> >> >> >> that
> >> >> >> >> returns a list of
> >> >> >> >> NamedPairs<
> >> >> >>
> >> >>
> >>
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/PageParameters.NamedPair.html
> >> >> >> >
> >> >> >> >> defined
> >> >> >> >> as inner class of
> >> >> >> >> PageParameters<
> >> >> >>
> >> >>
> >>
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/PageParameters.html
> >> >> >> >
> >> >> >> >>  .
> >> >> >> >>
> >> >> >> >> I believe that an interface shouldnt be referencing any element
> >> from
> >> >> an
> >> >> >> >> implementation to be a true extensible interface.
> >> >> >> >> A quick fix to this could be to convert NamedPair to a standard
> >> class
> >> >> >> and
> >> >> >> >> make it extensible as well.
> >> >> >> > Or make it INamedParameters.NamedPair
> >> >> >> >>
> >> >> >> >> Thoughts?
> >> >> >> >>
> >> >> >> >> --
> >> >> >> >> Jorge Gallardo
> >> >> >> >> 
> >> >> >> >> jorgeagalla...@gmail.com
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > --
> >> >> >> > Martin Grigorov
> >> >> >> > jWeekend
> >> >> >> > Training, Consulting, Development
> >> >> >> > http://jWeekend.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
> >> >> >>
> >> >> >>
> >> >> >
> >> >>
> >> >> -
> >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > Jorge Gallardo
> >> > 
> >> > jorgeagalla...@gmail.com
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > Jorge Gallardo
> > 
> > jorgeagalla...@gma

Re: BookmarkablePageLink works differently in 1.5?

2011-09-22 Thread Igor Vaynberg
attach a patch to a jira issue.

-igor


On Thu, Sep 22, 2011 at 7:41 PM, Chris Colman
 wrote:
>>mount(new MountedMapper("/content/home", HomePage.class, new
>>MyCustomPageParameterEncoder());
>
> I could implement a CustomerPageParameterEncoder by copying what 1.4 did.
>
> It might be useful if 1.5 provided a PageParameterEncoder that 
> encoded/decoded in the 1.4 style to make it easier for people porting from 
> 1.4 -> 1.5.
>
>>
>>-igor
>>
>>On Tue, Sep 20, 2011 at 9:12 PM, Chris Colman
>> wrote:
>>> The pages are mounted but with 1.4 I mounted them all like:
>>>
>>> mountPage("/content/home");
>>> mountPage("/content/about");
>>> mountPage("/content/product");
>>> ...
>>>
>>> Any links to the page would suffix the parameters to the mount point
>>like:
>>>
>>> /content/home/o/123
>>> /content/about/o/123
>>> /content/product/o/123/p/756
>>> ...
>>>
>>> With 1.4 I could mount them all in a similar way and let the page itself
>>interpret the parameters according to what it expected.
>>>
>>> I guess in 1.5 I will have to mount each page in a way that explicitly
>>declares its particular parameter composition:
>>>
>>> mountPage("/content/home/${dummy_o}/${o}");
>>> mountPage("/content/about/${dummy_o}/${o}");
>>> mountPage("/content/product/${dummy_o}/${o}/${dummy_c}/${c}");
>>> ...
>>>
>>> I kind of arrived at that conclusion yesterday. The problem I was having
>>today was more to do with getting BookmarkablePageLink to produce URLs with
>>the /n/v/ style instead of the ?n=v style but I think I've almost worked
>>that out.
>>>
>>> I have to simulate the name/value pairing of 1.4 /n/v style parameters by
>>outputting a dummy parameter name (where the name used to be in 1.4) and
>>the real value.
>>>
>>>
>>>
-Original Message-
From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
Sent: Wednesday, 21 September 2011 12:25 PM
To: users@wicket.apache.org
Subject: Re: BookmarkablePageLink works differently in 1.5?

mountmapper also uses pageparameters, can you not mount your pages?

-igor


On Tue, Sep 20, 2011 at 6:31 PM, Chris Colman
 wrote:
> It looks like the parameter encoding/decoding is all done via the
> interface:
>
> IPageParametersEncoder
>
> Which has only a single implementation which obviously encodes/decodes
> the  new 1.5 style.
>
> Would it be possible to provide a 1.4 legacy implementation of
> IPageParametersEncoder to allowing upgrading a 1.4 wicket application
>>to
> 1.5 but maintain support for existing URLs that already exist for the
> 1.4 built web application?
>
> Could the setting of the IPageParameterEncoder implementation be an
> application or page setting?
>
>>-Original Message-
>>From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
>>Sent: Wednesday, 21 September 2011 11:14 AM
>>To: users@wicket.apache.org
>>Subject: BookmarkablePageLink works differently in 1.5?
>>
>>It seems that in Wicket 1.5 BookmarkablePageLink's produce URLs that
>>employ query parameters
>>
>>Eg.,
>>
>>?name1=value1&name2=value2
>>
>>instead of the directory style parameters of 1.4.x
>>
>>Eg.,
>>/name1/value1/name2/value2
>>
>>While this may not be a problem for new Wicket applications the
>>thousands of URLs of existing 1.4 Wicket applications are referenced
>>from many existing websites and search engines on the web.
>>
>>Is there a replacement for BookmarkablePageLink in 1.5 that can produce
>>the 1.4 style URLs? (Or could BookmarkablePageLink take an option like
>>'legacyStyle' that, when set to true, will create legacy (1.4) style
>>URLs?)
>>
>>Regards,
>>Chris
>>
>>
>
> -
> 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
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For add

RE: BookmarkablePageLink works differently in 1.5?

2011-09-22 Thread Chris Colman
>mount(new MountedMapper("/content/home", HomePage.class, new
>MyCustomPageParameterEncoder());

I could implement a CustomerPageParameterEncoder by copying what 1.4 did.

It might be useful if 1.5 provided a PageParameterEncoder that encoded/decoded 
in the 1.4 style to make it easier for people porting from 1.4 -> 1.5.

>
>-igor
>
>On Tue, Sep 20, 2011 at 9:12 PM, Chris Colman
> wrote:
>> The pages are mounted but with 1.4 I mounted them all like:
>>
>> mountPage("/content/home");
>> mountPage("/content/about");
>> mountPage("/content/product");
>> ...
>>
>> Any links to the page would suffix the parameters to the mount point
>like:
>>
>> /content/home/o/123
>> /content/about/o/123
>> /content/product/o/123/p/756
>> ...
>>
>> With 1.4 I could mount them all in a similar way and let the page itself
>interpret the parameters according to what it expected.
>>
>> I guess in 1.5 I will have to mount each page in a way that explicitly
>declares its particular parameter composition:
>>
>> mountPage("/content/home/${dummy_o}/${o}");
>> mountPage("/content/about/${dummy_o}/${o}");
>> mountPage("/content/product/${dummy_o}/${o}/${dummy_c}/${c}");
>> ...
>>
>> I kind of arrived at that conclusion yesterday. The problem I was having
>today was more to do with getting BookmarkablePageLink to produce URLs with
>the /n/v/ style instead of the ?n=v style but I think I've almost worked
>that out.
>>
>> I have to simulate the name/value pairing of 1.4 /n/v style parameters by
>outputting a dummy parameter name (where the name used to be in 1.4) and
>the real value.
>>
>>
>>
>>>-Original Message-
>>>From: Igor Vaynberg [mailto:igor.vaynb...@gmail.com]
>>>Sent: Wednesday, 21 September 2011 12:25 PM
>>>To: users@wicket.apache.org
>>>Subject: Re: BookmarkablePageLink works differently in 1.5?
>>>
>>>mountmapper also uses pageparameters, can you not mount your pages?
>>>
>>>-igor
>>>
>>>
>>>On Tue, Sep 20, 2011 at 6:31 PM, Chris Colman
>>> wrote:
 It looks like the parameter encoding/decoding is all done via the
 interface:

 IPageParametersEncoder

 Which has only a single implementation which obviously encodes/decodes
 the  new 1.5 style.

 Would it be possible to provide a 1.4 legacy implementation of
 IPageParametersEncoder to allowing upgrading a 1.4 wicket application
>to
 1.5 but maintain support for existing URLs that already exist for the
 1.4 built web application?

 Could the setting of the IPageParameterEncoder implementation be an
 application or page setting?

>-Original Message-
>From: Chris Colman [mailto:chr...@stepaheadsoftware.com]
>Sent: Wednesday, 21 September 2011 11:14 AM
>To: users@wicket.apache.org
>Subject: BookmarkablePageLink works differently in 1.5?
>
>It seems that in Wicket 1.5 BookmarkablePageLink's produce URLs that
>employ query parameters
>
>Eg.,
>
>?name1=value1&name2=value2
>
>instead of the directory style parameters of 1.4.x
>
>Eg.,
>/name1/value1/name2/value2
>
>While this may not be a problem for new Wicket applications the
>thousands of URLs of existing 1.4 Wicket applications are referenced
>from many existing websites and search engines on the web.
>
>Is there a replacement for BookmarkablePageLink in 1.5 that can produce
>the 1.4 style URLs? (Or could BookmarkablePageLink take an option like
>'legacyStyle' that, when set to true, will create legacy (1.4) style
>URLs?)
>
>Regards,
>Chris
>
>

 -
 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



Re: Help with URL Rewrite in IFrame!

2011-09-22 Thread Igor Vaynberg
iframes dont work that way, they simply embed a webpage in another
page. if the user cannot access the url that is supposed to be inside
the iframe without it they cannot access it with it either.

-igor


On Thu, Sep 22, 2011 at 6:13 PM, kugaprakash  wrote:
> Hi,
> I would like to request your help with the following question:
> Have a Wicket application running on Jetty webserver. We also have a 3rd
> party software which is running in another web container, and they have
> their own web GUI.
> We would like to render parts of their GUI in our wicket application. As
> such I have added a Wicket’s Panel, and added a IFrame, however, for the
> IFrame we cannot give the 3rd party server’s URL due to security issues. So
> provided the URL for our application, once the IFrame request comes to the
> Wicket application, we need to actually rewrite the URL to the 3rd party
> server which will be sent via our VPN, so no issues on security.
>
> Can anyone please let me know of any possible approaches we can do such
> stuff in wicket? Any sample code would be appreciated.
>
> Thanks
> Kuga
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Help-with-URL-Rewrite-in-IFrame-tp3835409p3835409.html
> Sent from the Users forum 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: Glitch in PageParameter API

2011-09-22 Thread Igor Vaynberg
done

-igor


On Thu, Sep 22, 2011 at 6:45 PM, Jorge Gallardo
 wrote:
> Igor,
>
> The inner class has a private constructor, hence I cannot extend it.
> Could you please at least in the interim make the constructor public?
>
> Thanks
> JG
>
> On Wed, Sep 21, 2011 at 3:19 PM, Igor Vaynberg wrote:
>
>> there is no need for a workaround, this is a codesmell - nothing more.
>>
>> -igor
>>
>>
>> On Wed, Sep 21, 2011 at 1:12 PM, Jorge Gallardo
>>  wrote:
>> > https://issues.apache.org/jira/browse/WICKET-4076 created
>> >
>> > What is your suggested workaround?
>> >
>> > Thanks
>> > JG
>> >
>> > On Wed, Sep 21, 2011 at 3:06 PM, Igor Vaynberg > >wrote:
>> >
>> >> sure, as long as INamedParameters#getAllNamed() still uses
>> >> PageParameters#NamedPair which of course will not fix anything
>> >>
>> >> -igor
>> >>
>> >> On Wed, Sep 21, 2011 at 12:55 PM, Bruno Borges 
>> >> wrote:
>> >> > Well, it could be done in 1.5.x this way:
>> >> >
>> >> > PageParameters.NamedPairs extends INamedParameters.NamedPairs
>> >> >
>> >> > In 1.6 then PP.NP  could be dropped.
>> >> >
>> >> > What about that?
>> >> >
>> >> >
>> >> > *Bruno Borges*
>> >> > (21) 7672-7099
>> >> > *www.brunoborges.com*
>> >> >
>> >> >
>> >> >
>> >> > On Wed, Sep 21, 2011 at 12:13 PM, Igor Vaynberg <
>> igor.vaynb...@gmail.com
>> >> >wrote:
>> >> >
>> >> >> cant do in 1.5.x. make a ticket and schedule for 1.6.0
>> >> >>
>> >> >> -igor
>> >> >>
>> >> >>
>> >> >> On Wed, Sep 21, 2011 at 8:12 AM, Martin Grigorov <
>> mgrigo...@apache.org>
>> >> >> wrote:
>> >> >> > On Wed, Sep 21, 2011 at 6:08 PM, Jorge Gallardo
>> >> >> >  wrote:
>> >> >> >> Folks,
>> >> >> >>
>> >> >> >> In an attempt to create my own implementation of
>> PageParameterEncoder
>> >> >> and
>> >> >> >> PageParameters, I encountered the following problem with the API:
>> >> >> >>
>> >> >> >> The interface INamedParameters<
>> >> >>
>> >>
>> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/INamedParameters.html
>> >> >> >
>> >> >> >> defines
>> >> >> >> the method getAllNamed()<
>> >> >>
>> >>
>> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/INamedParameters.html#getAllNamed()
>> >> >> >
>> >> >> >> that
>> >> >> >> returns a list of
>> >> >> >> NamedPairs<
>> >> >>
>> >>
>> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/PageParameters.NamedPair.html
>> >> >> >
>> >> >> >> defined
>> >> >> >> as inner class of
>> >> >> >> PageParameters<
>> >> >>
>> >>
>> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/PageParameters.html
>> >> >> >
>> >> >> >>  .
>> >> >> >>
>> >> >> >> I believe that an interface shouldnt be referencing any element
>> from
>> >> an
>> >> >> >> implementation to be a true extensible interface.
>> >> >> >> A quick fix to this could be to convert NamedPair to a standard
>> class
>> >> >> and
>> >> >> >> make it extensible as well.
>> >> >> > Or make it INamedParameters.NamedPair
>> >> >> >>
>> >> >> >> Thoughts?
>> >> >> >>
>> >> >> >> --
>> >> >> >> Jorge Gallardo
>> >> >> >> 
>> >> >> >> jorgeagalla...@gmail.com
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Martin Grigorov
>> >> >> > jWeekend
>> >> >> > Training, Consulting, Development
>> >> >> > http://jWeekend.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
>> >> >>
>> >> >>
>> >> >
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> For additional commands, e-mail: users-h...@wicket.apache.org
>> >>
>> >>
>> >
>> >
>> > --
>> > Jorge Gallardo
>> > 
>> > jorgeagalla...@gmail.com
>> >
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
> --
> Jorge Gallardo
> 
> jorgeagalla...@gmail.com
>

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



Re: Glitch in PageParameter API

2011-09-22 Thread Jorge Gallardo
Igor,

The inner class has a private constructor, hence I cannot extend it.
Could you please at least in the interim make the constructor public?

Thanks
JG

On Wed, Sep 21, 2011 at 3:19 PM, Igor Vaynberg wrote:

> there is no need for a workaround, this is a codesmell - nothing more.
>
> -igor
>
>
> On Wed, Sep 21, 2011 at 1:12 PM, Jorge Gallardo
>  wrote:
> > https://issues.apache.org/jira/browse/WICKET-4076 created
> >
> > What is your suggested workaround?
> >
> > Thanks
> > JG
> >
> > On Wed, Sep 21, 2011 at 3:06 PM, Igor Vaynberg  >wrote:
> >
> >> sure, as long as INamedParameters#getAllNamed() still uses
> >> PageParameters#NamedPair which of course will not fix anything
> >>
> >> -igor
> >>
> >> On Wed, Sep 21, 2011 at 12:55 PM, Bruno Borges 
> >> wrote:
> >> > Well, it could be done in 1.5.x this way:
> >> >
> >> > PageParameters.NamedPairs extends INamedParameters.NamedPairs
> >> >
> >> > In 1.6 then PP.NP  could be dropped.
> >> >
> >> > What about that?
> >> >
> >> >
> >> > *Bruno Borges*
> >> > (21) 7672-7099
> >> > *www.brunoborges.com*
> >> >
> >> >
> >> >
> >> > On Wed, Sep 21, 2011 at 12:13 PM, Igor Vaynberg <
> igor.vaynb...@gmail.com
> >> >wrote:
> >> >
> >> >> cant do in 1.5.x. make a ticket and schedule for 1.6.0
> >> >>
> >> >> -igor
> >> >>
> >> >>
> >> >> On Wed, Sep 21, 2011 at 8:12 AM, Martin Grigorov <
> mgrigo...@apache.org>
> >> >> wrote:
> >> >> > On Wed, Sep 21, 2011 at 6:08 PM, Jorge Gallardo
> >> >> >  wrote:
> >> >> >> Folks,
> >> >> >>
> >> >> >> In an attempt to create my own implementation of
> PageParameterEncoder
> >> >> and
> >> >> >> PageParameters, I encountered the following problem with the API:
> >> >> >>
> >> >> >> The interface INamedParameters<
> >> >>
> >>
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/INamedParameters.html
> >> >> >
> >> >> >> defines
> >> >> >> the method getAllNamed()<
> >> >>
> >>
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/INamedParameters.html#getAllNamed()
> >> >> >
> >> >> >> that
> >> >> >> returns a list of
> >> >> >> NamedPairs<
> >> >>
> >>
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/PageParameters.NamedPair.html
> >> >> >
> >> >> >> defined
> >> >> >> as inner class of
> >> >> >> PageParameters<
> >> >>
> >>
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parameter/PageParameters.html
> >> >> >
> >> >> >>  .
> >> >> >>
> >> >> >> I believe that an interface shouldnt be referencing any element
> from
> >> an
> >> >> >> implementation to be a true extensible interface.
> >> >> >> A quick fix to this could be to convert NamedPair to a standard
> class
> >> >> and
> >> >> >> make it extensible as well.
> >> >> > Or make it INamedParameters.NamedPair
> >> >> >>
> >> >> >> Thoughts?
> >> >> >>
> >> >> >> --
> >> >> >> Jorge Gallardo
> >> >> >> 
> >> >> >> jorgeagalla...@gmail.com
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Martin Grigorov
> >> >> > jWeekend
> >> >> > Training, Consulting, Development
> >> >> > http://jWeekend.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
> >> >>
> >> >>
> >> >
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
> >
> > --
> > Jorge Gallardo
> > 
> > jorgeagalla...@gmail.com
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Jorge Gallardo

jorgeagalla...@gmail.com


Help with URL Rewrite in IFrame!

2011-09-22 Thread kugaprakash
Hi,
I would like to request your help with the following question:
Have a Wicket application running on Jetty webserver. We also have a 3rd
party software which is running in another web container, and they have
their own web GUI.
We would like to render parts of their GUI in our wicket application. As
such I have added a Wicket’s Panel, and added a IFrame, however, for the
IFrame we cannot give the 3rd party server’s URL due to security issues. So
provided the URL for our application, once the IFrame request comes to the
Wicket application, we need to actually rewrite the URL to the 3rd party
server which will be sent via our VPN, so no issues on security.

Can anyone please let me know of any possible approaches we can do such
stuff in wicket? Any sample code would be appreciated.

Thanks
Kuga


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Help-with-URL-Rewrite-in-IFrame-tp3835409p3835409.html
Sent from the Users forum 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: DecimalFormatLabel (proposed)

2011-09-22 Thread Igor Vaynberg
yeah, transient fields are ok...

-igor


On Thu, Sep 22, 2011 at 2:20 PM, Pranav kacholia
 wrote:
> Looking over the sourcecode of DecimalFormat (Java 6) there are a few fields
> which do not implements Serializable.
> Those are all of type DigitList and FieldPosition.
>
> however, in all the cases they are marked as Transient, so they shouldnt
> interfere with the serialization?
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/DecimalFormatLabel-proposed-tp3834813p3834903.html
> Sent from the Users forum 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: adding resources after ajax swap

2011-09-22 Thread Pointbreak
Of course you could also just load the scripts in your page instead of
via ajax... just my 2cnts.

On Thursday, September 22, 2011 3:18 PM, "Steve Lowery"
 wrote:
> Is that a filter on my end?  Would that go before or after my wicket
> filter
> mapping?  Any helpful resources out there on this?  I haven't dealt with
> OPTIONS methods before.
> 
> 
> On Thu, Sep 22, 2011 at 2:28 PM, Steve Lowery
> wrote:
> 
> > I'm having an issue using resources after an ajax swap, in this case
> > jquery.  My home page does not have anything jquery related on it.  There is
> > an AjaxFallbackLink which swaps out the main content.  The new content Panel
> > has a jquery header contributor.  I see this is being returned in the
> > response to the AjaxFallbackLink click:
> >
> > 

Re: DecimalFormatLabel (proposed)

2011-09-22 Thread Pranav kacholia
Looking over the sourcecode of DecimalFormat (Java 6) there are a few fields
which do not implements Serializable. 
Those are all of type DigitList and FieldPosition. 

however, in all the cases they are marked as Transient, so they shouldnt
interfere with the serialization?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DecimalFormatLabel-proposed-tp3834813p3834903.html
Sent from the Users forum 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: DecimalFormatLabel (proposed)

2011-09-22 Thread Pranav kacholia
I have been using it since earlier today. Havent seen any exceptions thrown. 
Im relatively new to wicket , so what should i look out for in case it isnt
actually serializable? 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DecimalFormatLabel-proposed-tp3834813p3834847.html
Sent from the Users forum 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: DecimalFormatLabel (proposed)

2011-09-22 Thread Igor Vaynberg
not sure DecimalFormat is really serializable. Format is, but
DecimalFormat's DigitList is not

-igor


On Thu, Sep 22, 2011 at 1:45 PM, Pranav kacholia
 wrote:
> I have foound many places where i need to format a number and display it in a
> label. Can we have a simple child of Label as follows which can be used to
> do the same?
>
> 
> package ;
>
> import java.text.DecimalFormat;
> import org.apache.wicket.markup.ComponentTag;
> import org.apache.wicket.markup.MarkupStream;
> import org.apache.wicket.markup.html.basic.Label;
> import org.apache.wicket.model.IModel;
> import org.apache.wicket.model.Model;
>
> /**
>  *
>  * @author pkacholia
>  */
> public class DecimalFormatLabel extends Label {
>
>    final private DecimalFormat formatter;
>
>    public DecimalFormatLabel(String id, IModel model,
> DecimalFormat format) {
>        super(id, model);
>        formatter = format;
>    }
>
>    public DecimalFormatLabel(String id, Number obj, DecimalFormat format) {
>        this(id, new Model(obj), format);
>    }
>
>    public DecimalFormatLabel(String id, DecimalFormat format) {
>        super(id);
>        formatter = format;
>    }
>
>    /**
>     * {@inheritDoc}
>     */
>    @Override
>    public void onComponentTagBody(final MarkupStream markupStream, final
> ComponentTag openTag) {
>        String response;
>        try {
>        response = formatter.format(getDefaultModelObject());
>        } catch (IllegalArgumentException ex) {
>            error(getString("NaN"));
>            response = "";
>        } catch (NullPointerException ex) {
>            error(getString("NullFormatter"));
>            response = "";
>        }
>        replaceComponentTagBody(markupStream, openTag, response);
>    }
> }
>
>
>
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/DecimalFormatLabel-proposed-tp3834813p3834813.html
> Sent from the Users forum 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



DecimalFormatLabel (proposed)

2011-09-22 Thread Pranav kacholia
I have foound many places where i need to format a number and display it in a
label. Can we have a simple child of Label as follows which can be used to
do the same? 


package ;

import java.text.DecimalFormat;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.MarkupStream;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;

/**
 *
 * @author pkacholia
 */
public class DecimalFormatLabel extends Label {

final private DecimalFormat formatter;

public DecimalFormatLabel(String id, IModel model,
DecimalFormat format) {
super(id, model);
formatter = format;
}

public DecimalFormatLabel(String id, Number obj, DecimalFormat format) {
this(id, new Model(obj), format);
}

public DecimalFormatLabel(String id, DecimalFormat format) {
super(id);
formatter = format;
}

/**
 * {@inheritDoc}
 */
@Override
public void onComponentTagBody(final MarkupStream markupStream, final
ComponentTag openTag) {
String response;
try {
response = formatter.format(getDefaultModelObject());
} catch (IllegalArgumentException ex) {
error(getString("NaN"));
response = "";
} catch (NullPointerException ex) {
error(getString("NullFormatter"));
response = "";
} 
replaceComponentTagBody(markupStream, openTag, response);
}
}





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/DecimalFormatLabel-proposed-tp3834813p3834813.html
Sent from the Users forum 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: adding resources after ajax swap

2011-09-22 Thread Igor Vaynberg
On Thu, Sep 22, 2011 at 1:39 PM, Steve Lowery
 wrote:
> Igor,
>
> Can you provide more info on the filter?  I'm struggling to see how adding a
> filter to my code will help since the js file is being requested on a
> different domain.  I tried the code below to inspect things, but I never got
> anything in there except GETs.

your filter has to send back a header telling the browser it is ok to
include the script resource from another domain via ajax. read up on
the OPTIONS headers rfc. i dont remember the exact details.

> Also, is this something you think might be worthwhile putting into wicket
> itself?

dont know. it is not often people load things from an external CDN
using ajax. maybe once you write it you can contribute it.

> I can see users wanting to include scripts from Google's CDN or
> other providers without having to provide some sort of hack.

because they are doing it using a normal request, not from inside ajax.

-igor


>
> public class OptionsFilter implements Filter {
>
> @Override
> public void destroy() {
> }
>
> @Override
> public void doFilter(ServletRequest req, ServletResponse res, FilterChain
> chain) throws IOException, ServletException {
> HttpServletRequest request = (HttpServletRequest) req;
>
> System.err.println(request.getMethod() + ": " + request.getRequestURL());
>
> if (request.getMethod().equals("OPTIONS")) {
> Enumeration headerNames = request.getHeaderNames();
> while (headerNames.hasMoreElements()) {
> System.err.println(headerNames.nextElement());
> }
> } else {
> chain.doFilter(req, res);
> }
> }
>
> @Override
> public void init(FilterConfig arg0) throws ServletException {
> }
>
> }
>
> On Thu, Sep 22, 2011 at 3:18 PM, Steve Lowery 
> wrote:
>
>> Is that a filter on my end?  Would that go before or after my wicket filter
>> mapping?  Any helpful resources out there on this?  I haven't dealt with
>> OPTIONS methods before.
>>
>>
>> On Thu, Sep 22, 2011 at 2:28 PM, Steve Lowery 
>> wrote:
>>
>>> I'm having an issue using resources after an ajax swap, in this case
>>> jquery.  My home page does not have anything jquery related on it.  There is
>>> an AjaxFallbackLink which swaps out the main content.  The new content Panel
>>> has a jquery header contributor.  I see this is being returned in the
>>> response to the AjaxFallbackLink click:
>>>
>>> 

Re: adding resources after ajax swap

2011-09-22 Thread Steve Lowery
Igor,

Can you provide more info on the filter?  I'm struggling to see how adding a
filter to my code will help since the js file is being requested on a
different domain.  I tried the code below to inspect things, but I never got
anything in there except GETs.

Also, is this something you think might be worthwhile putting into wicket
itself?  I can see users wanting to include scripts from Google's CDN or
other providers without having to provide some sort of hack.

public class OptionsFilter implements Filter {

@Override
public void destroy() {
}

@Override
public void doFilter(ServletRequest req, ServletResponse res, FilterChain
chain) throws IOException, ServletException {
HttpServletRequest request = (HttpServletRequest) req;

System.err.println(request.getMethod() + ": " + request.getRequestURL());

if (request.getMethod().equals("OPTIONS")) {
Enumeration headerNames = request.getHeaderNames();
while (headerNames.hasMoreElements()) {
System.err.println(headerNames.nextElement());
}
} else {
chain.doFilter(req, res);
}
}

@Override
public void init(FilterConfig arg0) throws ServletException {
}

}

On Thu, Sep 22, 2011 at 3:18 PM, Steve Lowery wrote:

> Is that a filter on my end?  Would that go before or after my wicket filter
> mapping?  Any helpful resources out there on this?  I haven't dealt with
> OPTIONS methods before.
>
>
> On Thu, Sep 22, 2011 at 2:28 PM, Steve Lowery 
> wrote:
>
>> I'm having an issue using resources after an ajax swap, in this case
>> jquery.  My home page does not have anything jquery related on it.  There is
>> an AjaxFallbackLink which swaps out the main content.  The new content Panel
>> has a jquery header contributor.  I see this is being returned in the
>> response to the AjaxFallbackLink click:
>>
>> 

Re: adding resources after ajax swap

2011-09-22 Thread Igor Vaynberg
it would be your filter that would go before wicket. dont have any
resources, sorry. last time i ran into this i just hacked one out real
quick.

-igor


On Thu, Sep 22, 2011 at 1:18 PM, Steve Lowery
 wrote:
> Is that a filter on my end?  Would that go before or after my wicket filter
> mapping?  Any helpful resources out there on this?  I haven't dealt with
> OPTIONS methods before.
>
>
> On Thu, Sep 22, 2011 at 2:28 PM, Steve Lowery 
> wrote:
>
>> I'm having an issue using resources after an ajax swap, in this case
>> jquery.  My home page does not have anything jquery related on it.  There is
>> an AjaxFallbackLink which swaps out the main content.  The new content Panel
>> has a jquery header contributor.  I see this is being returned in the
>> response to the AjaxFallbackLink click:
>>
>> 

Re: adding resources after ajax swap

2011-09-22 Thread Steve Lowery
Is that a filter on my end?  Would that go before or after my wicket filter
mapping?  Any helpful resources out there on this?  I haven't dealt with
OPTIONS methods before.


On Thu, Sep 22, 2011 at 2:28 PM, Steve Lowery wrote:

> I'm having an issue using resources after an ajax swap, in this case
> jquery.  My home page does not have anything jquery related on it.  There is
> an AjaxFallbackLink which swaps out the main content.  The new content Panel
> has a jquery header contributor.  I see this is being returned in the
> response to the AjaxFallbackLink click:
>
> 

Re: adding resources after ajax swap

2011-09-22 Thread Igor Vaynberg
yep, its because you are loading a script file from a different
domain. if you want to do that you have to configure a servlet filter
that will respond to OPTIONS requests...

-igor


On Thu, Sep 22, 2011 at 1:12 PM, Steve Lowery
 wrote:
> Igor,
>
> Here are the request headers (response returns a 405 - Method not allowed):
>
> OPTIONS 
> http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.jsHTTP/1.1
> Access-Control-Request-Method: GET Origin:
> http://localhost:8080 Access-Control-Request-Headers: Origin, Wicket-Ajax,
> Accept
>
> Note: If I download the js file and do a
> response.renderJavascriptResource(new ResourceReference(MyClass.class,
> "jquery.js")) as opposed to response.renderJavascriptReference("
> http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js";); it works.
>
> On Thu, Sep 22, 2011 at 2:28 PM, Steve Lowery 
> wrote:
>
>> I'm having an issue using resources after an ajax swap, in this case
>> jquery.  My home page does not have anything jquery related on it.  There is
>> an AjaxFallbackLink which swaps out the main content.  The new content Panel
>> has a jquery header contributor.  I see this is being returned in the
>> response to the AjaxFallbackLink click:
>>
>> 

Re: adding resources after ajax swap

2011-09-22 Thread Steve Lowery
Igor,

Here are the request headers (response returns a 405 - Method not allowed):

OPTIONS http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.jsHTTP/1.1
Access-Control-Request-Method: GET Origin:
http://localhost:8080 Access-Control-Request-Headers: Origin, Wicket-Ajax,
Accept

Note: If I download the js file and do a
response.renderJavascriptResource(new ResourceReference(MyClass.class,
"jquery.js")) as opposed to response.renderJavascriptReference("
http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js";); it works.

On Thu, Sep 22, 2011 at 2:28 PM, Steve Lowery wrote:

> I'm having an issue using resources after an ajax swap, in this case
> jquery.  My home page does not have anything jquery related on it.  There is
> an AjaxFallbackLink which swaps out the main content.  The new content Panel
> has a jquery header contributor.  I see this is being returned in the
> response to the AjaxFallbackLink click:
>
> 

WiQuery 1.5 release

2011-09-22 Thread Hielke Hoeve
Hi everyone!

We have been working on improving WiQuery to use more and more (new) features 
of Wicket 1.5.  Now that Wicket 1.5 has its first release it is time for us to 
do the same. Last few weeks we released RCs and have pinpointed some bugs and 
flaws. Now that nearly all of them have been removed it is time for the first 
final release.

A lot has changed in WiQuery, most things invisible for end users. Here is a 
list of features of WiQuery (old and new):

 *   Components or Behaviours implementing the interface IWiQueryPlugin can 
define a jQuery statement which is gathered at the end of each requestcycle and 
send to the client to be executed on dom document ready. The jQuery JavaScript 
resource is automatically added for you.
 *   Components or Behaviours can now use the wicket function renderHead() 
instead of Wiquery's contribute() to render ResourceReferences or plain scripts 
to the HeaderResponse.
 *   ResourceReferences can have their dependencies defined so that end users 
do not have to add a long list of ResourceReferences but only 1 (or in worst 
case a few).
 *   ResourceReferences are rendered in a predefined sorted order (first 
wicket, then wiquery, then the rest) so that every resource has its 
dependencies loaded before itself. This can be configured to be different.
 *   WiQuery provides 2 YUI Compressors, one for JS and one for CSS, which have 
to be set manually. They compress your JavaScript or StyleSheet on the fly. 
Note that this increases server render time.
 *   WiQuery is split in 2 artifacts: wiquery-core and wiquery-jquery-ui. When 
using wiquery-jquery-ui Components or Behaviors which have the @WiQueryUIPlugin 
annotation automatically get the jQuery UI theme ResourceReferences added.
 *   Some API changes were necessary, this means your project will not compile 
but most errors are the same:
*   Most Wiquery ResourceReferences were renamed to reflect Wicket's 
ResourceReferences name change from Javascript to JavaScript.
*   The contribute() function is no longer present in IWiQueryPlugin, this 
can be done by using the Component.renderHead() or Behavior.

In order to use WiQuery you need to add one of the artifacts below 
(wiquery-core contains no jquery ui, wiquery-jquery-ui contains a subset of 
jquery default components):


org.odlabs.wiquery
wiquery-core
1.5.0



org.odlabs.wiquery
wiquery-jquery-ui
1.5.0


We are working on updating our Wiki during the coming week. Here you will find 
more information about current and new classes and how to use them.


The WiQuery team.

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



Re: adding resources after ajax swap

2011-09-22 Thread Igor Vaynberg
thats pretty weird, what kind of option is it requesting (check the
headers)? ive only ever seen option used for cross-domain ajax...

-igor


On Thu, Sep 22, 2011 at 12:28 PM, Steve Lowery
 wrote:
> I'm having an issue using resources after an ajax swap, in this case jquery.
>  My home page does not have anything jquery related on it.  There is an
> AjaxFallbackLink which swaps out the main content.  The new content Panel
> has a jquery header contributor.  I see this is being returned in the
> response to the AjaxFallbackLink click:
>
> 

adding resources after ajax swap

2011-09-22 Thread Steve Lowery
I'm having an issue using resources after an ajax swap, in this case jquery.
 My home page does not have anything jquery related on it.  There is an
AjaxFallbackLink which swaps out the main content.  The new content Panel
has a jquery header contributor.  I see this is being returned in the
response to the AjaxFallbackLink click:


Re: onSubmit - Button vs AjaxButton

2011-09-22 Thread Igor Vaynberg
ajax button implements it and forwards it...

public AjaxButton(String id, IModel model, final Form form)
{
super(id, model);
this.form = form;

add(new AjaxFormSubmitBehavior(form, "onclick")
{
@Override
protected void onSubmit(AjaxRequestTarget target)
{
AjaxButton.this.onSubmit(target, 
AjaxButton.this.getForm());
}

-igor


On Thu, Sep 22, 2011 at 10:07 AM, Marcel Hörr  wrote:
> i miss the "calls behavior's onsubmit calls button's onsubmit" because the 
> onSubmit on the behavior is abstract and has nothing to do with the onsubmit 
> of its component (does it?).
>
> Am 22.09.2011 um 17:54 schrieb Igor Vaynberg:
>
>> so it looks like
>>
>> onevent() submits the form with a form submitter that calls behavior's 
>> onsubmit
>> behavior's onsubmit calls button's onsubmit
>>
>> so the button's onsubmit should be called...
>>
>> -igor
>>
>> On Thu, Sep 22, 2011 at 8:33 AM, Marcel Hoerr  wrote:
>>> as far as i can see it, no button is the submitting component in wicket 1.5 
>>> at this point, but the AjaxFormSubmitBehavior is. the actual button (and 
>>> its own onSubmit) is overriden at
>>>
>>> [...onEvent(...)...]
>>> getForm().getRootForm().onFormSubmitted(new IFormSubmitter()
>>> {
>>>  public void onSubmit()
>>>  {
>>>     AjaxFormSubmitBehavior.this.onSubmit(target);
>>>  }
>>> }
>>> [...]
>>>
>>> or not?
>>>
>>>  Original-Nachricht 
 Datum: Thu, 22 Sep 2011 08:15:13 -0700
 Von: Igor Vaynberg 
 An: users@wicket.apache.org
 Betreff: Re: onSubmit - Button vs AjaxButton
>>>
 what else could be the submitting component but the button at that point?

 -igor

 On Thu, Sep 22, 2011 at 8:10 AM, Marcel Hoerr  wrote:
> as you debugged the code in AbstractDefaultAjaxBehavior. the actual call
 hierachy is the following:
>
> - AbstractDefaultAjaxBehavior.onRequest
> -- AjaxEventBehavior.respond
> --- AjaxFormSubmitBehavior.onEvent
>
> the onEvent() method of the AjaxFormSubmitBehavior invokes in wicket 1.5
 no more the submitting component of the root form, but passes itself as
 submitting component into the root form.
>
> code from wicket 1.4
> @Override
> protected void onEvent(AjaxRequestTarget target)
> {
>   getForm().getRootForm().onFormSubmitted();
> [...]
>
> code from wicket 1.5
> @Override
> protected void onEvent(final AjaxRequestTarget target)
> {
>   getForm().getRootForm().onFormSubmitted(new IFormSubmitter()
>   {
>        public Form getForm()
>        {
>                return AjaxFormSubmitBehavior.this.getForm();
>        }
>
>        public boolean getDefaultFormProcessing()
>        {
>                return
 AjaxFormSubmitBehavior.this.getDefaultProcessing();
>        }
>
>        public void onSubmit()
>        {
>                AjaxFormSubmitBehavior.this.onSubmit(target);
>        }
>
>        public void onError()
>        {
>                AjaxFormSubmitBehavior.this.onError(target);
>        }
>   });
> }
>
>  Original-Nachricht 
>> Datum: Thu, 22 Sep 2011 17:27:42 +0300
>> Von: Martin Grigorov 
>> An: users@wicket.apache.org
>> Betreff: Re: onSubmit - Button vs AjaxButton
>
>> 1.5 code from
>> org.apache.wicket.ajax.markup.html.form.AjaxButton.AjaxButton(...).new
>> AjaxFormSubmitBehavior() {...}.onSubmit(AjaxRequestTarget):
>>
>> @Override
>> protected void onSubmit(AjaxRequestTarget target)
>> {
>>       AjaxButton.this.onSubmit(target, AjaxButton.this.getForm());
>> }
>>
>> What do you mean by that AjaxFormSubmitBehavior handles the event ?
>>
>> On Thu, Sep 22, 2011 at 5:22 PM, Marcel Hoerr 
 wrote:
>>> i guess it is the change in the onEvent method of the
>> AjaxFormSubmitBehavior.
>>>
>>> in wicket 1.4 the AjaxFormSubmitBehavior gets the root form and fires
>> its onSubmit (meaning the underlying button is the formsubmitter) and
 handles
>> afterwards its own onSubmit.
>>> in wicket 1.5 the AjaxFormSubmitBehavior handles itself as
 formsubmitter
>> and the underlying button gets never fired.
>>>
>>>  Original-Nachricht 
 Datum: Thu, 22 Sep 2011 15:45:37 +0300
 Von: Martin Grigorov 
 An: users@wicket.apache.org
 Betreff: Re: onSubmit - Button vs AjaxButton
>>>
 check whether onError() is called

 Or put a breakpoint in
 org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest() and
 follow to see where it breaks.

 On Thu, Sep 22, 2011 at 2:15 PM, Marcel Hoerr 
>> wrote:
> hey guys,
>>>

Re: onSubmit - Button vs AjaxButton

2011-09-22 Thread Marcel Hörr
i miss the "calls behavior's onsubmit calls button's onsubmit" because the 
onSubmit on the behavior is abstract and has nothing to do with the onsubmit of 
its component (does it?).

Am 22.09.2011 um 17:54 schrieb Igor Vaynberg:

> so it looks like
> 
> onevent() submits the form with a form submitter that calls behavior's 
> onsubmit
> behavior's onsubmit calls button's onsubmit
> 
> so the button's onsubmit should be called...
> 
> -igor
> 
> On Thu, Sep 22, 2011 at 8:33 AM, Marcel Hoerr  wrote:
>> as far as i can see it, no button is the submitting component in wicket 1.5 
>> at this point, but the AjaxFormSubmitBehavior is. the actual button (and its 
>> own onSubmit) is overriden at
>> 
>> [...onEvent(...)...]
>> getForm().getRootForm().onFormSubmitted(new IFormSubmitter()
>> {
>>  public void onSubmit()
>>  {
>> AjaxFormSubmitBehavior.this.onSubmit(target);
>>  }
>> }
>> [...]
>> 
>> or not?
>> 
>>  Original-Nachricht 
>>> Datum: Thu, 22 Sep 2011 08:15:13 -0700
>>> Von: Igor Vaynberg 
>>> An: users@wicket.apache.org
>>> Betreff: Re: onSubmit - Button vs AjaxButton
>> 
>>> what else could be the submitting component but the button at that point?
>>> 
>>> -igor
>>> 
>>> On Thu, Sep 22, 2011 at 8:10 AM, Marcel Hoerr  wrote:
 as you debugged the code in AbstractDefaultAjaxBehavior. the actual call
>>> hierachy is the following:
 
 - AbstractDefaultAjaxBehavior.onRequest
 -- AjaxEventBehavior.respond
 --- AjaxFormSubmitBehavior.onEvent
 
 the onEvent() method of the AjaxFormSubmitBehavior invokes in wicket 1.5
>>> no more the submitting component of the root form, but passes itself as
>>> submitting component into the root form.
 
 code from wicket 1.4
 @Override
 protected void onEvent(AjaxRequestTarget target)
 {
   getForm().getRootForm().onFormSubmitted();
 [...]
 
 code from wicket 1.5
 @Override
 protected void onEvent(final AjaxRequestTarget target)
 {
   getForm().getRootForm().onFormSubmitted(new IFormSubmitter()
   {
public Form getForm()
{
return AjaxFormSubmitBehavior.this.getForm();
}
 
public boolean getDefaultFormProcessing()
{
return
>>> AjaxFormSubmitBehavior.this.getDefaultProcessing();
}
 
public void onSubmit()
{
AjaxFormSubmitBehavior.this.onSubmit(target);
}
 
public void onError()
{
AjaxFormSubmitBehavior.this.onError(target);
}
   });
 }
 
  Original-Nachricht 
> Datum: Thu, 22 Sep 2011 17:27:42 +0300
> Von: Martin Grigorov 
> An: users@wicket.apache.org
> Betreff: Re: onSubmit - Button vs AjaxButton
 
> 1.5 code from
> org.apache.wicket.ajax.markup.html.form.AjaxButton.AjaxButton(...).new
> AjaxFormSubmitBehavior() {...}.onSubmit(AjaxRequestTarget):
> 
> @Override
> protected void onSubmit(AjaxRequestTarget target)
> {
>   AjaxButton.this.onSubmit(target, AjaxButton.this.getForm());
> }
> 
> What do you mean by that AjaxFormSubmitBehavior handles the event ?
> 
> On Thu, Sep 22, 2011 at 5:22 PM, Marcel Hoerr 
>>> wrote:
>> i guess it is the change in the onEvent method of the
> AjaxFormSubmitBehavior.
>> 
>> in wicket 1.4 the AjaxFormSubmitBehavior gets the root form and fires
> its onSubmit (meaning the underlying button is the formsubmitter) and
>>> handles
> afterwards its own onSubmit.
>> in wicket 1.5 the AjaxFormSubmitBehavior handles itself as
>>> formsubmitter
> and the underlying button gets never fired.
>> 
>>  Original-Nachricht 
>>> Datum: Thu, 22 Sep 2011 15:45:37 +0300
>>> Von: Martin Grigorov 
>>> An: users@wicket.apache.org
>>> Betreff: Re: onSubmit - Button vs AjaxButton
>> 
>>> check whether onError() is called
>>> 
>>> Or put a breakpoint in
>>> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest() and
>>> follow to see where it breaks.
>>> 
>>> On Thu, Sep 22, 2011 at 2:15 PM, Marcel Hoerr 
> wrote:
 hey guys,
 
 i have a question regarding the onSubmit method in Button and
>>> AjaxButton. we use an ajaxtified WizardButton
>>> (AjaxFormSubmitBehaivor)
> which works
>>> fine for wicket 1.4, but in wicket 1.5 the onSubmit method of the
> underlying
>>> WizardButton is never been called.
 
 any hint appreciated.
 --
 NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
 Jetzt informieren: http://www.gmx.net/de/go/freephone
 
 
>>> -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional command

Re: creating a textarea with a radiobutton using Listview

2011-09-22 Thread wholalotta
Oh ok I got it right now. In each listitem we should create at least two
radio item to get true or false values for that field. I thought creating
one radiobutton in each iteration, after 4 iteration, will give me 4
radiobuttons which all of them reacts as one group. And so, i wanted to be
able to select only one radiobutton. But it didnt work in that way.

First I created one checkbox and one textfield for each line. And when the
user selects the checkbox I was able to set the related boolean values
succesfuly. But I needed to put a restriction. Only one checkbox can be
selected to submit the form in the followıng structure.

Textarea checkbox
Textarea checkbox
Textarea checkbox
Textarea checkbox

So I decided to put radiobutton instead of checkboxes..So you are saying
that this cant be done neither radiobuttons nor checkboxes. Do I have to
implement some javascrıpt code to block selecting more than one checkboxes
in a form?

Thanks


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/creating-a-textarea-with-a-radiobutton-using-Listview-tp3829602p3834003.html
Sent from the Users forum 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: onSubmit - Button vs AjaxButton

2011-09-22 Thread Igor Vaynberg
so it looks like

onevent() submits the form with a form submitter that calls behavior's onsubmit
behavior's onsubmit calls button's onsubmit

so the button's onsubmit should be called...

-igor

On Thu, Sep 22, 2011 at 8:33 AM, Marcel Hoerr  wrote:
> as far as i can see it, no button is the submitting component in wicket 1.5 
> at this point, but the AjaxFormSubmitBehavior is. the actual button (and its 
> own onSubmit) is overriden at
>
> [...onEvent(...)...]
> getForm().getRootForm().onFormSubmitted(new IFormSubmitter()
> {
>  public void onSubmit()
>  {
>     AjaxFormSubmitBehavior.this.onSubmit(target);
>  }
> }
> [...]
>
> or not?
>
>  Original-Nachricht 
>> Datum: Thu, 22 Sep 2011 08:15:13 -0700
>> Von: Igor Vaynberg 
>> An: users@wicket.apache.org
>> Betreff: Re: onSubmit - Button vs AjaxButton
>
>> what else could be the submitting component but the button at that point?
>>
>> -igor
>>
>> On Thu, Sep 22, 2011 at 8:10 AM, Marcel Hoerr  wrote:
>> > as you debugged the code in AbstractDefaultAjaxBehavior. the actual call
>> hierachy is the following:
>> >
>> > - AbstractDefaultAjaxBehavior.onRequest
>> > -- AjaxEventBehavior.respond
>> > --- AjaxFormSubmitBehavior.onEvent
>> >
>> > the onEvent() method of the AjaxFormSubmitBehavior invokes in wicket 1.5
>> no more the submitting component of the root form, but passes itself as
>> submitting component into the root form.
>> >
>> > code from wicket 1.4
>> > @Override
>> > protected void onEvent(AjaxRequestTarget target)
>> > {
>> >   getForm().getRootForm().onFormSubmitted();
>> > [...]
>> >
>> > code from wicket 1.5
>> > @Override
>> > protected void onEvent(final AjaxRequestTarget target)
>> > {
>> >   getForm().getRootForm().onFormSubmitted(new IFormSubmitter()
>> >   {
>> >        public Form getForm()
>> >        {
>> >                return AjaxFormSubmitBehavior.this.getForm();
>> >        }
>> >
>> >        public boolean getDefaultFormProcessing()
>> >        {
>> >                return
>> AjaxFormSubmitBehavior.this.getDefaultProcessing();
>> >        }
>> >
>> >        public void onSubmit()
>> >        {
>> >                AjaxFormSubmitBehavior.this.onSubmit(target);
>> >        }
>> >
>> >        public void onError()
>> >        {
>> >                AjaxFormSubmitBehavior.this.onError(target);
>> >        }
>> >   });
>> > }
>> >
>> >  Original-Nachricht 
>> >> Datum: Thu, 22 Sep 2011 17:27:42 +0300
>> >> Von: Martin Grigorov 
>> >> An: users@wicket.apache.org
>> >> Betreff: Re: onSubmit - Button vs AjaxButton
>> >
>> >> 1.5 code from
>> >> org.apache.wicket.ajax.markup.html.form.AjaxButton.AjaxButton(...).new
>> >> AjaxFormSubmitBehavior() {...}.onSubmit(AjaxRequestTarget):
>> >>
>> >> @Override
>> >> protected void onSubmit(AjaxRequestTarget target)
>> >> {
>> >>       AjaxButton.this.onSubmit(target, AjaxButton.this.getForm());
>> >> }
>> >>
>> >> What do you mean by that AjaxFormSubmitBehavior handles the event ?
>> >>
>> >> On Thu, Sep 22, 2011 at 5:22 PM, Marcel Hoerr 
>> wrote:
>> >> > i guess it is the change in the onEvent method of the
>> >> AjaxFormSubmitBehavior.
>> >> >
>> >> > in wicket 1.4 the AjaxFormSubmitBehavior gets the root form and fires
>> >> its onSubmit (meaning the underlying button is the formsubmitter) and
>> handles
>> >> afterwards its own onSubmit.
>> >> > in wicket 1.5 the AjaxFormSubmitBehavior handles itself as
>> formsubmitter
>> >> and the underlying button gets never fired.
>> >> >
>> >> >  Original-Nachricht 
>> >> >> Datum: Thu, 22 Sep 2011 15:45:37 +0300
>> >> >> Von: Martin Grigorov 
>> >> >> An: users@wicket.apache.org
>> >> >> Betreff: Re: onSubmit - Button vs AjaxButton
>> >> >
>> >> >> check whether onError() is called
>> >> >>
>> >> >> Or put a breakpoint in
>> >> >> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest() and
>> >> >> follow to see where it breaks.
>> >> >>
>> >> >> On Thu, Sep 22, 2011 at 2:15 PM, Marcel Hoerr 
>> >> wrote:
>> >> >> > hey guys,
>> >> >> >
>> >> >> > i have a question regarding the onSubmit method in Button and
>> >> >> AjaxButton. we use an ajaxtified WizardButton
>> (AjaxFormSubmitBehaivor)
>> >> which works
>> >> >> fine for wicket 1.4, but in wicket 1.5 the onSubmit method of the
>> >> underlying
>> >> >> WizardButton is never been called.
>> >> >> >
>> >> >> > any hint appreciated.
>> >> >> > --
>> >> >> > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
>> >> >> > Jetzt informieren: http://www.gmx.net/de/go/freephone
>> >> >> >
>> >> >> >
>> -
>> >> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> >> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Martin Grigorov
>> >> >> jWeekend
>> >> >> Training, Consulting, Development
>> >> >> http://jWeekend.com
>> >> >>
>> >> >>
>> ---

Re: onSubmit - Button vs AjaxButton

2011-09-22 Thread Marcel Hoerr
as far as i can see it, no button is the submitting component in wicket 1.5 at 
this point, but the AjaxFormSubmitBehavior is. the actual button (and its own 
onSubmit) is overriden at

[...onEvent(...)...]
getForm().getRootForm().onFormSubmitted(new IFormSubmitter()
{
  public void onSubmit()
  {
 AjaxFormSubmitBehavior.this.onSubmit(target);
  }
}
[...]

or not?

 Original-Nachricht 
> Datum: Thu, 22 Sep 2011 08:15:13 -0700
> Von: Igor Vaynberg 
> An: users@wicket.apache.org
> Betreff: Re: onSubmit - Button vs AjaxButton

> what else could be the submitting component but the button at that point?
> 
> -igor
> 
> On Thu, Sep 22, 2011 at 8:10 AM, Marcel Hoerr  wrote:
> > as you debugged the code in AbstractDefaultAjaxBehavior. the actual call
> hierachy is the following:
> >
> > - AbstractDefaultAjaxBehavior.onRequest
> > -- AjaxEventBehavior.respond
> > --- AjaxFormSubmitBehavior.onEvent
> >
> > the onEvent() method of the AjaxFormSubmitBehavior invokes in wicket 1.5
> no more the submitting component of the root form, but passes itself as
> submitting component into the root form.
> >
> > code from wicket 1.4
> > @Override
> > protected void onEvent(AjaxRequestTarget target)
> > {
> >   getForm().getRootForm().onFormSubmitted();
> > [...]
> >
> > code from wicket 1.5
> > @Override
> > protected void onEvent(final AjaxRequestTarget target)
> > {
> >   getForm().getRootForm().onFormSubmitted(new IFormSubmitter()
> >   {
> >        public Form getForm()
> >        {
> >                return AjaxFormSubmitBehavior.this.getForm();
> >        }
> >
> >        public boolean getDefaultFormProcessing()
> >        {
> >                return
> AjaxFormSubmitBehavior.this.getDefaultProcessing();
> >        }
> >
> >        public void onSubmit()
> >        {
> >                AjaxFormSubmitBehavior.this.onSubmit(target);
> >        }
> >
> >        public void onError()
> >        {
> >                AjaxFormSubmitBehavior.this.onError(target);
> >        }
> >   });
> > }
> >
> >  Original-Nachricht 
> >> Datum: Thu, 22 Sep 2011 17:27:42 +0300
> >> Von: Martin Grigorov 
> >> An: users@wicket.apache.org
> >> Betreff: Re: onSubmit - Button vs AjaxButton
> >
> >> 1.5 code from
> >> org.apache.wicket.ajax.markup.html.form.AjaxButton.AjaxButton(...).new
> >> AjaxFormSubmitBehavior() {...}.onSubmit(AjaxRequestTarget):
> >>
> >> @Override
> >> protected void onSubmit(AjaxRequestTarget target)
> >> {
> >>       AjaxButton.this.onSubmit(target, AjaxButton.this.getForm());
> >> }
> >>
> >> What do you mean by that AjaxFormSubmitBehavior handles the event ?
> >>
> >> On Thu, Sep 22, 2011 at 5:22 PM, Marcel Hoerr 
> wrote:
> >> > i guess it is the change in the onEvent method of the
> >> AjaxFormSubmitBehavior.
> >> >
> >> > in wicket 1.4 the AjaxFormSubmitBehavior gets the root form and fires
> >> its onSubmit (meaning the underlying button is the formsubmitter) and
> handles
> >> afterwards its own onSubmit.
> >> > in wicket 1.5 the AjaxFormSubmitBehavior handles itself as
> formsubmitter
> >> and the underlying button gets never fired.
> >> >
> >> >  Original-Nachricht 
> >> >> Datum: Thu, 22 Sep 2011 15:45:37 +0300
> >> >> Von: Martin Grigorov 
> >> >> An: users@wicket.apache.org
> >> >> Betreff: Re: onSubmit - Button vs AjaxButton
> >> >
> >> >> check whether onError() is called
> >> >>
> >> >> Or put a breakpoint in
> >> >> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest() and
> >> >> follow to see where it breaks.
> >> >>
> >> >> On Thu, Sep 22, 2011 at 2:15 PM, Marcel Hoerr 
> >> wrote:
> >> >> > hey guys,
> >> >> >
> >> >> > i have a question regarding the onSubmit method in Button and
> >> >> AjaxButton. we use an ajaxtified WizardButton
> (AjaxFormSubmitBehaivor)
> >> which works
> >> >> fine for wicket 1.4, but in wicket 1.5 the onSubmit method of the
> >> underlying
> >> >> WizardButton is never been called.
> >> >> >
> >> >> > any hint appreciated.
> >> >> > --
> >> >> > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
> >> >> > Jetzt informieren: http://www.gmx.net/de/go/freephone
> >> >> >
> >> >> >
> -
> >> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> >> > For additional commands, e-mail: users-h...@wicket.apache.org
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Martin Grigorov
> >> >> jWeekend
> >> >> Training, Consulting, Development
> >> >> http://jWeekend.com
> >> >>
> >> >>
> -
> >> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >> >>
> >> >
> >> > --
> >> > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
> >> > Jetzt informieren: http://www.gmx.net/de/go/freephone
> >> >
> >> > ---

Re: Very minor amendment in the 1.5.0 Javadocs for StringResourceModel

2011-09-22 Thread Martin Grigorov
re-ordered with r1174198.

On Thu, Sep 22, 2011 at 6:19 PM, Martin Grigorov  wrote:
> On Thu, Sep 22, 2011 at 6:11 PM, Ian Marshall  
> wrote:
>> In the 1.5.0 documentation for org.apache.wicket.model.StringResourceModel,
>> one constructor is
>>
>>  public StringResourceModel(String resourceKey,
>>   Component component,
>>   IModel model,
>>   String defaultValue,
>>   Object... parameters)
>>
>>
>> EXTRACT FROM EXISTING DOCUMENTATION
>>  ...
>>  Parameters:
>>    resourceKey - The resource key for this string resource
>>    component - The component that the resource is relative to
>>    model - The model to use for property substitutions
>>    parameters - The parameters to substitute using a Java MessageFormat
>> object
>>    defaultValue - The default value if the resource key is not found.
>>
>>
>> COMMENT
>> All I am saying is that the ordering of the "Parameters" section above might
>> want to be tweaked to match the order of the constructor's parameters -
>> particularly since the last parameter is now vararg in 1.5.
>>
>> (I did say "Minor typo" - but I guess that this issue is not a typo at all -
>> just a very minor tweak.)
>
> You mean the order of the @param's is not matching ?
> I don't think this is a problem for bin/javadoc
>>
>>
>>
>> Martin Grigorov-4 wrote:
>>>
>>> you can paste a patch here
>>> I'm not sure that I understand you
>>>
>>> On Thu, Sep 22, 2011 at 5:15 PM, Ian Marshall
>>>  wrote:
 Hello there,

 I believe that I have spotted a minor typo in the 1.5.0 Javadocs for
 org.apache.wicket.model.StringResourceModel whilst fettling my app for
 1.5.

 For the documentation for the constructor

  StringResourceModel(String resourceKey, Component component, IModel
 model, String defaultValue, Object... parameters)

 the "Parameters" section is unchanged from 1.4 and does not reflect the
 modified method signature.

 I don't think that I can change this so I submit this post for comment.

 Ian

 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Minor-typo-in-the-1-5-0-Javadocs-for-StringResourceModel-tp3833555p3833555.html
 Sent from the Users forum 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


>>>
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>>
>>> -
>>> 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://apache-wicket.1842946.n4.nabble.com/Minor-typo-in-the-1-5-0-Javadocs-for-StringResourceModel-tp3833555p3833702.html
>> Sent from the Users forum 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
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Very minor amendment in the 1.5.0 Javadocs for StringResourceModel

2011-09-22 Thread Martin Grigorov
On Thu, Sep 22, 2011 at 6:11 PM, Ian Marshall  wrote:
> In the 1.5.0 documentation for org.apache.wicket.model.StringResourceModel,
> one constructor is
>
>  public StringResourceModel(String resourceKey,
>   Component component,
>   IModel model,
>   String defaultValue,
>   Object... parameters)
>
>
> EXTRACT FROM EXISTING DOCUMENTATION
>  ...
>  Parameters:
>    resourceKey - The resource key for this string resource
>    component - The component that the resource is relative to
>    model - The model to use for property substitutions
>    parameters - The parameters to substitute using a Java MessageFormat
> object
>    defaultValue - The default value if the resource key is not found.
>
>
> COMMENT
> All I am saying is that the ordering of the "Parameters" section above might
> want to be tweaked to match the order of the constructor's parameters -
> particularly since the last parameter is now vararg in 1.5.
>
> (I did say "Minor typo" - but I guess that this issue is not a typo at all -
> just a very minor tweak.)

You mean the order of the @param's is not matching ?
I don't think this is a problem for bin/javadoc
>
>
>
> Martin Grigorov-4 wrote:
>>
>> you can paste a patch here
>> I'm not sure that I understand you
>>
>> On Thu, Sep 22, 2011 at 5:15 PM, Ian Marshall
>>  wrote:
>>> Hello there,
>>>
>>> I believe that I have spotted a minor typo in the 1.5.0 Javadocs for
>>> org.apache.wicket.model.StringResourceModel whilst fettling my app for
>>> 1.5.
>>>
>>> For the documentation for the constructor
>>>
>>>  StringResourceModel(String resourceKey, Component component, IModel
>>> model, String defaultValue, Object... parameters)
>>>
>>> the "Parameters" section is unchanged from 1.4 and does not reflect the
>>> modified method signature.
>>>
>>> I don't think that I can change this so I submit this post for comment.
>>>
>>> Ian
>>>
>>> --
>>> View this message in context:
>>> http://apache-wicket.1842946.n4.nabble.com/Minor-typo-in-the-1-5-0-Javadocs-for-StringResourceModel-tp3833555p3833555.html
>>> Sent from the Users forum 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
>>>
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> -
>> 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://apache-wicket.1842946.n4.nabble.com/Minor-typo-in-the-1-5-0-Javadocs-for-StringResourceModel-tp3833555p3833702.html
> Sent from the Users forum 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
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: onSubmit - Button vs AjaxButton

2011-09-22 Thread Igor Vaynberg
what else could be the submitting component but the button at that point?

-igor

On Thu, Sep 22, 2011 at 8:10 AM, Marcel Hoerr  wrote:
> as you debugged the code in AbstractDefaultAjaxBehavior. the actual call 
> hierachy is the following:
>
> - AbstractDefaultAjaxBehavior.onRequest
> -- AjaxEventBehavior.respond
> --- AjaxFormSubmitBehavior.onEvent
>
> the onEvent() method of the AjaxFormSubmitBehavior invokes in wicket 1.5 no 
> more the submitting component of the root form, but passes itself as 
> submitting component into the root form.
>
> code from wicket 1.4
> @Override
> protected void onEvent(AjaxRequestTarget target)
> {
>   getForm().getRootForm().onFormSubmitted();
> [...]
>
> code from wicket 1.5
> @Override
> protected void onEvent(final AjaxRequestTarget target)
> {
>   getForm().getRootForm().onFormSubmitted(new IFormSubmitter()
>   {
>        public Form getForm()
>        {
>                return AjaxFormSubmitBehavior.this.getForm();
>        }
>
>        public boolean getDefaultFormProcessing()
>        {
>                return AjaxFormSubmitBehavior.this.getDefaultProcessing();
>        }
>
>        public void onSubmit()
>        {
>                AjaxFormSubmitBehavior.this.onSubmit(target);
>        }
>
>        public void onError()
>        {
>                AjaxFormSubmitBehavior.this.onError(target);
>        }
>   });
> }
>
>  Original-Nachricht 
>> Datum: Thu, 22 Sep 2011 17:27:42 +0300
>> Von: Martin Grigorov 
>> An: users@wicket.apache.org
>> Betreff: Re: onSubmit - Button vs AjaxButton
>
>> 1.5 code from
>> org.apache.wicket.ajax.markup.html.form.AjaxButton.AjaxButton(...).new
>> AjaxFormSubmitBehavior() {...}.onSubmit(AjaxRequestTarget):
>>
>> @Override
>> protected void onSubmit(AjaxRequestTarget target)
>> {
>>       AjaxButton.this.onSubmit(target, AjaxButton.this.getForm());
>> }
>>
>> What do you mean by that AjaxFormSubmitBehavior handles the event ?
>>
>> On Thu, Sep 22, 2011 at 5:22 PM, Marcel Hoerr  wrote:
>> > i guess it is the change in the onEvent method of the
>> AjaxFormSubmitBehavior.
>> >
>> > in wicket 1.4 the AjaxFormSubmitBehavior gets the root form and fires
>> its onSubmit (meaning the underlying button is the formsubmitter) and handles
>> afterwards its own onSubmit.
>> > in wicket 1.5 the AjaxFormSubmitBehavior handles itself as formsubmitter
>> and the underlying button gets never fired.
>> >
>> >  Original-Nachricht 
>> >> Datum: Thu, 22 Sep 2011 15:45:37 +0300
>> >> Von: Martin Grigorov 
>> >> An: users@wicket.apache.org
>> >> Betreff: Re: onSubmit - Button vs AjaxButton
>> >
>> >> check whether onError() is called
>> >>
>> >> Or put a breakpoint in
>> >> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest() and
>> >> follow to see where it breaks.
>> >>
>> >> On Thu, Sep 22, 2011 at 2:15 PM, Marcel Hoerr 
>> wrote:
>> >> > hey guys,
>> >> >
>> >> > i have a question regarding the onSubmit method in Button and
>> >> AjaxButton. we use an ajaxtified WizardButton (AjaxFormSubmitBehaivor)
>> which works
>> >> fine for wicket 1.4, but in wicket 1.5 the onSubmit method of the
>> underlying
>> >> WizardButton is never been called.
>> >> >
>> >> > any hint appreciated.
>> >> > --
>> >> > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
>> >> > Jetzt informieren: http://www.gmx.net/de/go/freephone
>> >> >
>> >> > -
>> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Martin Grigorov
>> >> jWeekend
>> >> Training, Consulting, Development
>> >> http://jWeekend.com
>> >>
>> >> -
>> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> >> For additional commands, e-mail: users-h...@wicket.apache.org
>> >>
>> >
>> > --
>> > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
>> > Jetzt informieren: http://www.gmx.net/de/go/freephone
>> >
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >
>> >
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
> --
> NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
> Jetzt informieren: http://www.gmx.net/de/go/freephone
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

---

Re: onSubmit - Button vs AjaxButton

2011-09-22 Thread Marcel Hoerr
as you suggested i debugged the code in AbstractDefaultAjaxBehavior. ;-)

 Original-Nachricht 
> Datum: Thu, 22 Sep 2011 17:10:07 +0200
> Von: "Marcel Hoerr" 
> An: users@wicket.apache.org
> Betreff: Re: onSubmit - Button vs AjaxButton

> as you debugged the code in AbstractDefaultAjaxBehavior. the actual call
> hierachy is the following:
> 
> - AbstractDefaultAjaxBehavior.onRequest
> -- AjaxEventBehavior.respond
> --- AjaxFormSubmitBehavior.onEvent
> 
> the onEvent() method of the AjaxFormSubmitBehavior invokes in wicket 1.5
> no more the submitting component of the root form, but passes itself as
> submitting component into the root form.
> 
> code from wicket 1.4
> @Override
> protected void onEvent(AjaxRequestTarget target)
> {
>getForm().getRootForm().onFormSubmitted();
> [...]
> 
> code from wicket 1.5
> @Override
> protected void onEvent(final AjaxRequestTarget target)
> {
>getForm().getRootForm().onFormSubmitted(new IFormSubmitter()
>{
>   public Form getForm()
>   {
>   return AjaxFormSubmitBehavior.this.getForm();
>   }
> 
>   public boolean getDefaultFormProcessing()
>   {
>   return AjaxFormSubmitBehavior.this.getDefaultProcessing();
>   }
> 
>   public void onSubmit()
>   {
>   AjaxFormSubmitBehavior.this.onSubmit(target);
>   }
> 
>   public void onError()
>   {
>   AjaxFormSubmitBehavior.this.onError(target);
>   }
>});
> }
> 
>  Original-Nachricht 
> > Datum: Thu, 22 Sep 2011 17:27:42 +0300
> > Von: Martin Grigorov 
> > An: users@wicket.apache.org
> > Betreff: Re: onSubmit - Button vs AjaxButton
> 
> > 1.5 code from
> > org.apache.wicket.ajax.markup.html.form.AjaxButton.AjaxButton(...).new
> > AjaxFormSubmitBehavior() {...}.onSubmit(AjaxRequestTarget):
> > 
> > @Override
> > protected void onSubmit(AjaxRequestTarget target)
> > {
> > AjaxButton.this.onSubmit(target, AjaxButton.this.getForm());
> > }
> > 
> > What do you mean by that AjaxFormSubmitBehavior handles the event ?
> > 
> > On Thu, Sep 22, 2011 at 5:22 PM, Marcel Hoerr 
> wrote:
> > > i guess it is the change in the onEvent method of the
> > AjaxFormSubmitBehavior.
> > >
> > > in wicket 1.4 the AjaxFormSubmitBehavior gets the root form and fires
> > its onSubmit (meaning the underlying button is the formsubmitter) and
> handles
> > afterwards its own onSubmit.
> > > in wicket 1.5 the AjaxFormSubmitBehavior handles itself as
> formsubmitter
> > and the underlying button gets never fired.
> > >
> > >  Original-Nachricht 
> > >> Datum: Thu, 22 Sep 2011 15:45:37 +0300
> > >> Von: Martin Grigorov 
> > >> An: users@wicket.apache.org
> > >> Betreff: Re: onSubmit - Button vs AjaxButton
> > >
> > >> check whether onError() is called
> > >>
> > >> Or put a breakpoint in
> > >> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest() and
> > >> follow to see where it breaks.
> > >>
> > >> On Thu, Sep 22, 2011 at 2:15 PM, Marcel Hoerr 
> > wrote:
> > >> > hey guys,
> > >> >
> > >> > i have a question regarding the onSubmit method in Button and
> > >> AjaxButton. we use an ajaxtified WizardButton
> (AjaxFormSubmitBehaivor)
> > which works
> > >> fine for wicket 1.4, but in wicket 1.5 the onSubmit method of the
> > underlying
> > >> WizardButton is never been called.
> > >> >
> > >> > any hint appreciated.
> > >> > --
> > >> > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
> > >> > Jetzt informieren: http://www.gmx.net/de/go/freephone
> > >> >
> > >> >
> -
> > >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > >> > For additional commands, e-mail: users-h...@wicket.apache.org
> > >> >
> > >> >
> > >>
> > >>
> > >>
> > >> --
> > >> Martin Grigorov
> > >> jWeekend
> > >> Training, Consulting, Development
> > >> http://jWeekend.com
> > >>
> > >> -
> > >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > >> For additional commands, e-mail: users-h...@wicket.apache.org
> > >>
> > >
> > > --
> > > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
> > > Jetzt informieren: http://www.gmx.net/de/go/freephone
> > >
> > > -
> > > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > > For additional commands, e-mail: users-h...@wicket.apache.org
> > >
> > >
> > 
> > 
> > 
> > -- 
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com
> > 
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> > 
> 
> -- 
> NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! 
> Jetzt informieren: http://www.gmx.net/de

Very minor amendment in the 1.5.0 Javadocs for StringResourceModel

2011-09-22 Thread Ian Marshall
In the 1.5.0 documentation for org.apache.wicket.model.StringResourceModel,
one constructor is

  public StringResourceModel(String resourceKey,
   Component component,
   IModel model,
   String defaultValue,
   Object... parameters)


EXTRACT FROM EXISTING DOCUMENTATION
  ...
  Parameters:
resourceKey - The resource key for this string resource
component - The component that the resource is relative to
model - The model to use for property substitutions
parameters - The parameters to substitute using a Java MessageFormat
object
defaultValue - The default value if the resource key is not found.


COMMENT
All I am saying is that the ordering of the "Parameters" section above might
want to be tweaked to match the order of the constructor's parameters -
particularly since the last parameter is now vararg in 1.5.

(I did say "Minor typo" - but I guess that this issue is not a typo at all -
just a very minor tweak.)



Martin Grigorov-4 wrote:
> 
> you can paste a patch here
> I'm not sure that I understand you
> 
> On Thu, Sep 22, 2011 at 5:15 PM, Ian Marshall
>  wrote:
>> Hello there,
>>
>> I believe that I have spotted a minor typo in the 1.5.0 Javadocs for
>> org.apache.wicket.model.StringResourceModel whilst fettling my app for
>> 1.5.
>>
>> For the documentation for the constructor
>>
>>  StringResourceModel(String resourceKey, Component component, IModel
>> model, String defaultValue, Object... parameters)
>>
>> the "Parameters" section is unchanged from 1.4 and does not reflect the
>> modified method signature.
>>
>> I don't think that I can change this so I submit this post for comment.
>>
>> Ian
>>
>> --
>> View this message in context:
>> http://apache-wicket.1842946.n4.nabble.com/Minor-typo-in-the-1-5-0-Javadocs-for-StringResourceModel-tp3833555p3833555.html
>> Sent from the Users forum 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
>>
>>
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> -
> 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://apache-wicket.1842946.n4.nabble.com/Minor-typo-in-the-1-5-0-Javadocs-for-StringResourceModel-tp3833555p3833702.html
Sent from the Users forum 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: onSubmit - Button vs AjaxButton

2011-09-22 Thread Marcel Hoerr
as you debugged the code in AbstractDefaultAjaxBehavior. the actual call 
hierachy is the following:

- AbstractDefaultAjaxBehavior.onRequest
-- AjaxEventBehavior.respond
--- AjaxFormSubmitBehavior.onEvent

the onEvent() method of the AjaxFormSubmitBehavior invokes in wicket 1.5 no 
more the submitting component of the root form, but passes itself as submitting 
component into the root form.

code from wicket 1.4
@Override
protected void onEvent(AjaxRequestTarget target)
{
   getForm().getRootForm().onFormSubmitted();
[...]

code from wicket 1.5
@Override
protected void onEvent(final AjaxRequestTarget target)
{
   getForm().getRootForm().onFormSubmitted(new IFormSubmitter()
   {
public Form getForm()
{
return AjaxFormSubmitBehavior.this.getForm();
}

public boolean getDefaultFormProcessing()
{
return AjaxFormSubmitBehavior.this.getDefaultProcessing();
}

public void onSubmit()
{
AjaxFormSubmitBehavior.this.onSubmit(target);
}

public void onError()
{
AjaxFormSubmitBehavior.this.onError(target);
}
   });
}

 Original-Nachricht 
> Datum: Thu, 22 Sep 2011 17:27:42 +0300
> Von: Martin Grigorov 
> An: users@wicket.apache.org
> Betreff: Re: onSubmit - Button vs AjaxButton

> 1.5 code from
> org.apache.wicket.ajax.markup.html.form.AjaxButton.AjaxButton(...).new
> AjaxFormSubmitBehavior() {...}.onSubmit(AjaxRequestTarget):
> 
> @Override
> protected void onSubmit(AjaxRequestTarget target)
> {
>   AjaxButton.this.onSubmit(target, AjaxButton.this.getForm());
> }
> 
> What do you mean by that AjaxFormSubmitBehavior handles the event ?
> 
> On Thu, Sep 22, 2011 at 5:22 PM, Marcel Hoerr  wrote:
> > i guess it is the change in the onEvent method of the
> AjaxFormSubmitBehavior.
> >
> > in wicket 1.4 the AjaxFormSubmitBehavior gets the root form and fires
> its onSubmit (meaning the underlying button is the formsubmitter) and handles
> afterwards its own onSubmit.
> > in wicket 1.5 the AjaxFormSubmitBehavior handles itself as formsubmitter
> and the underlying button gets never fired.
> >
> >  Original-Nachricht 
> >> Datum: Thu, 22 Sep 2011 15:45:37 +0300
> >> Von: Martin Grigorov 
> >> An: users@wicket.apache.org
> >> Betreff: Re: onSubmit - Button vs AjaxButton
> >
> >> check whether onError() is called
> >>
> >> Or put a breakpoint in
> >> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest() and
> >> follow to see where it breaks.
> >>
> >> On Thu, Sep 22, 2011 at 2:15 PM, Marcel Hoerr 
> wrote:
> >> > hey guys,
> >> >
> >> > i have a question regarding the onSubmit method in Button and
> >> AjaxButton. we use an ajaxtified WizardButton (AjaxFormSubmitBehaivor)
> which works
> >> fine for wicket 1.4, but in wicket 1.5 the onSubmit method of the
> underlying
> >> WizardButton is never been called.
> >> >
> >> > any hint appreciated.
> >> > --
> >> > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
> >> > Jetzt informieren: http://www.gmx.net/de/go/freephone
> >> >
> >> > -
> >> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> > For additional commands, e-mail: users-h...@wicket.apache.org
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Martin Grigorov
> >> jWeekend
> >> Training, Consulting, Development
> >> http://jWeekend.com
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >
> > --
> > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
> > Jetzt informieren: http://www.gmx.net/de/go/freephone
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!   
Jetzt informieren: http://www.gmx.net/de/go/freephone

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



Re: onSubmit - Button vs AjaxButton

2011-09-22 Thread Martin Grigorov
1.5 code from 
org.apache.wicket.ajax.markup.html.form.AjaxButton.AjaxButton(...).new
AjaxFormSubmitBehavior() {...}.onSubmit(AjaxRequestTarget):

@Override
protected void onSubmit(AjaxRequestTarget target)
{
AjaxButton.this.onSubmit(target, AjaxButton.this.getForm());
}

What do you mean by that AjaxFormSubmitBehavior handles the event ?

On Thu, Sep 22, 2011 at 5:22 PM, Marcel Hoerr  wrote:
> i guess it is the change in the onEvent method of the AjaxFormSubmitBehavior.
>
> in wicket 1.4 the AjaxFormSubmitBehavior gets the root form and fires its 
> onSubmit (meaning the underlying button is the formsubmitter) and handles 
> afterwards its own onSubmit.
> in wicket 1.5 the AjaxFormSubmitBehavior handles itself as formsubmitter and 
> the underlying button gets never fired.
>
>  Original-Nachricht 
>> Datum: Thu, 22 Sep 2011 15:45:37 +0300
>> Von: Martin Grigorov 
>> An: users@wicket.apache.org
>> Betreff: Re: onSubmit - Button vs AjaxButton
>
>> check whether onError() is called
>>
>> Or put a breakpoint in
>> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest() and
>> follow to see where it breaks.
>>
>> On Thu, Sep 22, 2011 at 2:15 PM, Marcel Hoerr  wrote:
>> > hey guys,
>> >
>> > i have a question regarding the onSubmit method in Button and
>> AjaxButton. we use an ajaxtified WizardButton (AjaxFormSubmitBehaivor) which 
>> works
>> fine for wicket 1.4, but in wicket 1.5 the onSubmit method of the underlying
>> WizardButton is never been called.
>> >
>> > any hint appreciated.
>> > --
>> > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
>> > Jetzt informieren: http://www.gmx.net/de/go/freephone
>> >
>> > -
>> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> > For additional commands, e-mail: users-h...@wicket.apache.org
>> >
>> >
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
> --
> NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
> Jetzt informieren: http://www.gmx.net/de/go/freephone
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: onSubmit - Button vs AjaxButton

2011-09-22 Thread Marcel Hoerr
i guess it is the change in the onEvent method of the AjaxFormSubmitBehavior.

in wicket 1.4 the AjaxFormSubmitBehavior gets the root form and fires its 
onSubmit (meaning the underlying button is the formsubmitter) and handles 
afterwards its own onSubmit.
in wicket 1.5 the AjaxFormSubmitBehavior handles itself as formsubmitter and 
the underlying button gets never fired.

 Original-Nachricht 
> Datum: Thu, 22 Sep 2011 15:45:37 +0300
> Von: Martin Grigorov 
> An: users@wicket.apache.org
> Betreff: Re: onSubmit - Button vs AjaxButton

> check whether onError() is called
> 
> Or put a breakpoint in
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest() and
> follow to see where it breaks.
> 
> On Thu, Sep 22, 2011 at 2:15 PM, Marcel Hoerr  wrote:
> > hey guys,
> >
> > i have a question regarding the onSubmit method in Button and
> AjaxButton. we use an ajaxtified WizardButton (AjaxFormSubmitBehaivor) which 
> works
> fine for wicket 1.4, but in wicket 1.5 the onSubmit method of the underlying
> WizardButton is never been called.
> >
> > any hint appreciated.
> > --
> > NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
> > Jetzt informieren: http://www.gmx.net/de/go/freephone
> >
> > -
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> >
> >
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!   
Jetzt informieren: http://www.gmx.net/de/go/freephone

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



Re: Minor typo in the 1.5.0 Javadocs for StringResourceModel

2011-09-22 Thread Martin Grigorov
you can paste a patch here
I'm not sure that I understand you

On Thu, Sep 22, 2011 at 5:15 PM, Ian Marshall  wrote:
> Hello there,
>
> I believe that I have spotted a minor typo in the 1.5.0 Javadocs for
> org.apache.wicket.model.StringResourceModel whilst fettling my app for 1.5.
>
> For the documentation for the constructor
>
>  StringResourceModel(String resourceKey, Component component, IModel
> model, String defaultValue, Object... parameters)
>
> the "Parameters" section is unchanged from 1.4 and does not reflect the
> modified method signature.
>
> I don't think that I can change this so I submit this post for comment.
>
> Ian
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Minor-typo-in-the-1-5-0-Javadocs-for-StringResourceModel-tp3833555p3833555.html
> Sent from the Users forum 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
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Minor typo in the 1.5.0 Javadocs for StringResourceModel

2011-09-22 Thread Ian Marshall
Hello there,

I believe that I have spotted a minor typo in the 1.5.0 Javadocs for
org.apache.wicket.model.StringResourceModel whilst fettling my app for 1.5.

For the documentation for the constructor

  StringResourceModel(String resourceKey, Component component, IModel
model, String defaultValue, Object... parameters)

the "Parameters" section is unchanged from 1.4 and does not reflect the
modified method signature.

I don't think that I can change this so I submit this post for comment.

Ian

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Minor-typo-in-the-1-5-0-Javadocs-for-StringResourceModel-tp3833555p3833555.html
Sent from the Users forum 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: onSubmit - Button vs AjaxButton

2011-09-22 Thread Martin Grigorov
check whether onError() is called

Or put a breakpoint in
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest() and
follow to see where it breaks.

On Thu, Sep 22, 2011 at 2:15 PM, Marcel Hoerr  wrote:
> hey guys,
>
> i have a question regarding the onSubmit method in Button and AjaxButton. we 
> use an ajaxtified WizardButton (AjaxFormSubmitBehaivor) which works fine for 
> wicket 1.4, but in wicket 1.5 the onSubmit method of the underlying 
> WizardButton is never been called.
>
> any hint appreciated.
> --
> NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
> Jetzt informieren: http://www.gmx.net/de/go/freephone
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: creating a textarea with a radiobutton using Listview

2011-09-22 Thread manuelbarzi
i guess you are trying to use a Radio like a CheckBox (selected = true
/ false) right?
if this is the case, then why don't you just use a CheckBox and
css-style it like a Radio?

Radio-s are commonly used to select between two or more values, and
that's why RadioGroup provides the capability to group as many Radio-s
as needed. below [1] is the wiki example modified for you to test this
point and recreate this idea. it works fine, and as you'll see, it
provides a boolean selection (true / false), by making use of two
Radio-s.

[1]

html:



 Test


 
  
Checkbox test

  test
  


  
  


  
 
 
  
 



java:

package com.mycompany.view.list;

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

import org.apache.wicket.feedback.IFeedback;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.CheckBox;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.Radio;
import org.apache.wicket.markup.html.form.RadioGroup;
import org.apache.wicket.markup.html.list.ListItem;
import org.apache.wicket.markup.html.list.ListView;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;

/** input web page. */
public class RadioListPage extends WebPage
{
public RadioListPage()
{
final FeedbackPanel feedback = new FeedbackPanel("feedback");
add(feedback);
add(new InputForm("inputForm"));
}

/** form for processing the input. */
private class InputForm extends Form
{
// holds NameWrapper elements
private List data;

public InputForm(String name)
{
super(name);

// add some dummy data
data = new ArrayList();
data.add(new NameWrapper("one"));
data.add(new NameWrapper("two"));
data.add(new NameWrapper("three"));
data.add(new NameWrapper("four"));
// add a nested list view; as the list is nested in the 
form, the form will
// update all FormComponent childs automatically.
ListView listView = new ListView("list", data)
{
protected void populateItem(ListItem item)
{
NameWrapper wrapper = 
(NameWrapper)item.getModelObject();
item.add(new Label("name", 
wrapper.getName()));
final RadioGroup radioGroup = new 
RadioGroup("radiogroup", new
PropertyModel(wrapper, "selected"));
item.add(radioGroup);
radioGroup.add(new Radio("check1", new 
Model(Boolean.TRUE), radioGroup));
radioGroup.add(new Radio("check2", new 
Model(Boolean.FALSE), radioGroup));
}
};
listView.setReuseItems(true);
add(listView);
}

public void onSubmit()
{
info("data: " + data); // print current contents
}
}

/**
 * name is the wrapped object that could be your business object.
 * the selected property is just here to record whether the checkbox for
 * it was selected.
 */
private class NameWrapper implements Serializable
{
private String name;
private Boolean selected = Boolean.FALSE;

public NameWrapper(String wrapped)
{
this.name = wrapped;
}

public Boolean getSelected()
{
return selected;
}

public void setSelected(Boolean selected)
{
this.selected = selected;
}

public String getName()
{
return name;
}

public void setName(String wrapped)
{
this.name = wrapped;
}

public String toString()
{
return name + ": " + selected;
}
}
}

.



On Thu, Sep 22, 2011 at 1:01 PM, wholalotta  wrote:
> It is getting weird. I got your point. You are right, it is more logical to
> give boolean true or false value.
> I tried your su

onSubmit - Button vs AjaxButton

2011-09-22 Thread Marcel Hoerr
hey guys,

i have a question regarding the onSubmit method in Button and AjaxButton. we 
use an ajaxtified WizardButton (AjaxFormSubmitBehaivor) which works fine for 
wicket 1.4, but in wicket 1.5 the onSubmit method of the underlying 
WizardButton is never been called.

any hint appreciated.
-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!   
Jetzt informieren: http://www.gmx.net/de/go/freephone

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



Re: creating a textarea with a radiobutton using Listview

2011-09-22 Thread wholalotta
It is getting weird. I got your point. You are right, it is more logical to
give boolean true or false value.
I tried your suggestion but this time I had four radiobutton and all of them
appeared as checked. How is it possible? And When I give Boolean.TRUE, this
time all of them are displayed as unchecked. Shouldnt be the vice versa?

And still I couldnt solve the problem. I want to be able to check only one
radio. Right now it doesnt work.
Radiobuttons are attached to the radigroup but creating one radiobutton in
each iteration seems needs a different approach?

adminRadioGroup.add(new Radio("radioCheck", new Model(Boolean.FALSE), 
adminRadioGroup));



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/creating-a-textarea-with-a-radiobutton-using-Listview-tp3829602p3833068.html
Sent from the Users forum 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: How to get request page in Wicket 1.5

2011-09-22 Thread Florian B.
Ah ok I see. I'll give it a try. Thanks!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-get-request-page-in-Wicket-1-5-tp3827411p3832806.html
Sent from the Users forum 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: Button component not enabled in FireFox

2011-09-22 Thread rebecca
hello,

This problem happens in chrome v13 too.
Does anyone has any idea how to solve this?

thanks
Rebecca

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Button-component-not-enabled-in-FireFox-tp3675168p3832783.html
Sent from the Users forum 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: Error detaching RequestCycle listener error

2011-09-22 Thread Martin A
Ready.. here it is:

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

Regards

On Thu, Sep 22, 2011 at 9:57 AM, Martin Grigorov wrote:

> I see how this can happen ...
>
> I guess org.apache.wicket.serialize.java.JavaSerializer.serialize(Object)
> returns null and logs an exception with message:
> Error serializing object " + object.getClass() + " [object=" + object + "]"
>
> please create a ticket
>
> On Wed, Sep 21, 2011 at 7:11 PM, Martin A  wrote:
> > Hello, guys,
> >
> > I encounter a strange error in my wicket logs. I don't have any idea what
> > the reason may be. Would you give some hints?
> > I have a simple WebApplication subclass with nothing special in it.
> >
> > Thank you!
> >
> > Here's the stacktrace
> >
> > 20-09-2011 16:46:44,875 ERROR
> >
> org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify:105
> > - Error detaching request cycle listener:
> > org.apache.wicket.Application$2@b45ad3d
> > java.lang.IllegalArgumentException: Argument 'data' may not be null.
> > at org.apache.wicket.util.lang.Args.notNull(Args.java:39)
> > at
> >
> org.apache.wicket.pageStore.AsynchronousDataStore$Entry.(AsynchronousDataStore.java:271)
> > at
> >
> org.apache.wicket.pageStore.AsynchronousDataStore.storeData(AsynchronousDataStore.java:215)
> > at
> >
> org.apache.wicket.pageStore.DefaultPageStore.storePageData(DefaultPageStore.java:115)
> > at
> >
> org.apache.wicket.pageStore.DefaultPageStore.storePage(DefaultPageStore.java:144)
> > at
> >
> org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.storeTouchedPages(PageStoreManager.java:377)
> > at
> >
> org.apache.wicket.page.RequestAdapter.commitRequest(RequestAdapter.java:171)
> > at
> >
> org.apache.wicket.page.AbstractPageManager.commitRequest(AbstractPageManager.java:94)
> > at
> >
> org.apache.wicket.page.PageManagerDecorator.commitRequest(PageManagerDecorator.java:68)
> > at
> >
> org.apache.wicket.page.PageAccessSynchronizer$2.commitRequest(PageAccessSynchronizer.java:213)
> > at org.apache.wicket.Application$2.onDetach(Application.java:1552)
> > at
> >
> org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:101)
> > at
> >
> org.apache.wicket.request.cycle.RequestCycleListenerCollection$3.notify(RequestCycleListenerCollection.java:97)
> > at
> >
> org.apache.wicket.util.listener.ListenerCollection.reversedNotify(ListenerCollection.java:121)
> > at
> >
> org.apache.wicket.util.listener.ListenerCollection.reversedNotify(ListenerCollection.java:112)
> > at
> >
> org.apache.wicket.request.cycle.RequestCycleListenerCollection.onDetach(RequestCycleListenerCollection.java:95)
> > at
> >
> org.apache.wicket.request.cycle.RequestCycle.onDetach(RequestCycle.java:542)
> > at
> >
> org.apache.wicket.request.cycle.RequestCycle.detach(RequestCycle.java:481)
> > at
> >
> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:257)
> > at
> >
> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:162)
> > at
> >
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:218)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> > at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> > at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
> > at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
> > at
> >
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> > at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151)
> > at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
> > at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
> > at
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
> > at
> >
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
> > at
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:269)
> > at
> >
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
> > at
> >
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> > at
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> > at java.lang.Thread.run(Thread.java:662)
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: creating a textarea with a radiobutton using Listview

2011-09-22 Thread manuelbarzi
> adminRadioGroup.add(new Radio("radioCheck", new Model(item.getIndex()+1)));

you are associating an integer model to "radioCheck", and providing
the item index to it:

instead, associate a boolean model to it, with its default value to
FALSE (or TRUE, depending on your business).

adminRadioGroup.add(new Radio("radioCheck", new Model(Boolean.FALSE),
adminRadioGroup));


On Wed, Sep 21, 2011 at 9:36 PM, wholalotta  wrote:
> Hi manuelbarzi,
>
> Thanks for the usefull websites I reviewed all of them and
> I tried the following. I created a radiogroup but still i can select all
> radiobuttons right now..I just want to be able to select one radiobutton and
> set the boolean attribute true in related NameWrapper object. And also right
> now still cant understand how can i set a boolean value with radio buttons?
> İt gives me the index value of the radiobutton when i submit the form...I am
> a little bir stuck and cannot go forward
>
>
>
> public class FormInput extends WebPage
> {
>        public FormInput()
>        {
>                final FeedbackPanel feedback = new FeedbackPanel("feedback");
>                add(feedback);
>                add(new InputForm("inputForm"));
>        }
>
>        private class InputForm extends Form
>        {
>                private List data;
>
>                public InputForm(String name)
>                {
>                        super(name);
>
>                        // add some dummy data
>                        data = new ArrayList();
>                        data.add(new NameWrapper());
>                        data.add(new NameWrapper());
>                        data.add(new NameWrapper());
>                        data.add(new NameWrapper());
>
>                        ListView listView = new ListView("list", data)
>                        {
>
>                                @Override
>                                protected void populateItem(ListItem item) {
>                                        NameWrapper wrapper = 
> (NameWrapper)item.getModelObject();
>                                        item.add(new TextArea("name", new 
> PropertyModel(wrapper, "name")));
>                                        final RadioGroup adminRadioGroup = new 
> RadioGroup("radiogroup", new
> PropertyModel(wrapper, "selected"));
>                                        item.add(adminRadioGroup);
>                                        adminRadioGroup.add(new 
> Radio("radioCheck", new
> Model(item.getIndex()+1)));
>                                }
>                        };
>            listView.setReuseItems(true);
>            add(listView);
>                }
>
>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/creating-a-textarea-with-a-radiobutton-using-Listview-tp3829602p3831177.html
> Sent from the Users forum 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
>
>