Re: Form Component Border - on Submit

2010-08-04 Thread cresc

Thanks it worked..
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Form-Component-Border-on-Submit-tp2310342p2314362.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Model object string manipulation

2010-08-04 Thread Iain Reddick
Thanks Igor - that's the approach that I would automatically take.

My question was really related to explaining to developers from an MVC 
background what the process is for getting data from "somewhere" to the view. 
Nested models as a data tranformation pipeline is the mental model I was going 
to use. I just need to fit "behaviours as component mutators" in there 
somewhere and I'll be set! 

- Original Message -
From: "Igor Vaynberg" 
To: users@wicket.apache.org
Sent: Wednesday, 4 August, 2010 9:29:34 PM
Subject: Re: Model object string manipulation

for reusable situations, or even one off, you can write a simple
decorator model

-igor

On Wed, Aug 4, 2010 at 1:27 PM, Iain Reddick
 wrote:
> To elaborate a bit - I'm talking about "one off" situations and also
> re-usable solutions, such as the aforementioned "to upper" and "to
> lower" cases.
>
> - Original Message -
> From: "Iain Reddick" 
> To: users@wicket.apache.org
> Sent: Wednesday, 4 August, 2010 9:19:46 PM
> Subject: Model object string manipulation
>
> What's the cleanest way of doing string manipulation with a component
> that uses a String as a model (e.g. a Label). I'm thinking of
> mutations such as to uppercase and to lowercase, etc.
>
> An obvious place is to do it in the model, but I'm interested to hear
> what other developer's approaches are. Is there a nicer way of doing
> this - via a behaviour for instance?
>
> -
> 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: Model object string manipulation

2010-08-04 Thread Igor Vaynberg
for reusable situations, or even one off, you can write a simple decorator model

-igor

On Wed, Aug 4, 2010 at 1:27 PM, Iain Reddick
 wrote:
> To elaborate a bit - I'm talking about "one off" situations and also 
> re-usable solutions, such as the aforementioned "to upper" and "to lower" 
> cases.
>
> - Original Message -
> From: "Iain Reddick" 
> To: users@wicket.apache.org
> Sent: Wednesday, 4 August, 2010 9:19:46 PM
> Subject: Model object string manipulation
>
> What's the cleanest way of doing string manipulation with a component
> that uses a String as a model (e.g. a Label). I'm thinking of mutations
> such as to uppercase and to lowercase, etc.
>
> An obvious place is to do it in the model, but I'm interested to hear
> what other developer's approaches are. Is there a nicer way of doing
> this - via a behaviour for instance?
>
> - 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: Model object string manipulation

2010-08-04 Thread Iain Reddick
To elaborate a bit - I'm talking about "one off" situations and also re-usable 
solutions, such as the aforementioned "to upper" and "to lower" cases.

- Original Message -
From: "Iain Reddick" 
To: users@wicket.apache.org
Sent: Wednesday, 4 August, 2010 9:19:46 PM
Subject: Model object string manipulation

What's the cleanest way of doing string manipulation with a component
that uses a String as a model (e.g. a Label). I'm thinking of mutations
such as to uppercase and to lowercase, etc.

An obvious place is to do it in the model, but I'm interested to hear
what other developer's approaches are. Is there a nicer way of doing
this - via a behaviour for instance?

- 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



Model object string manipulation

2010-08-04 Thread Iain Reddick
What's the cleanest way of doing string manipulation with a component that uses 
a String as a model (e.g. a Label). I'm thinking of mutations such as to 
uppercase and to lowercase, etc.

An obvious place is to do it in the model, but I'm interested to hear what 
other developer's approaches are. Is there a nicer way of doing this - via a 
behaviour for instance?

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



Re: Roles.clone

2010-08-04 Thread northar

Aha, so thats why they do the .clone.Thanks for the answer
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Roles-clone-tp2313319p2313988.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: Wicket adds jsessionid to redirect onto external page

2010-08-04 Thread Martin Makundi
Cool ;)

2010/8/4 Don Ferguson :
> Right, it's really a jetty bug, and looks like it was fixed recently:
>
> http://dev.eclipse.org/mhonarc/lists/jetty-commit/msg01598.html
>
>
> On Aug 4, 2010, at 10:46 AM, Igor Vaynberg wrote:
>
>> afair the servlet spec says all urls have to be passed through that
>> method and thats what we do. if its not working the problem is with
>> the servlet container.
>>
>> -igor
>>
>> On Wed, Aug 4, 2010 at 10:39 AM, Martin Makundi
>>  wrote:
>>> Like a sledgehammer ;)
>>>
>>> But yes, so it's a bug in wicket "framework design".
>>>
>>> **
>>> Martin
>>>
>>> 2010/8/4 Don Ferguson :
 Ah, much better than my approach.

 On Aug 4, 2010, at 8:25 AM, Martin Makundi wrote:

> Hi!
>
> I worked around like this:
>
>    ((org.mortbay.jetty.Request) ((WebRequest)
> RequestCycle.get().getRequest()).getHttpServletRequest()).setSessionManager(null);
>
>
> **
> Martin
>
> 2010/8/4 Don Ferguson :
>> Hi Martin,
>> Yes, I've encountered this.  I think it's a bug in WebResponse.  The 
>> culprit
>> is the line:
>> url = httpServletResponse.encodeRedirectURL(url);
>> The url should only be encoded when redirecting to the originating site, 
>> but
>> the code doesn't check.
>> One workaround (short of fixing the bug) is to duplicate the 
>> functionality
>> of WebResponse, commenting out the offending line.  Then use it as such:
>>      getRequestCycle().setResponse(new 
>> NonEncodingWebResponse((WebResponse)
>> getRequestCycle().getResponse()));
>>             getRequestCycle().setRequestTarget(new
>> RedirectRequestTarget(url));
>> The source code is attached.
>>
>>
>> -Don
>> On Aug 4, 2010, at 2:22 AM, Martin Makundi wrote:
>>
>> Hi!
>>
>> I am doing something wrong? I am using:
>>
>>        getResponse().redirect(getParameterFromRequest(RETURN_PAGE));
>>
>> But the URL contains jsessionid. I think this is wrong because the
>> target server does not understand the jsessiond and it returns 404
>> page not found.
>>
>> **
>> Martin
>>
>> -
>> 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 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: Wicket adds jsessionid to redirect onto external page

2010-08-04 Thread Don Ferguson
Right, it's really a jetty bug, and looks like it was fixed recently:

http://dev.eclipse.org/mhonarc/lists/jetty-commit/msg01598.html


On Aug 4, 2010, at 10:46 AM, Igor Vaynberg wrote:

> afair the servlet spec says all urls have to be passed through that
> method and thats what we do. if its not working the problem is with
> the servlet container.
> 
> -igor
> 
> On Wed, Aug 4, 2010 at 10:39 AM, Martin Makundi
>  wrote:
>> Like a sledgehammer ;)
>> 
>> But yes, so it's a bug in wicket "framework design".
>> 
>> **
>> Martin
>> 
>> 2010/8/4 Don Ferguson :
>>> Ah, much better than my approach.
>>> 
>>> On Aug 4, 2010, at 8:25 AM, Martin Makundi wrote:
>>> 
 Hi!
 
 I worked around like this:
 
((org.mortbay.jetty.Request) ((WebRequest)
 RequestCycle.get().getRequest()).getHttpServletRequest()).setSessionManager(null);
 
 
 **
 Martin
 
 2010/8/4 Don Ferguson :
> Hi Martin,
> Yes, I've encountered this.  I think it's a bug in WebResponse.  The 
> culprit
> is the line:
> url = httpServletResponse.encodeRedirectURL(url);
> The url should only be encoded when redirecting to the originating site, 
> but
> the code doesn't check.
> One workaround (short of fixing the bug) is to duplicate the functionality
> of WebResponse, commenting out the offending line.  Then use it as such:
>  getRequestCycle().setResponse(new 
> NonEncodingWebResponse((WebResponse)
> getRequestCycle().getResponse()));
> getRequestCycle().setRequestTarget(new
> RedirectRequestTarget(url));
> The source code is attached.
> 
> 
> -Don
> On Aug 4, 2010, at 2:22 AM, Martin Makundi wrote:
> 
> Hi!
> 
> I am doing something wrong? I am using:
> 
>getResponse().redirect(getParameterFromRequest(RETURN_PAGE));
> 
> But the URL contains jsessionid. I think this is wrong because the
> target server does not understand the jsessiond and it returns 404
> page not found.
> 
> **
> Martin
> 
> -
> 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 additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket adds jsessionid to redirect onto external page

2010-08-04 Thread Martin Makundi
Maybe we ned yet another overrideable encodeURLAccordingToServletSpec method.

**
Martin

2010/8/4 Igor Vaynberg :
> afair the servlet spec says all urls have to be passed through that
> method and thats what we do. if its not working the problem is with
> the servlet container.
>
> -igor
>
> On Wed, Aug 4, 2010 at 10:39 AM, Martin Makundi
>  wrote:
>> Like a sledgehammer ;)
>>
>> But yes, so it's a bug in wicket "framework design".
>>
>> **
>> Martin
>>
>> 2010/8/4 Don Ferguson :
>>> Ah, much better than my approach.
>>>
>>> On Aug 4, 2010, at 8:25 AM, Martin Makundi wrote:
>>>
 Hi!

 I worked around like this:

    ((org.mortbay.jetty.Request) ((WebRequest)
 RequestCycle.get().getRequest()).getHttpServletRequest()).setSessionManager(null);


 **
 Martin

 2010/8/4 Don Ferguson :
> Hi Martin,
> Yes, I've encountered this.  I think it's a bug in WebResponse.  The 
> culprit
> is the line:
> url = httpServletResponse.encodeRedirectURL(url);
> The url should only be encoded when redirecting to the originating site, 
> but
> the code doesn't check.
> One workaround (short of fixing the bug) is to duplicate the functionality
> of WebResponse, commenting out the offending line.  Then use it as such:
>      getRequestCycle().setResponse(new 
> NonEncodingWebResponse((WebResponse)
> getRequestCycle().getResponse()));
>             getRequestCycle().setRequestTarget(new
> RedirectRequestTarget(url));
> The source code is attached.
>
>
> -Don
> On Aug 4, 2010, at 2:22 AM, Martin Makundi wrote:
>
> Hi!
>
> I am doing something wrong? I am using:
>
>        getResponse().redirect(getParameterFromRequest(RETURN_PAGE));
>
> But the URL contains jsessionid. I think this is wrong because the
> target server does not understand the jsessiond and it returns 404
> page not found.
>
> **
> Martin
>
> -
> 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 additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket adds jsessionid to redirect onto external page

2010-08-04 Thread Igor Vaynberg
afair the servlet spec says all urls have to be passed through that
method and thats what we do. if its not working the problem is with
the servlet container.

-igor

On Wed, Aug 4, 2010 at 10:39 AM, Martin Makundi
 wrote:
> Like a sledgehammer ;)
>
> But yes, so it's a bug in wicket "framework design".
>
> **
> Martin
>
> 2010/8/4 Don Ferguson :
>> Ah, much better than my approach.
>>
>> On Aug 4, 2010, at 8:25 AM, Martin Makundi wrote:
>>
>>> Hi!
>>>
>>> I worked around like this:
>>>
>>>    ((org.mortbay.jetty.Request) ((WebRequest)
>>> RequestCycle.get().getRequest()).getHttpServletRequest()).setSessionManager(null);
>>>
>>>
>>> **
>>> Martin
>>>
>>> 2010/8/4 Don Ferguson :
 Hi Martin,
 Yes, I've encountered this.  I think it's a bug in WebResponse.  The 
 culprit
 is the line:
 url = httpServletResponse.encodeRedirectURL(url);
 The url should only be encoded when redirecting to the originating site, 
 but
 the code doesn't check.
 One workaround (short of fixing the bug) is to duplicate the functionality
 of WebResponse, commenting out the offending line.  Then use it as such:
      getRequestCycle().setResponse(new NonEncodingWebResponse((WebResponse)
 getRequestCycle().getResponse()));
             getRequestCycle().setRequestTarget(new
 RedirectRequestTarget(url));
 The source code is attached.


 -Don
 On Aug 4, 2010, at 2:22 AM, Martin Makundi wrote:

 Hi!

 I am doing something wrong? I am using:

        getResponse().redirect(getParameterFromRequest(RETURN_PAGE));

 But the URL contains jsessionid. I think this is wrong because the
 target server does not understand the jsessiond and it returns 404
 page not found.

 **
 Martin

 -
 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: Wicket adds jsessionid to redirect onto external page

2010-08-04 Thread Martin Makundi
Like a sledgehammer ;)

But yes, so it's a bug in wicket "framework design".

**
Martin

2010/8/4 Don Ferguson :
> Ah, much better than my approach.
>
> On Aug 4, 2010, at 8:25 AM, Martin Makundi wrote:
>
>> Hi!
>>
>> I worked around like this:
>>
>>    ((org.mortbay.jetty.Request) ((WebRequest)
>> RequestCycle.get().getRequest()).getHttpServletRequest()).setSessionManager(null);
>>
>>
>> **
>> Martin
>>
>> 2010/8/4 Don Ferguson :
>>> Hi Martin,
>>> Yes, I've encountered this.  I think it's a bug in WebResponse.  The culprit
>>> is the line:
>>> url = httpServletResponse.encodeRedirectURL(url);
>>> The url should only be encoded when redirecting to the originating site, but
>>> the code doesn't check.
>>> One workaround (short of fixing the bug) is to duplicate the functionality
>>> of WebResponse, commenting out the offending line.  Then use it as such:
>>>      getRequestCycle().setResponse(new NonEncodingWebResponse((WebResponse)
>>> getRequestCycle().getResponse()));
>>>             getRequestCycle().setRequestTarget(new
>>> RedirectRequestTarget(url));
>>> The source code is attached.
>>>
>>>
>>> -Don
>>> On Aug 4, 2010, at 2:22 AM, Martin Makundi wrote:
>>>
>>> Hi!
>>>
>>> I am doing something wrong? I am using:
>>>
>>>        getResponse().redirect(getParameterFromRequest(RETURN_PAGE));
>>>
>>> But the URL contains jsessionid. I think this is wrong because the
>>> target server does not understand the jsessiond and it returns 404
>>> page not found.
>>>
>>> **
>>> Martin
>>>
>>> -
>>> 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



Ajax - response

2010-08-04 Thread Gurpreet.Singh
Hi all,

I am getting strange kind of problem and need some expert advice to solve this 
problem.


Below response/code works perfectly fine in Firefox but in IE I am getting 
 element not found.


Log from Ajax wicket log window:

focus set on btnAddb0
INFO: Using ActiveX transport
INFO:
INFO: Initiating Ajax GET request on 
?x=a9RWGdNtTytEslA3x7Zt2Zf0RKnG6AQIhgKDxsCnv94CTuMAondxa2AasfbIWvyzgNqXPbm3hONkW767sk8h0S6bFDv2vPYw&random=0.9009792103973244
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (256 characters)
INFO:

ERROR: Wicket.Ajax.Call.failure: Error while parsing response: Could not find 
root  element
INFO: Invoking post-call handler(s)...
INFO: Invoking failure handler(s)...


Please help me out with this.
Thanks in advance
Preet



Re: How to send a Java object to the ModalWindow

2010-08-04 Thread zoran

Thanks Martin,

>modalwindowcontent.setpropervalue(xx); 
That's what I have tried first, but for some reason it didn't worked than so
I started to work on some other more complex solution. 
Now I turned again to this simple idea and it works.

Zoran
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-send-a-Java-object-to-the-ModalWindow-tp2312589p2313867.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Re: .properties in conjunction with ListView

2010-08-04 Thread Igor Vaynberg
are those validator messages?

-igor

On Wed, Aug 4, 2010 at 2:25 AM, Michael Strecker
 wrote:
> Hello list,
>
> I'm currently working on a page which contains a ListView of several
> items from a database. Naturally, the hierarchy of the DOM is
> form.1.item, form.2.item, and so on. I'd also like to use .properties,
> so I can use il8n and have customized messages.
>
> The question is, how can I make use of a .properties file for this page
> without having to manually put in each element (e.g.
> "form.1.item=${input} is not valid", "form.2.item=${input} is not
> valid")? Depending on the length of the list, this would be an insane
> amount of properties. Up to now, I tried * as a wildcard, but no success.
>
> Thanks in advance!
>
> Best regards,
> Michael
>
> -
> 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: FormComponentPanel and list edit

2010-08-04 Thread Igor Vaynberg
On Wed, Aug 4, 2010 at 1:00 AM, Joseph Pachod  wrote:
> Igor Vaynberg wrote:
>>
>> why not? convertinput() will cascade down to all components that need
>> them.
>>
>> -igor
>>
>
> I feel like the issue is not with the components in the list item, but with
> the wrapper around the list item.
>
> For example (pseudo code):
> public class ContactListEdit extends FormComponentPanel>{
>
> (...)
> private ListEditor contactListEdit ;
>
> onBeforeRender(){
>  if(!hasBeenRendered()){
>   contactListEdit = new ListEditor("id",listModel){
>     void onPopulateItem(item){
>        item.add(new TextField("firstname", new
> PropertyModel(item.getModel(), "firstname");
>        item.add(new TextField("lastname", new PropertyModel(item.getModel(),
> "lastname");
>     }
>   }
>   add(contactListEdit);
>  }
> }
>  (..)
>
> List convertedInput ;
>
> public void convertInput(){
>  List list= new ArrayList()
>  // how to compose the list ?
listeditor.convertinput();
   setConvertedInput(listeditor.getconvertedinput());

-igor
> }
> }
>
> The issue is then in convertInput, how to compose the list of contacts ?
>
> thanks again for your help
> ++
> joseph
>
> -
> 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: Wicket adds jsessionid to redirect onto external page

2010-08-04 Thread Don Ferguson
Ah, much better than my approach. 

On Aug 4, 2010, at 8:25 AM, Martin Makundi wrote:

> Hi!
> 
> I worked around like this:
> 
>((org.mortbay.jetty.Request) ((WebRequest)
> RequestCycle.get().getRequest()).getHttpServletRequest()).setSessionManager(null);
> 
> 
> **
> Martin
> 
> 2010/8/4 Don Ferguson :
>> Hi Martin,
>> Yes, I've encountered this.  I think it's a bug in WebResponse.  The culprit
>> is the line:
>> url = httpServletResponse.encodeRedirectURL(url);
>> The url should only be encoded when redirecting to the originating site, but
>> the code doesn't check.
>> One workaround (short of fixing the bug) is to duplicate the functionality
>> of WebResponse, commenting out the offending line.  Then use it as such:
>>  getRequestCycle().setResponse(new NonEncodingWebResponse((WebResponse)
>> getRequestCycle().getResponse()));
>> getRequestCycle().setRequestTarget(new
>> RedirectRequestTarget(url));
>> The source code is attached.
>> 
>> 
>> -Don
>> On Aug 4, 2010, at 2:22 AM, Martin Makundi wrote:
>> 
>> Hi!
>> 
>> I am doing something wrong? I am using:
>> 
>>getResponse().redirect(getParameterFromRequest(RETURN_PAGE));
>> 
>> But the URL contains jsessionid. I think this is wrong because the
>> target server does not understand the jsessiond and it returns 404
>> page not found.
>> 
>> **
>> Martin
>> 
>> -
>> 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: Wicket adds jsessionid to redirect onto external page

2010-08-04 Thread Martin Makundi
Hi!

I worked around like this:

((org.mortbay.jetty.Request) ((WebRequest)
RequestCycle.get().getRequest()).getHttpServletRequest()).setSessionManager(null);


**
Martin

2010/8/4 Don Ferguson :
> Hi Martin,
> Yes, I've encountered this.  I think it's a bug in WebResponse.  The culprit
> is the line:
> url = httpServletResponse.encodeRedirectURL(url);
> The url should only be encoded when redirecting to the originating site, but
> the code doesn't check.
> One workaround (short of fixing the bug) is to duplicate the functionality
> of WebResponse, commenting out the offending line.  Then use it as such:
>      getRequestCycle().setResponse(new NonEncodingWebResponse((WebResponse)
> getRequestCycle().getResponse()));
>             getRequestCycle().setRequestTarget(new
> RedirectRequestTarget(url));
> The source code is attached.
>
>
> -Don
> On Aug 4, 2010, at 2:22 AM, Martin Makundi wrote:
>
> Hi!
>
> I am doing something wrong? I am using:
>
>    getResponse().redirect(getParameterFromRequest(RETURN_PAGE));
>
> But the URL contains jsessionid. I think this is wrong because the
> target server does not understand the jsessiond and it returns 404
> page not found.
>
> **
> Martin
>
> -
> 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



wicket super-components

2010-08-04 Thread Alex Rass
Hi.

Are there any resources on finding "larger" components?

Wicket is SUCH a fantastic architecture for plugin functionality, I am
wondering if there is a place to find components like "IMAP Email Access"
Components.  Or an "FTP Client" component etc.

Or would that be Wicket-Stuff? (and if it's not there it's not anywhere?)
http://wicketstuff.org/confluence/display/STUFFWIKI/Wiki

Anyone knows of anything like that?
Yes, I tried google.
Even if it's a list of companies selling their components (a resource is a
resource).

- Alex.


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



Re: Wicket adds jsessionid to redirect onto external page

2010-08-04 Thread Don Ferguson
Hi Martin,Yes, I've encountered this.  I think it's a bug in WebResponse.  The culprit is the line:	url = httpServletResponse.encodeRedirectURL(url);The url should only be encoded when redirecting to the originating site, but the code doesn't check.One workaround (short of fixing the bug) is to duplicate the functionality of WebResponse, commenting out the offending line.  Then use it as such:    		getRequestCycle().setResponse(new NonEncodingWebResponse((WebResponse) getRequestCycle().getResponse()));            	getRequestCycle().setRequestTarget(new RedirectRequestTarget(url));The source code is attached.

NonEncodingWebResponse.java
Description: Binary data
	-DonOn Aug 4, 2010, at 2:22 AM, Martin Makundi wrote:Hi!I am doing something wrong? I am using:    getResponse().redirect(getParameterFromRequest(RETURN_PAGE));But the URL contains jsessionid. I think this is wrong because thetarget server does not understand the jsessiond and it returns 404page not found.**Martin-To unsubscribe, e-mail: users-unsubscr...@wicket.apache.orgFor additional commands, e-mail: users-h...@wicket.apache.org

Re: Welcome Martin Grigorov as a core team member

2010-08-04 Thread Istvan Jozsa
Congrats Martin !


Re: wiQuery grid row expander

2010-08-04 Thread John Armstrong
Sounds good. I am building small plugins right now so I'll go through
the plugins project.

Just joined the group.
Tx!
John-

On Wed, Aug 4, 2010 at 12:23 AM, Ernesto Reinaldo Barreiro
 wrote:
> Hi John,
>
> Thanks for your interest in contributing!
>
> Regrading your question. It all depends on if it is a "small" plugin
> or a "big" one. For "smaller" plugins I'm just placing them on [1]. If
> the plugin is "big" them maybe it would be better to create a new
> sub-project under wiquery-plugins. What is this plugin about?
>
> In any case I would go and create a patch and attach it to a new issue
> on [2]. It would be nice if the code comes with at least an example so
> that we can deploy it to the demo application. Then I'll will look on
> how to integrate this into the project. Latter on we can discuss
> granting you commit access if you want...
>
> By the way, I have created a google group (see [3])... Shall we  move
> further discussions into that context? So that we don't pollute this
> list with things that might not be of interest to other wicket users.
>
> Cheers,
>
> Ernesto
>
> References.
>
> 1-http://code.google.com/p/wiquery-plugins/source/browse/#svn/trunk/wiquery-plugins/other-plugins
> 2-http://code.google.com/p/wiquery-plugins/issues/list
> 3-http://groups.google.com/group/wiquery-plugins
>
>
> On Wed, Aug 4, 2010 at 6:36 AM, John Armstrong  wrote:
>> Hi Ernesto,
>>  I am very interested in contributing and completed my first plugin
>> this evening. Let me know how I can push this back into the distro or
>> if I should host in a separate space etc.
>>
>> Tx!
>> John-
>>
>> On Wed, Jun 30, 2010 at 2:12 PM, Ernesto Reinaldo Barreiro
>>  wrote:
>>> John,
>>>
>>> I just uploaded an small demo of [1] to [2]. Please ping me offline if
>>> you want to contribute to the project.
>>>
>>> Best,
>>>
>>> Ernesto
>>>
>>> 1-http://code.google.com/p/wiquery-plugins/source/browse/#svn/trunk/wiquery-plugins/j
>>> 2-http://wiquery-plugins-demo.appspot.com/demo/
>>>
>>> On Wed, Jun 30, 2010 at 4:56 PM, John Armstrong  
>>> wrote:
 Ahh missed that.

 Tx Ernesto, I will take a look at jq and see if I can help!

 J

 On Tue, Jun 29, 2010 at 10:57 PM, Ernesto Reinaldo Barreiro
  wrote:
> John,
>
> See [1] and in particular the answer from Cemal (the one on Jun 16...)
> That might answer part of your question.
>
> Some time ago I have started [2], the implementation there is not that
> complete yet but at least it could give you a starting point. And, of
> course, patches and contributions are always welcome!
>
> Best,
>
> Ernesto
>
> 1-http://apache-wicket.1842946.n4.nabble.com/wiQuery-components-with-server-side-state-live-demo-tc1842975.html#none
> 2-http://code.google.com/p/wiquery-plugins/source/browse/#svn/trunk/wiquery-plugins/jqgrid
>
> On Wed, Jun 30, 2010 at 6:34 AM, John Armstrong  
> wrote:
>> Back in march there was a thread titled "wiQuery components with
>> server side state - live demo"
>>
>> On that thread Richard Poway and I corresponded about a Grid Row 
>> Expander.
>>
>> I never saw the reply but in a recent google for this I can across a
>> link he posted in that thread
>>
>> http://labs.jweekend.com/public/grid/GridRowExpanderPage
>>
>> This link is now password protected.
>>
>> Richard/anyone from jweekend : Does this link still exit?
>>
>> Tx!
>> John-
>>
>> -
>> 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 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.a

RE: Form model update with ajax using AutoCompleteTextField

2010-08-04 Thread armandoxxx

Hey 

I use this auto-complete field as a searcher to fill my list view 
I used the same class but I have a little problem with it ... I don't
understand where to call method findChoice() so I added behavior to this
search field like this:

this.autocompleteSearchField.add(
new AjaxFormComponentUpdatingBehavior("onchange") {

private static final long   
serialVersionUID= 1L;

@Override
protected void onUpdate(AjaxRequestTarget 
theTarget) {

Object obj  = 
autocompleteSearchField.findChoice();
if(obj == null) {
LOG.warn("Object is null!");
}
if( !(obj instanceof Bean) ){
LOG.warn("Object is not 
subclass of a Bean! [{}]", obj.getClass());
return;
}
T bean = (T)obj;
if(selections.contains(bean)) return;

selections.add(bean);
theTarget.addComponent(listWrapper);
}

}   
);


legend: 
- Bean is my data object
- listWrapper is a wrapper that ListView in wrapped in 

mind this row:

Object obj  = autocompleteSearchField.findChoice();


how do you do it ? 

Kind regards

Armando
-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Form-model-update-with-ajax-using-AutoCompleteTextField-tp1872823p2313453.html
Sent from the Wicket - User mailing list archive at Nabble.com.

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



Localization

2010-08-04 Thread Laurentiu Trica
Hello,

I followed the
https://cwiki.apache.org/confluence/display/WICKET/Wicket+and+localized+URLstutorial.
I have a problem with an url like this: www.example.com/a?t=token

When I access that link, the url becomes: www.example.com/en/a and the link
is not accessible.

If I force the URL to www.example.com/en/a?t=token I get a Jetty error:

HTTP ERROR 404

Problem accessing /en/a. Reason:

NOT_FOUND

--
*Powered by Jetty://*

Can anybody help?
Thank you!

-- 
Laurentiu Trica


Re: Roles.clone

2010-08-04 Thread Peter Ertl
getRoles() is considered to access the roles read-only so the caller only gets 
a non-critical copy of the internal roles collection.

Am 04.08.2010 um 13:39 schrieb Josef:

> Hello.
> Quite new to the wicket world, and reading through code on some
> projects. So , excuse me for some beginners question farther on.
> 
> One thing i can't find is why would anyone do a clone like:
> 
>   @Override
>   public Roles getRoles() {
>   return (Roles) roles.clone();
>   }
> 
> when writing your own Session (extends AuthenticatedWebSession )
> Why is that?
> 
> Regards
> JA
> 
> -
> 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



Roles.clone

2010-08-04 Thread Josef
Hello.
Quite new to the wicket world, and reading through code on some
projects. So , excuse me for some beginners question farther on.

One thing i can't find is why would anyone do a clone like:

@Override
public Roles getRoles() {
return (Roles) roles.clone();
}

when writing your own Session (extends AuthenticatedWebSession )
Why is that?

Regards
JA

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



.properties in conjunction with ListView

2010-08-04 Thread Michael Strecker
Hello list,

I'm currently working on a page which contains a ListView of several
items from a database. Naturally, the hierarchy of the DOM is
form.1.item, form.2.item, and so on. I'd also like to use .properties,
so I can use il8n and have customized messages.

The question is, how can I make use of a .properties file for this page
without having to manually put in each element (e.g.
"form.1.item=${input} is not valid", "form.2.item=${input} is not
valid")? Depending on the length of the list, this would be an insane
amount of properties. Up to now, I tried * as a wildcard, but no success.

Thanks in advance!

Best regards,
Michael

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



Re: Model Is Not being Refreshed

2010-08-04 Thread Nivedan Nadaraj
Hi,

Re-attached the file as a .txt file. My apologies. I will read up again on
the link for Models and re-visit it. .

Thanks for the time
Niv


On Wed, Aug 4, 2010 at 5:43 PM, Nivedan Nadaraj wrote:

> Hi
>
> I did read the link and from which i went about modifying the Model. I have
> limited usage of generics in the code. Would be great to utilise it the way
> it is supposed to be.
> I am using 1.4.x version of wicket.
>
> Did u want me to send you the code to your email id if the attachment are
> not good?
>
> Thanks
> Niv
>
>
> On Wed, Aug 4, 2010 at 5:21 PM, avrahamr  wrote:
>
>>
>> I think attachments are not good in the list, so we didn't get your code.
>>
>> I'm not following the way you are mixing Model with the Object and I
>> recommend reading:
>> https://cwiki.apache.org/WICKET/working-with-wicket-models.html
>>
>> The StudyModel should be something like this:
>> public class StudyModel implements IModel {
>>
>> private Study study;
>>  public Object getObject() {
>> return study;
>>  }
>>
>> public void setObject(Object object) {
>> this.study =  (Study)study;
>>  }
>>   ...
>>
>> But if that's the case, I don't see a reason not to use the concrete Model
>> class: new Model(study)
>>
>> Also, I see from your examples you are using Wicket 1.3.x, is that right?
>>
>> With Wicket 1.4.x and generics it all becomes much more clear.
>>
>> On Wed, Aug 4, 2010 at 11:38 AM, nivs [via Apache Wicket] <
>> ml-node+2313107-368287748-293...@n4.nabble.com
>> 
>> >
>> > wrote:
>>
>> > After a long battle..i have progressed an inch forward!
>> >
>> > The StudyModel that implements IModel seemed to have the problem.
>> > I did not set the object in setObject...after modifying it in the
>> following
>> >
>> > way..the Refresh button works.
>> >
>> >
>> > public Object getObject() {
>> > return this;
>> > }
>> >
>> > public void setObject(Object object) {
>> > StudyModel model = (StudyModel)object;
>> > this.studyVO = model.getStudyVO();
>> >
>> > }
>> >
>> > But I am not there as yet...now when I lookup and then click on an item
>> > from
>> > the list, the form again is empty..meaning the model is not being
>> updated.
>> >
>> > So basically.
>> > 1.Search  Panel - Search items
>> > 2.SearchResults - onClick
>> > 3.Details- displayed correctly..., now I click cancel, tht hides the
>> > details
>> > panel
>> > 4. I click on New/Refresh button on Search Panel
>> > 5. A new details page is loaded - the effect of modifying setObject() in
>> > the
>> > Model
>> > 6.I click on cancel on details panel
>> > 7. And perform steps 1 to 2
>> > 8. An empty details panel is displayed...
>> >
>> > If i can get a single thread of clue..will fix this and cement it 
>> > Obviously I dont have a grip over Models..
>> >
>> > Cheers
>> > niv
>> >
>> >
>> >
>> >
>> > On Wed, Aug 4, 2010 at 11:12 AM, Nivedan Nadaraj <[hidden email]<
>> http://user/SendEmail.jtp?type=node&node=2313107&i=0>>wrote:
>> >
>> >
>> > > Hi
>> > >
>> > >
>> > > After I added setOutputMarkupPlaceHolderTag(true) to the details
>> panel,
>> > the
>> > > Ajax function works and I can see the details panel. (Which I could
>> not
>> > > earlier)
>> > > However, the problem still remains as in the model has not been
>> updated
>> > and
>> > > still refers to the stale/old one.
>> > >
>> > > @avrahmr
>> > > I used the setModel but I get a wicket runtime exception.
>> > >
>> > > Thanks for your thoughts.
>> > > Niv
>> > >
>> > >
>> > > On Wed, Aug 4, 2010 at 10:25 AM, Nivedan Nadaraj <[hidden email]<
>> http://user/SendEmail.jtp?type=node&node=2313107&i=1>>wrote:
>> >
>> > >
>> > >> Hi,
>> > >>
>> > >> I have attached the code as a text file. I have removed lines that
>> don't
>> >
>> > >> really make any contribution to the problem at hand after carefully
>> > >> examining it.
>> > >>
>> > >> Appreciate your time if you could see any issues please let me know.
>> > >>
>> > >> Basically the code has the Form objects I used, and the different
>> panels
>> >
>> > >> involved with it.
>> > >>
>> > >> Many thanks
>> > >> Niv
>> > >>
>> > >>
>> > >> On Tue, Aug 3, 2010 at 10:30 PM, Nivedan Nadaraj <[hidden email]<
>> http://user/SendEmail.jtp?type=node&node=2313107&i=2>>wrote:
>> >
>> > >>
>> > >>> Avraham and Matt,
>> > >>>
>> > >>> Thanks for the points. I will have a look at it tomorrow and post
>> the
>> > >>> code if I still haven't resolved. I don't have the code on me at the
>> > moment.
>> > >>> Reg
>> > >>> Niv
>> > >>>
>> > >>>
>> > >>>
>> > >>>
>> > >>> On Tue, Aug 3, 2010 at 9:41 PM, mwilber <[hidden email]<
>> http://user/SendEmail.jtp?type=node&node=2313107&i=3>>
>> > wrote:
>> > >>>
>> > 
>> >  Again without seeing more of the code some of this is guessing.
>> > 
>> >  If the component that you are trying to "update" is not part of the
>> >  original
>> >  HTML it will not be updated in the ajax response. I see that you
>> are
>> >  marking
>> >  the component as visible and en

Re: Model Is Not being Refreshed

2010-08-04 Thread Nivedan Nadaraj
Hi

I did read the link and from which i went about modifying the Model. I have
limited usage of generics in the code. Would be great to utilise it the way
it is supposed to be.
I am using 1.4.x version of wicket.

Did u want me to send you the code to your email id if the attachment are
not good?

Thanks
Niv

On Wed, Aug 4, 2010 at 5:21 PM, avrahamr  wrote:

>
> I think attachments are not good in the list, so we didn't get your code.
>
> I'm not following the way you are mixing Model with the Object and I
> recommend reading:
> https://cwiki.apache.org/WICKET/working-with-wicket-models.html
>
> The StudyModel should be something like this:
> public class StudyModel implements IModel {
>
> private Study study;
>  public Object getObject() {
> return study;
>  }
>
> public void setObject(Object object) {
> this.study =  (Study)study;
>  }
>   ...
>
> But if that's the case, I don't see a reason not to use the concrete Model
> class: new Model(study)
>
> Also, I see from your examples you are using Wicket 1.3.x, is that right?
>
> With Wicket 1.4.x and generics it all becomes much more clear.
>
> On Wed, Aug 4, 2010 at 11:38 AM, nivs [via Apache Wicket] <
> ml-node+2313107-368287748-293...@n4.nabble.com
> 
> >
> > wrote:
>
> > After a long battle..i have progressed an inch forward!
> >
> > The StudyModel that implements IModel seemed to have the problem.
> > I did not set the object in setObject...after modifying it in the
> following
> >
> > way..the Refresh button works.
> >
> >
> > public Object getObject() {
> > return this;
> > }
> >
> > public void setObject(Object object) {
> > StudyModel model = (StudyModel)object;
> > this.studyVO = model.getStudyVO();
> >
> > }
> >
> > But I am not there as yet...now when I lookup and then click on an item
> > from
> > the list, the form again is empty..meaning the model is not being
> updated.
> >
> > So basically.
> > 1.Search  Panel - Search items
> > 2.SearchResults - onClick
> > 3.Details- displayed correctly..., now I click cancel, tht hides the
> > details
> > panel
> > 4. I click on New/Refresh button on Search Panel
> > 5. A new details page is loaded - the effect of modifying setObject() in
> > the
> > Model
> > 6.I click on cancel on details panel
> > 7. And perform steps 1 to 2
> > 8. An empty details panel is displayed...
> >
> > If i can get a single thread of clue..will fix this and cement it 
> > Obviously I dont have a grip over Models..
> >
> > Cheers
> > niv
> >
> >
> >
> >
> > On Wed, Aug 4, 2010 at 11:12 AM, Nivedan Nadaraj <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=2313107&i=0>>wrote:
> >
> >
> > > Hi
> > >
> > >
> > > After I added setOutputMarkupPlaceHolderTag(true) to the details panel,
> > the
> > > Ajax function works and I can see the details panel. (Which I could not
> > > earlier)
> > > However, the problem still remains as in the model has not been updated
> > and
> > > still refers to the stale/old one.
> > >
> > > @avrahmr
> > > I used the setModel but I get a wicket runtime exception.
> > >
> > > Thanks for your thoughts.
> > > Niv
> > >
> > >
> > > On Wed, Aug 4, 2010 at 10:25 AM, Nivedan Nadaraj <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=2313107&i=1>>wrote:
> >
> > >
> > >> Hi,
> > >>
> > >> I have attached the code as a text file. I have removed lines that
> don't
> >
> > >> really make any contribution to the problem at hand after carefully
> > >> examining it.
> > >>
> > >> Appreciate your time if you could see any issues please let me know.
> > >>
> > >> Basically the code has the Form objects I used, and the different
> panels
> >
> > >> involved with it.
> > >>
> > >> Many thanks
> > >> Niv
> > >>
> > >>
> > >> On Tue, Aug 3, 2010 at 10:30 PM, Nivedan Nadaraj <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=2313107&i=2>>wrote:
> >
> > >>
> > >>> Avraham and Matt,
> > >>>
> > >>> Thanks for the points. I will have a look at it tomorrow and post the
> > >>> code if I still haven't resolved. I don't have the code on me at the
> > moment.
> > >>> Reg
> > >>> Niv
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> On Tue, Aug 3, 2010 at 9:41 PM, mwilber <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=2313107&i=3>>
> > wrote:
> > >>>
> > 
> >  Again without seeing more of the code some of this is guessing.
> > 
> >  If the component that you are trying to "update" is not part of the
> >  original
> >  HTML it will not be updated in the ajax response. I see that you are
> >  marking
> >  the component as visible and enabled. If it isn't visible during the
> >  initial
> >  rendering then it won't be placed in the HTML. If you mark the
> > component
> >  with
> > 
> > 
> >
> http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag(boolean

.properties in conjunction with ListView

2010-08-04 Thread Michael Strecker
Hello list,

I'm currently working on a page which contains a ListView of several
items from a database. Naturally, the hierarchy of the DOM is
form.1.item, form.2.item, and so on. I'd also like to use .properties,
so I can use il8n and have customized messages.

The question is, how can I make use of a .properties file for this page
without having to manually put in each element (e.g.
"form.1.item=${input} is not valid", "form.2.item=${input} is not
valid")? Depending on the length of the list, this would be an insane
amount of properties. Up to now, I tried * as a wildcard, but no success.

Thanks in advance!

Best regards,
Michael

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



Wicket adds jsessionid to redirect onto external page

2010-08-04 Thread Martin Makundi
Hi!

I am doing something wrong? I am using:

getResponse().redirect(getParameterFromRequest(RETURN_PAGE));

But the URL contains jsessionid. I think this is wrong because the
target server does not understand the jsessiond and it returns 404
page not found.

**
Martin

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



Re: Model Is Not being Refreshed

2010-08-04 Thread avrahamr

I think attachments are not good in the list, so we didn't get your code.

I'm not following the way you are mixing Model with the Object and I
recommend reading:
https://cwiki.apache.org/WICKET/working-with-wicket-models.html

The StudyModel should be something like this:
public class StudyModel implements IModel {

private Study study;
 public Object getObject() {
return study;
 }

public void setObject(Object object) {
this.study =  (Study)study;
 }
   ...

But if that's the case, I don't see a reason not to use the concrete Model
class: new Model(study)

Also, I see from your examples you are using Wicket 1.3.x, is that right?

With Wicket 1.4.x and generics it all becomes much more clear.

On Wed, Aug 4, 2010 at 11:38 AM, nivs [via Apache Wicket] <
ml-node+2313107-368287748-293...@n4.nabble.com
> wrote:

> After a long battle..i have progressed an inch forward!
>
> The StudyModel that implements IModel seemed to have the problem.
> I did not set the object in setObject...after modifying it in the following
>
> way..the Refresh button works.
>
>
> public Object getObject() {
> return this;
> }
>
> public void setObject(Object object) {
> StudyModel model = (StudyModel)object;
> this.studyVO = model.getStudyVO();
>
> }
>
> But I am not there as yet...now when I lookup and then click on an item
> from
> the list, the form again is empty..meaning the model is not being updated.
>
> So basically.
> 1.Search  Panel - Search items
> 2.SearchResults - onClick
> 3.Details- displayed correctly..., now I click cancel, tht hides the
> details
> panel
> 4. I click on New/Refresh button on Search Panel
> 5. A new details page is loaded - the effect of modifying setObject() in
> the
> Model
> 6.I click on cancel on details panel
> 7. And perform steps 1 to 2
> 8. An empty details panel is displayed...
>
> If i can get a single thread of clue..will fix this and cement it 
> Obviously I dont have a grip over Models..
>
> Cheers
> niv
>
>
>
>
> On Wed, Aug 4, 2010 at 11:12 AM, Nivedan Nadaraj <[hidden 
> email]>wrote:
>
>
> > Hi
> >
> >
> > After I added setOutputMarkupPlaceHolderTag(true) to the details panel,
> the
> > Ajax function works and I can see the details panel. (Which I could not
> > earlier)
> > However, the problem still remains as in the model has not been updated
> and
> > still refers to the stale/old one.
> >
> > @avrahmr
> > I used the setModel but I get a wicket runtime exception.
> >
> > Thanks for your thoughts.
> > Niv
> >
> >
> > On Wed, Aug 4, 2010 at 10:25 AM, Nivedan Nadaraj <[hidden 
> > email]>wrote:
>
> >
> >> Hi,
> >>
> >> I have attached the code as a text file. I have removed lines that don't
>
> >> really make any contribution to the problem at hand after carefully
> >> examining it.
> >>
> >> Appreciate your time if you could see any issues please let me know.
> >>
> >> Basically the code has the Form objects I used, and the different panels
>
> >> involved with it.
> >>
> >> Many thanks
> >> Niv
> >>
> >>
> >> On Tue, Aug 3, 2010 at 10:30 PM, Nivedan Nadaraj <[hidden 
> >> email]>wrote:
>
> >>
> >>> Avraham and Matt,
> >>>
> >>> Thanks for the points. I will have a look at it tomorrow and post the
> >>> code if I still haven't resolved. I don't have the code on me at the
> moment.
> >>> Reg
> >>> Niv
> >>>
> >>>
> >>>
> >>>
> >>> On Tue, Aug 3, 2010 at 9:41 PM, mwilber <[hidden 
> >>> email]>
> wrote:
> >>>
> 
>  Again without seeing more of the code some of this is guessing.
> 
>  If the component that you are trying to "update" is not part of the
>  original
>  HTML it will not be updated in the ajax response. I see that you are
>  marking
>  the component as visible and enabled. If it isn't visible during the
>  initial
>  rendering then it won't be placed in the HTML. If you mark the
> component
>  with
> 
> 
> http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag(boolean
> )<
> http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag%28boolean%29>
>
>  setOutputMarkupPlaceholderTag(true)  then the invisible component will
>
>  have
>  a placeholder to be updated during the ajax response.
>  --
>  View this message in context:
> 
> http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
> 
>  -
>  To unsubscribe, e-mail: [hidden 
>  email]

Re: Model Is Not being Refreshed

2010-08-04 Thread Nivedan Nadaraj
After a long battle..i have progressed an inch forward!

The StudyModel that implements IModel seemed to have the problem.
I did not set the object in setObject...after modifying it in the following
way..the Refresh button works.


public Object getObject() {
return this;
}

public void setObject(Object object) {
StudyModel model = (StudyModel)object;
this.studyVO = model.getStudyVO();

}

But I am not there as yet...now when I lookup and then click on an item from
the list, the form again is empty..meaning the model is not being updated.

So basically.
1.Search  Panel - Search items
2.SearchResults - onClick
3.Details- displayed correctly..., now I click cancel, tht hides the details
panel
4. I click on New/Refresh button on Search Panel
5. A new details page is loaded - the effect of modifying setObject() in the
Model
6.I click on cancel on details panel
7. And perform steps 1 to 2
8. An empty details panel is displayed...

If i can get a single thread of clue..will fix this and cement it 
Obviously I dont have a grip over Models..

Cheers
niv




On Wed, Aug 4, 2010 at 11:12 AM, Nivedan Nadaraj wrote:

> Hi
>
>
> After I added setOutputMarkupPlaceHolderTag(true) to the details panel, the
> Ajax function works and I can see the details panel. (Which I could not
> earlier)
> However, the problem still remains as in the model has not been updated and
> still refers to the stale/old one.
>
> @avrahmr
> I used the setModel but I get a wicket runtime exception.
>
> Thanks for your thoughts.
> Niv
>
>
> On Wed, Aug 4, 2010 at 10:25 AM, Nivedan Nadaraj wrote:
>
>> Hi,
>>
>> I have attached the code as a text file. I have removed lines that don't
>> really make any contribution to the problem at hand after carefully
>> examining it.
>>
>> Appreciate your time if you could see any issues please let me know.
>>
>> Basically the code has the Form objects I used, and the different panels
>> involved with it.
>>
>> Many thanks
>> Niv
>>
>>
>> On Tue, Aug 3, 2010 at 10:30 PM, Nivedan Nadaraj 
>> wrote:
>>
>>> Avraham and Matt,
>>>
>>> Thanks for the points. I will have a look at it tomorrow and post the
>>> code if I still haven't resolved. I don't have the code on me at the moment.
>>> Reg
>>> Niv
>>>
>>>
>>>
>>>
>>> On Tue, Aug 3, 2010 at 9:41 PM, mwilber  wrote:
>>>

 Again without seeing more of the code some of this is guessing.

 If the component that you are trying to "update" is not part of the
 original
 HTML it will not be updated in the ajax response. I see that you are
 marking
 the component as visible and enabled. If it isn't visible during the
 initial
 rendering then it won't be placed in the HTML. If you mark the component
 with

 http://wicket.apache.org/apidocs/1.4/org/apache/wicket/Component.html#setOutputMarkupPlaceholderTag(boolean)
 setOutputMarkupPlaceholderTag(true)  then the invisible component will
 have
 a placeholder to be updated during the ajax response.
 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/Model-Is-Not-being-Refreshed-tp2311457p2311876.html
 Sent from the Wicket - User mailing list archive at Nabble.com.

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


>>>
>>
>


Re: FormComponentPanel and list edit

2010-08-04 Thread Joseph Pachod

Igor Vaynberg wrote:

why not? convertinput() will cascade down to all components that need them.

-igor
  
I feel like the issue is not with the components in the list item, but 
with the wrapper around the list item.


For example (pseudo code):
public class ContactListEdit extends FormComponentPanel>{

(...)
private ListEditor contactListEdit ;

onBeforeRender(){
 if(!hasBeenRendered()){
   contactListEdit = new ListEditor("id",listModel){
 void onPopulateItem(item){
item.add(new TextField("firstname", new 
PropertyModel(item.getModel(), "firstname");
item.add(new TextField("lastname", new 
PropertyModel(item.getModel(), "lastname");

 }
   }
   add(contactListEdit);
 }
}
  (..)

List convertedInput ;

public void convertInput(){
 List list= new ArrayList()
 // how to compose the list ?
 setConvertedInput(list);
}
}

The issue is then in convertInput, how to compose the list of contacts ?

thanks again for your help
++
joseph

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



Re: wiQuery grid row expander

2010-08-04 Thread Ernesto Reinaldo Barreiro
Hi John,

Thanks for your interest in contributing!

Regrading your question. It all depends on if it is a "small" plugin
or a "big" one. For "smaller" plugins I'm just placing them on [1]. If
the plugin is "big" them maybe it would be better to create a new
sub-project under wiquery-plugins. What is this plugin about?

In any case I would go and create a patch and attach it to a new issue
on [2]. It would be nice if the code comes with at least an example so
that we can deploy it to the demo application. Then I'll will look on
how to integrate this into the project. Latter on we can discuss
granting you commit access if you want...

By the way, I have created a google group (see [3])... Shall we  move
further discussions into that context? So that we don't pollute this
list with things that might not be of interest to other wicket users.

Cheers,

Ernesto

References.

1-http://code.google.com/p/wiquery-plugins/source/browse/#svn/trunk/wiquery-plugins/other-plugins
2-http://code.google.com/p/wiquery-plugins/issues/list
3-http://groups.google.com/group/wiquery-plugins


On Wed, Aug 4, 2010 at 6:36 AM, John Armstrong  wrote:
> Hi Ernesto,
>  I am very interested in contributing and completed my first plugin
> this evening. Let me know how I can push this back into the distro or
> if I should host in a separate space etc.
>
> Tx!
> John-
>
> On Wed, Jun 30, 2010 at 2:12 PM, Ernesto Reinaldo Barreiro
>  wrote:
>> John,
>>
>> I just uploaded an small demo of [1] to [2]. Please ping me offline if
>> you want to contribute to the project.
>>
>> Best,
>>
>> Ernesto
>>
>> 1-http://code.google.com/p/wiquery-plugins/source/browse/#svn/trunk/wiquery-plugins/j
>> 2-http://wiquery-plugins-demo.appspot.com/demo/
>>
>> On Wed, Jun 30, 2010 at 4:56 PM, John Armstrong  
>> wrote:
>>> Ahh missed that.
>>>
>>> Tx Ernesto, I will take a look at jq and see if I can help!
>>>
>>> J
>>>
>>> On Tue, Jun 29, 2010 at 10:57 PM, Ernesto Reinaldo Barreiro
>>>  wrote:
 John,

 See [1] and in particular the answer from Cemal (the one on Jun 16...)
 That might answer part of your question.

 Some time ago I have started [2], the implementation there is not that
 complete yet but at least it could give you a starting point. And, of
 course, patches and contributions are always welcome!

 Best,

 Ernesto

 1-http://apache-wicket.1842946.n4.nabble.com/wiQuery-components-with-server-side-state-live-demo-tc1842975.html#none
 2-http://code.google.com/p/wiquery-plugins/source/browse/#svn/trunk/wiquery-plugins/jqgrid

 On Wed, Jun 30, 2010 at 6:34 AM, John Armstrong  
 wrote:
> Back in march there was a thread titled "wiQuery components with
> server side state - live demo"
>
> On that thread Richard Poway and I corresponded about a Grid Row Expander.
>
> I never saw the reply but in a recent google for this I can across a
> link he posted in that thread
>
> http://labs.jweekend.com/public/grid/GridRowExpanderPage
>
> This link is now password protected.
>
> Richard/anyone from jweekend : Does this link still exit?
>
> Tx!
> John-
>
> -
> 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 additional commands, e-mail: users-h...@wicket.apache.org



Re: FormComponentPanel and list edit

2010-08-04 Thread Igor Vaynberg
why not? convertinput() will cascade down to all components that need them.

-igor

On Wed, Aug 4, 2010 at 12:03 AM, Joseph Pachod  wrote:
> Igor Vaynberg wrote:
>>
>> visit all the children, check if they are a FormComponent and call
>> convertinput() followed by getconvertedinput()
>>
>> -igor
>>
>
> hi
>
> thanks igor
>
> we thought of that, but the issue is that we need to handle the
> getconvertedinput
>
> For example, if I've a ContactListEdit, with each item having 2 TextFields
> (on firstname and lastname for example), then just calling getConvertedInput
> would'nt be enough. Each item have some getConvertedInput doing something
> like "return new Contact(firstnameEdit.getConvertedInput(),
> lastnameEdit.getConvertedInput())".
>
> or am I missing something ?
>
> -
> 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: FormComponentPanel and list edit

2010-08-04 Thread Joseph Pachod

Igor Vaynberg wrote:

visit all the children, check if they are a FormComponent and call
convertinput() followed by getconvertedinput()

-igor
  

hi

thanks igor

we thought of that, but the issue is that we need to handle the 
getconvertedinput


For example, if I've a ContactListEdit, with each item having 2 
TextFields (on firstname and lastname for example), then just calling 
getConvertedInput would'nt be enough. Each item have some 
getConvertedInput doing something like "return new 
Contact(firstnameEdit.getConvertedInput(), 
lastnameEdit.getConvertedInput())".


or am I missing something ?

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