Question about wicket validation

2009-09-28 Thread Martin Makundi
Hi!

If a form validator depends on a nested form's components, it will
assume they are valid because the nested form's components are
validated after the parent form?

**
Martin

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



Get converted value?

2009-09-28 Thread Martin Makundi
Hi!

formComponent.getValue() allways gives you the latest user input OR
the model value. This is useful for validation purposes, but is there
a bluilt-in "get converted value" method?

There is "getConvertedInput" -method, but that will only give you the
user-submitted value if it has already been converted. The validation
sequence is a bit funny:

public void validate()
{
validateRequired();
if (isValid())  <--- this validator will not receive 
converted input
{
convertInput();
if (isValid())

So sometimes validators will process formcomponents whose input has
not been converted?? How to deal with that properly?

**
Martin

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



AttributeModifier & relative path rendering in conflict

2009-09-28 Thread pete swulius
All,

I am trying to use an AttributeModifier to change the stylesheet used on a
Page of mine.

WebComponent styleComponent = new WebComponent( "style" );
styleComponent.add( new SimpleAttributeModifier( "href", "css/" +
style.getName() + "/stylesheet.css" ) );
add( styleComponent );

The different stylesheets are located in sub-directories corresponding to
style.getName().  The problem I have is that whatever code prepends all
relative paths on the rendered page is not applying it to this 'modified
attribute'.  For instance:

I see this

render as


but my modified style just renders as such:


Obviously this relative path swipe happens before the attributes are
modified.  Is there a better way to do what I'm trying to do?  Thank you!

--pete


Re: How to run wicket-stuff phonebook example?

2009-09-28 Thread Petr Fejfar
On Mon, Sep 28, 2009 at 8:41 PM, Maarten Bosteels
 wrote:

> Someone changed the version of commons-dbcp from 1.2.2 to 20030825.18442
> (revision 4964)
> I have reverted that change, and the phonebook seems to work now.

Yes, it works now.


Thanks for your help, Petr

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



Attempt to set model object on null model of component

2009-09-28 Thread Sam Barrow
I'm getting this exception:
java.lang.IllegalStateException: Attempt to set model object on null
model of component: form:agent

The only reason i can find is that the field has a null model, but i added a 
new Model() to the field and im still getting it

DropDownChoice agent = new DropDownChoice("agent", new 
Model(), agentList);


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



Wicket component cannot be found from page relative component path.

2009-09-28 Thread yong mook kim
Hi, 

Wicket will render its component based on page relative component path. For an 
example, a bookmarkable page is requested, then the 
BookmarkableListenerInterfaceRequestTarget.processEvent() is triggered to 
lookup the component. But some of the component are only exist when the user 
session is still available. Then I encounter some component cannot be found due 
to this condition. Therefore WicketRuntimeException will be thrown. How do I 
render the page as usual but display label to ask user to sign on for those 
components are required to sign on instead of exception is thrown.

Thanks


  

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



AjaxPagingNavigation

2009-09-28 Thread Douglas Ferguson
I'm using the AjaxPagingNavigation component and it works well, but when I 
click on one of the links, my url  is replaced with

/?wicket:interface=:3:4:::

This is making me thing that the entire page is getting replaced and not using 
ajax.

Is is possible to get IPagingNavigationIncrementLink to use href="#" instead of 
updating the url?

D/



Re: Can anyone share a ReCaptcha Panel?

2009-09-28 Thread Jonathan Locke


why not use kitten captcha?


fatefree wrote:
> 
> I saw there was an archived post about a panel that was created for this
> purpose, but the code was shared through PasteBin and it seems the urls
> are
> old and possibly, filled with some kind of virus. Does anyone still have
> or
> know of a complete recaptcha panel that can be shared?
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Can-anyone-share-a-ReCaptcha-Panel--tp25651680p25655010.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: Can anyone share a ReCaptcha Panel?

2009-09-28 Thread fatefree



Fernando Wermus-2 wrote:
> 
> you have to look at the wicket examples
> 
> -- 
> Fernando Wermus.
> 
> www.linkedin.com/in/fernandowermus
> 
> 

Sorry, I know there are captcha examples, I'm referring specifically to the
http://recaptcha.net/ implementation
-- 
View this message in context: 
http://www.nabble.com/Can-anyone-share-a-ReCaptcha-Panel--tp25651680p25653041.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: Can anyone share a ReCaptcha Panel?

2009-09-28 Thread Fernando Wermus
you have to look at the wicket examples

On Mon, Sep 28, 2009 at 4:46 PM, Anthony DePalma  wrote:

> I saw there was an archived post about a panel that was created for this
> purpose, but the code was shared through PasteBin and it seems the urls are
> old and possibly, filled with some kind of virus. Does anyone still have or
> know of a complete recaptcha panel that can be shared?
>



-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


[WicketStuff] Iolite

2009-09-28 Thread nino martinez wael
Hi Guys

I've been using Guice for a while together with warp persist and dynamic
finders. Would it be of any interest to switch Iolite to Guice? Please say
if it has interest then I might do it, but won't if nobody uses it.


http://www.wideplay.com/guicewebextensions2
http://www.wideplay.com/dynamicfinders
http://code.google.com/p/google-guice/

Regards Nino


Re: Doubt with Maven config

2009-09-28 Thread nino martinez wael
Show us some code and it will be easier to help..

AFAIK the start.java that are with iolite are the same as in WIA, it's based
on the wicket archetype and only has the DAO layer as an extra
thing+filters.

regards Nino

2009/9/27 Pedro Sena 

> Hi Guys,
>
> I'm using lolite archetype but I'm having a 'problem'
>
> I want to run my tests (JUnit) and keep the Jetty server alive after the
> tests.
>
> Every time that I run my maven tests, it creates a Jetty server that is
> killed at the end of the process.
>
> I'm trying to do the same thing as Wicket in Action, I changed the
> Start.java that comes with lolite but it not helped.
>
> I'm sure that I'm missing some detail, I'd appreciate some help with it.
>
> Thanks in advance
>
> --
> /**
> * Pedro Sena
> * Systems Architect
> * Sun Certified Java Programmer
> * Sun Certified Web Component Developer
> */
>


Re: Form Processing problem on pages with Border - Wicket 1.4.1

2009-09-28 Thread Pedro Santos
Flavius, I took the liberty:
https://issues.apache.org/jira/browse/WICKET-2494

On Sat, Sep 26, 2009 at 12:24 AM, Flavius  wrote:

>
>
> When I first posted this, I posted it multiple times thinking
> that it wasn't going through.  Sorry about that.  Pedro S had
> posted a reply to one of the duplicates I have since removed
> and I wanted to put it here:
>
> =
>
> >The internalUpdateFormComponentModels method in 1.3.6 didn't look for the
> >border and visit it's components.  It's not obvious to me why this needs
> to
> >be done now in 1.4.
>
> The objective is to notify form's event to generic containers...
>
> >When the form is submitted, the DropDownChoice's value is being reset.
>
> you can implement the updateModel() of your DropDownChoice and implement
> the
> behavior you are expecting, or you can require on JIRA that the wicket form
> component stop notifying your components on generic containers.
> http://issues.apache.org/jira/browse/WICKET-1853
>
> =
>
>
> I thought about this.  Here's the problem:
>
> When I change the value I really do need to update the backing model.
> If I override updateModel (and don't call the super updateModel) my
> backing model will never be updated when the dropdown is changed.  If
> I don't override it, or do and call the super method, I'll get a null
> value on every form submit from Form#component.
>
> I put a QuickStart up here:
> http://silverlion.com/flavius/BorderVisit.zip
> If you unzip it and run mvn jetty:run this will demonstrate what's
> going on.  Just go to the home page and press the submit button.
>
>
>
> So overriding updateModel() isn't an option, as I see it.  My choices
> that I see thus far are:
>
> 1.  Alter the wicket source code to remove the updates on Border, which
> I really don't want to do because I haven't gone through everything
> to see what I will break doing that.
>
> 2.  Move away from using a Border and lose the ability to swap out borders
> based on role/group, etc
>
> I would love a third option that I currently don't see.
>
> As a side note, I can see the benefit of notifying all the components
> in the border, but can't that be an optional thing?
>
> In my onSubmit() method, I can always call
> FormComponent.visitComponentsPostOrder(border, new
> FormModelUpdateVisitor(this));  But with the way it is now, I have no way
> to opt out of having my components updated.
>
> Is anybody else who uses borders having an issue like this?
> --
> View this message in context:
> http://www.nabble.com/Form-Processing-problem-on-pages-with-Border---Wicket-1.4.1-tp25595716p25621988.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
>
>


-- 
Pedro Henrique Oliveira dos Santos


Can anyone share a ReCaptcha Panel?

2009-09-28 Thread Anthony DePalma
I saw there was an archived post about a panel that was created for this
purpose, but the code was shared through PasteBin and it seems the urls are
old and possibly, filled with some kind of virus. Does anyone still have or
know of a complete recaptcha panel that can be shared?


Re: RE : Redirections and Reverse-Proxy

2009-09-28 Thread James Carman
Have you looked at:

http://docs.codehaus.org/display/JETTY/Configuring+mod_proxy

This sounds like a jetty issue, not a Wicket issue.

On Mon, Sep 28, 2009 at 2:58 PM, Stéphane Jeanjean
 wrote:
>
> For sure, I'm using reverse proxy and cookie rewriting, but before reverse
> proxying the hostname is not the right. I think it comes from the Jetty
> implementation for the sendRedirect() method.
>
>> -Message d'origine-
>> De : nino martinez wael [mailto:nino.martinez.w...@gmail.com]
>> Envoyé : lundi 28 septembre 2009 20:49
>> À : users@wicket.apache.org
>> Objet : Re: Redirections and Reverse-Proxy
>>
>>
>> Hi
>>
>> I havent had that many troubles using Apache Http and wicket.
>> As long as you remember to forward and reverse proxy + cookie
>> rewrite..
>>
>> Something like this:
>> http://cwiki.apache.org/WICKET/wicket-behind-a-front-end-proxy.html
>>
>>
>>
>> -- Forwarded message --
>> From: Stéphane Jeanjean 
>> Date: 2009/9/28
>> Subject: Re: Redirections and Reverse-Proxy
>> To: users@wicket.apache.org
>>
>>
>>
>> I'm not sure it's a related to wicket. I think it's related to the
>> respones.sendRedirect() implementation and how the string put
>> in the location header is build. I don't know if it's
>> standard or if it's a Jetty implementation. I have to found
>> out this implementation to understand where the host in
>> location header comes from. Or perhaps I could "override" the
>> sendRedirect method() as described here :
>> http://knowledgefolders.com/akc/servlet/DisplayServlet?url=Dis
>> playNoteMPURL&reportId=1711&ownerUserId=satya
>>
>>
>> Stéphane Jeanjean a écrit :
>>
>>
>> > I don't know, that's a part of my question. Nothing about RPhost is
>> > configured in my BEhost.
>> >
>> > Igor Vaynberg a écrit :
>> >
>> >> how does wicket know about RPhost when it issues the 302?
>> >>
>> >> -igor
>> >>
>> >> On Mon, Sep 28, 2009 at 2:10 AM, Stéphane Jeanjean
>> >>  wrote:
>> >>
>> >>
>> >>> Hello,
>> >>>
>> >>> I'm using Wicket in a backend which is behind a reverse-proxy. I
>> >>> understand that Wicket does some redirections even if it's not's
>> >>> explicity requested by my code. (perhaps, here, it
>> depends of some
>> >>> strategies, but I
>> >>> don't know them)
>> >>>
>> >>> When a redirection is sent by the back-end the hostname
>> used is the
>> >>> reverse proxy host instead of the back-end host. I would
>> like to use
>> >>> the back-end host in this response to be able to translate the
>> >>> back-end host to front-end
>> >>> host in the reverse-proxy.
>> >>> What I can see in the reponse :
>> >>> BackEnd -> 302:http://RPhost/myApp/mypage --> ReverseProxy ->
>> >>> 302:http://RPhost/myApp/mypage -> Browser
>> >>> What I would like :
>> >>> BackEnd -> 302:http://BEhost/myApp/mypage --> ReverseProxy ->
>> >>> 302:https://RPhost/myApp/mypage -> Browser
>> >>>
>> >>> I'm using Jetty for my server and mod_proxy in ligthtpd for the
>> >>> reverse proxy.
>> >>>
>> >>> Any idea ?
>> >>>
>> >>> Thanks,
>> >>>
>> >>> Stéphane
>> >>>
>> >>>
>> >>>
>> >>>
>> 
>> >>> -
>> >>> 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 : Redirections and Reverse-Proxy

2009-09-28 Thread Stéphane Jeanjean

For sure, I'm using reverse proxy and cookie rewriting, but before reverse
proxying the hostname is not the right. I think it comes from the Jetty
implementation for the sendRedirect() method.

> -Message d'origine-
> De : nino martinez wael [mailto:nino.martinez.w...@gmail.com] 
> Envoyé : lundi 28 septembre 2009 20:49
> À : users@wicket.apache.org
> Objet : Re: Redirections and Reverse-Proxy
> 
> 
> Hi
> 
> I havent had that many troubles using Apache Http and wicket. 
> As long as you remember to forward and reverse proxy + cookie 
> rewrite..
> 
> Something like this: 
> http://cwiki.apache.org/WICKET/wicket-behind-a-front-end-proxy.html
> 
> 
> 
> -- Forwarded message --
> From: Stéphane Jeanjean 
> Date: 2009/9/28
> Subject: Re: Redirections and Reverse-Proxy
> To: users@wicket.apache.org
> 
> 
> 
> I'm not sure it's a related to wicket. I think it's related to the
> respones.sendRedirect() implementation and how the string put 
> in the location header is build. I don't know if it's 
> standard or if it's a Jetty implementation. I have to found 
> out this implementation to understand where the host in 
> location header comes from. Or perhaps I could "override" the 
> sendRedirect method() as described here : 
> http://knowledgefolders.com/akc/servlet/DisplayServlet?url=Dis
> playNoteMPURL&reportId=1711&ownerUserId=satya
> 
> 
> Stéphane Jeanjean a écrit :
> 
> 
> > I don't know, that's a part of my question. Nothing about RPhost is 
> > configured in my BEhost.
> >
> > Igor Vaynberg a écrit :
> >
> >> how does wicket know about RPhost when it issues the 302?
> >>
> >> -igor
> >>
> >> On Mon, Sep 28, 2009 at 2:10 AM, Stéphane Jeanjean 
> >>  wrote:
> >>
> >>
> >>> Hello,
> >>>
> >>> I'm using Wicket in a backend which is behind a reverse-proxy. I 
> >>> understand that Wicket does some redirections even if it's not's 
> >>> explicity requested by my code. (perhaps, here, it 
> depends of some 
> >>> strategies, but I
> >>> don't know them)
> >>>
> >>> When a redirection is sent by the back-end the hostname 
> used is the 
> >>> reverse proxy host instead of the back-end host. I would 
> like to use 
> >>> the back-end host in this response to be able to translate the 
> >>> back-end host to front-end
> >>> host in the reverse-proxy.
> >>> What I can see in the reponse :
> >>> BackEnd -> 302:http://RPhost/myApp/mypage --> ReverseProxy ->
> >>> 302:http://RPhost/myApp/mypage -> Browser
> >>> What I would like :
> >>> BackEnd -> 302:http://BEhost/myApp/mypage --> ReverseProxy ->
> >>> 302:https://RPhost/myApp/mypage -> Browser
> >>>
> >>> I'm using Jetty for my server and mod_proxy in ligthtpd for the 
> >>> reverse proxy.
> >>>
> >>> Any idea ?
> >>>
> >>> Thanks,
> >>>
> >>> Stéphane
> >>>
> >>>
> >>>
> >>> 
> 
> >>> -
> >>> 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: Redirections and Reverse-Proxy

2009-09-28 Thread nino martinez wael
Hi

I havent had that many troubles using Apache Http and wicket. As long as you
remember to forward and reverse proxy + cookie rewrite..

Something like this:
http://cwiki.apache.org/WICKET/wicket-behind-a-front-end-proxy.html



-- Forwarded message --
From: Stéphane Jeanjean 
Date: 2009/9/28
Subject: Re: Redirections and Reverse-Proxy
To: users@wicket.apache.org



I'm not sure it's a related to wicket. I think it's related to the
respones.sendRedirect() implementation and how the string put in the
location header is build. I don't know if it's standard or if it's a Jetty
implementation. I have to found out this implementation to understand where
the host in location header comes from. Or perhaps I could "override" the
sendRedirect method() as described here :
http://knowledgefolders.com/akc/servlet/DisplayServlet?url=DisplayNoteMPURL&reportId=1711&ownerUserId=satya


Stéphane Jeanjean a écrit :


> I don't know, that's a part of my question. Nothing about RPhost is
> configured in my BEhost.
>
> Igor Vaynberg a écrit :
>
>> how does wicket know about RPhost when it issues the 302?
>>
>> -igor
>>
>> On Mon, Sep 28, 2009 at 2:10 AM, Stéphane Jeanjean
>>  wrote:
>>
>>
>>> Hello,
>>>
>>> I'm using Wicket in a backend which is behind a reverse-proxy.
>>> I understand that Wicket does some redirections even if it's not's
>>> explicity
>>> requested by my code. (perhaps, here, it depends of some strategies, but
>>> I
>>> don't know them)
>>>
>>> When a redirection is sent by the back-end the hostname used is the
>>> reverse
>>> proxy host instead of the back-end host. I would like to use the back-end
>>> host in this response to be able to translate the back-end host to
>>> front-end
>>> host in the reverse-proxy.
>>> What I can see in the reponse :
>>> BackEnd -> 302:http://RPhost/myApp/mypage --> ReverseProxy ->
>>> 302:http://RPhost/myApp/mypage -> Browser
>>> What I would like :
>>> BackEnd -> 302:http://BEhost/myApp/mypage --> ReverseProxy ->
>>> 302:https://RPhost/myApp/mypage -> Browser
>>>
>>> I'm using Jetty for my server and mod_proxy in ligthtpd for the reverse
>>> proxy.
>>>
>>> Any idea ?
>>>
>>> Thanks,
>>>
>>> Stéphane
>>>
>>>
>>>
>>> -
>>> 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: How to run wicket-stuff phonebook example?

2009-09-28 Thread Maarten Bosteels
Hi,

Someone changed the version of commons-dbcp from 1.2.2 to 20030825.18442
(revision 4964)
I have reverted that change, and the phonebook seems to work now.

As far as I can see the change was made by Shake234, aka Johannes Schneider.
Johannes, what was the reason to switch to  20030825.18442 ?

Maarten


On Mon, Sep 28, 2009 at 12:54 PM, Petr Fejfar  wrote:

> Hi all,
>
> few months ago I've run wicket-stuff phonebook examples and it worked.
>
> No I'd like to study it again, hence I downloaded wicket-stuff from the
> trunk,
> run command  mvn clean install  with result BUILD SUCCESSFUL.
>
> But on command mvn jetty:run, I've got exception:
>
> org.springframework.beans.factory.BeanCreationException:
>  Error creating bean with name 'dataSource' defined in class path
> resource [common.xml]:
>  Instantiation of bean failed; nested exception is
> java.lang.NoClassDefFoundError:
>  org/apache/commons/pool/impl/GenericObjectPool
>
> I'd expect that Maven will download all modules the example
> depends on... What shall I do to make the example running on my machine?
>
>
> Thanks, Petr
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Redirections and Reverse-Proxy

2009-09-28 Thread Stéphane Jeanjean


I'm not sure it's a related to wicket. I think it's related to the 
respones.sendRedirect() implementation and how the string put in the 
location header is build. I don't know if it's standard or if it's a 
Jetty implementation. I have to found out this implementation to 
understand where the host in location header comes from. Or perhaps I 
could "override" the sendRedirect method() as described here : 
http://knowledgefolders.com/akc/servlet/DisplayServlet?url=DisplayNoteMPURL&reportId=1711&ownerUserId=satya



Stéphane Jeanjean a écrit :


I don't know, that's a part of my question. Nothing about RPhost is 
configured in my BEhost.


Igor Vaynberg a écrit :

how does wicket know about RPhost when it issues the 302?

-igor

On Mon, Sep 28, 2009 at 2:10 AM, Stéphane Jeanjean
 wrote:
 

Hello,

I'm using Wicket in a backend which is behind a reverse-proxy.
I understand that Wicket does some redirections even if it's not's 
explicity
requested by my code. (perhaps, here, it depends of some strategies, 
but I

don't know them)

When a redirection is sent by the back-end the hostname used is the 
reverse
proxy host instead of the back-end host. I would like to use the 
back-end
host in this response to be able to translate the back-end host to 
front-end

host in the reverse-proxy.
What I can see in the reponse :
BackEnd -> 302:http://RPhost/myApp/mypage --> ReverseProxy ->
302:http://RPhost/myApp/mypage -> Browser
What I would like :
BackEnd -> 302:http://BEhost/myApp/mypage --> ReverseProxy ->
302:https://RPhost/myApp/mypage -> Browser

I'm using Jetty for my server and mod_proxy in ligthtpd for the reverse
proxy.

Any idea ?

Thanks,

Stéphane



-
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: Doubt with Maven config

2009-09-28 Thread Johannes Schneider
I think the maven jetty plugin does *not* use Start.java. Instead the
plugin is configured within the pom.xml

Pedro Sena wrote:
> Hi Guys,
> 
> I'm using lolite archetype but I'm having a 'problem'
> 
> I want to run my tests (JUnit) and keep the Jetty server alive after the
> tests.
> 
> Every time that I run my maven tests, it creates a Jetty server that is
> killed at the end of the process.
> 
> I'm trying to do the same thing as Wicket in Action, I changed the
> Start.java that comes with lolite but it not helped.
> 
> I'm sure that I'm missing some detail, I'd appreciate some help with it.
> 
> Thanks in advance
> 

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



Re: Redirections and Reverse-Proxy

2009-09-28 Thread Stéphane Jeanjean


I don't know, that's a part of my question. Nothing about RPhost is 
configured in my BEhost.


Igor Vaynberg a écrit :

how does wicket know about RPhost when it issues the 302?

-igor

On Mon, Sep 28, 2009 at 2:10 AM, Stéphane Jeanjean
 wrote:
  

Hello,

I'm using Wicket in a backend which is behind a reverse-proxy.
I understand that Wicket does some redirections even if it's not's explicity
requested by my code. (perhaps, here, it depends of some strategies, but I
don't know them)

When a redirection is sent by the back-end the hostname used is the reverse
proxy host instead of the back-end host. I would like to use the back-end
host in this response to be able to translate the back-end host to front-end
host in the reverse-proxy.
What I can see in the reponse :
BackEnd -> 302:http://RPhost/myApp/mypage --> ReverseProxy ->
302:http://RPhost/myApp/mypage -> Browser
What I would like :
BackEnd -> 302:http://BEhost/myApp/mypage --> ReverseProxy ->
302:https://RPhost/myApp/mypage -> Browser

I'm using Jetty for my server and mod_proxy in ligthtpd for the reverse
proxy.

Any idea ?

Thanks,

Stéphane



-
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: Redirections and Reverse-Proxy

2009-09-28 Thread Igor Vaynberg
how does wicket know about RPhost when it issues the 302?

-igor

On Mon, Sep 28, 2009 at 2:10 AM, Stéphane Jeanjean
 wrote:
> Hello,
>
> I'm using Wicket in a backend which is behind a reverse-proxy.
> I understand that Wicket does some redirections even if it's not's explicity
> requested by my code. (perhaps, here, it depends of some strategies, but I
> don't know them)
>
> When a redirection is sent by the back-end the hostname used is the reverse
> proxy host instead of the back-end host. I would like to use the back-end
> host in this response to be able to translate the back-end host to front-end
> host in the reverse-proxy.
> What I can see in the reponse :
> BackEnd -> 302:http://RPhost/myApp/mypage --> ReverseProxy ->
> 302:http://RPhost/myApp/mypage -> Browser
> What I would like :
> BackEnd -> 302:http://BEhost/myApp/mypage --> ReverseProxy ->
> 302:https://RPhost/myApp/mypage -> Browser
>
> I'm using Jetty for my server and mod_proxy in ligthtpd for the reverse
> proxy.
>
> Any idea ?
>
> Thanks,
>
> Stéphane
>
>
>
> -
> 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: How can we display by example the format to be used to input Date in DateTextField ?

2009-09-28 Thread Matthias Keller

Hi Charles

About Question 1: The validation message seems to have its origin in 
FormComponent#convertInput():
It will try either  "IConverter."  or  
"IConverter"  and the used pattern will be available as the variable 
"format"  (or  ${format}  as used in the string resources).


About Question 2: You'll have to subclass the DateTextField and override 
getConverter().


You could then just check if the returned  super.getConverter() is of 
type  DateConverter and if yes, call the setLenient() method on it.


Matt

Charles Moulliard wrote:

I use a DateTextField to check if a user encode date according to the
Date pattern format defined.

DateTextField textfieldFromDate = new DateTextField("fromDate", "MMdd" );

Question 1 : Is it possible in the message displayed by Wicket after
the validation in the feedbackPanel to show the correct format to be
used ?

Question 2 . Can we define the format to be used (in the case of a
date) as setLenient() to verify if the date encoded is correct unlike
as the following date "20090230" ?

Regards,

Charles Moulliard
  




smime.p7s
Description: S/MIME Cryptographic Signature


Re: How can we display by example the format to be used to input Date in DateTextField ?

2009-09-28 Thread Pedro Santos
about question 1, yes:
http://static.ddpoker.com/javadoc/wicket/1.4-rc2/org/apache/wicket/util/convert/ConversionException.html#setResourceKey%28java.lang.String%29

On Mon, Sep 28, 2009 at 10:57 AM, Charles Moulliard wrote:

> I use a DateTextField to check if a user encode date according to the
> Date pattern format defined.
>
> DateTextField textfieldFromDate = new DateTextField("fromDate", "MMdd"
> );
>
> Question 1 : Is it possible in the message displayed by Wicket after
> the validation in the feedbackPanel to show the correct format to be
> used ?
>
> Question 2 . Can we define the format to be used (in the case of a
> date) as setLenient() to verify if the date encoded is correct unlike
> as the following date "20090230" ?
>
> Regards,
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *
> blog : http://cmoulliard.blogspot.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Pedro Henrique Oliveira dos Santos


Re: Doubt with Maven config

2009-09-28 Thread Jeremy Thomerson
I don't know about keeping jetty running after the tests, but you can
probably run "mvn jetty:run" to run jetty.

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



On Sun, Sep 27, 2009 at 2:22 PM, Pedro Sena  wrote:

> Hi Guys,
>
> I'm using lolite archetype but I'm having a 'problem'
>
> I want to run my tests (JUnit) and keep the Jetty server alive after the
> tests.
>
> Every time that I run my maven tests, it creates a Jetty server that is
> killed at the end of the process.
>
> I'm trying to do the same thing as Wicket in Action, I changed the
> Start.java that comes with lolite but it not helped.
>
> I'm sure that I'm missing some detail, I'd appreciate some help with it.
>
> Thanks in advance
>
> --
> /**
> * Pedro Sena
> * Systems Architect
> * Sun Certified Java Programmer
> * Sun Certified Web Component Developer
> */
>


Re: Best way to handle circular references

2009-09-28 Thread Daniel Stoch
Hi,

We have (in our team) the same thoughts :). We treat circular
references between packages as an error (bad architecture design) and
we use an automatic test case for all projects to check if there are
any cycles in packages. So project with such cycles does not pass the
tests.

It can be a problem in Wicket, when you are using base navigation
concept: setResponsePage(...). In my opinion, to use Wicket in more
complicated projects, it is good to first prepare a navigation
abstraction layer above the core Wicket mechanisms, and do not use
page class references directly (we are using actions for this, the
concept very similar to Delphi actions).
So instead write something like this:

Customer customer = customerModel.getObject();
new BookmarkablePageLink("someId", CustomerViewPage.class, new
PageParameters("id=" + customer.getId()));

I can write:
new ActionLink("someId", new ObjectAction(ActionType.INSPECT,
customerModel, Customer.class)));
and the rest is done "behind the scenes". Then the whole "circular
references" problem will gone :).

--
Daniel

On Fri, Sep 25, 2009 at 9:06 AM, Giovanni Cuccu
 wrote:
> I have no problem other than "i dont like it", but since I don't like it I'd
> like to know if someone else had the same thoughts I had and what was the
> conclusion.
> Giovanni
>

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



Re: Best way to work with the iterator of IDataProvider

2009-09-28 Thread cmoulliard

I have found the error.

List Result = new ArrayList(); must be defined outside of the
iterator method

and also the answer to my question. 

When the result is empty or null, then I must return a null iterator



T Ames wrote:
> 
> I see several undefined objects:
> 
> result
> requestFormModel
> it
> 
> If these are defined at the class level, they must be serializable.
> 
> If you have Logging set at Info, Wicket will give you the actual field
> that
> is not serializable, although from the error it looks like something to do
> with AbstractList
> 
> Iterator objects are not serializable.  I would look at how you are
> defining
> the "it" variable.
> 
> 
> 
> On Mon, Sep 28, 2009 at 7:25 AM, Charles Moulliard
> wrote:
> 
>> Hi,
>>
>> I would like to know what is the best way to work with the method
>> iterator of DataProvider.
>>
>> I have created a class implementing IDataProvider. Depending of a
>> parameter, the DAO service called is not the same inside in the
>> iterator method. For some DAO services, a list is returned but for one
>> service, an object is returned instead of a list.
>>
>> If I try to create a ArrayList inside the iterator, the following
>> error is generated :
>>
>>
>> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
>> Unable to serialize class: java.util.AbstractList$Itr
>> Field hierarchy is:
>>  0 [class=com.xpectis.x3s.fundbox.web.RequestPage, path=0]
>>private java.lang.Object
>> org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
>>  java.lang.Object org.apache.wicket.Component.data[3]
>> [class=com.xpectis.x3s.fundbox.web.RequestPage$1, path=0:requestList]
>>private final
>> org.apache.wicket.markup.repeater.data.IDataProvider
>> org.apache.wicket.markup.repeater.data.DataViewBase.dataProvider
>> [class=com.xpectis.x3s.fundbox.web.data.RequestProvider]
>>  private java.util.Iterator
>> com.xpectis.x3s.fundbox.web.data.RequestProvider.it
>> [class=java.util.AbstractList$Itr] <- field that is not
>> serializable
>>at
>> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:346)
>>
>> How can I avoid this issue ?
>>
>> Here is my code :
>>
>> public class RequestProvider implements IDataProvider {
>>
>> ...
>>
>>public Iterator iterator(int first, int count) {
>>
>>result = new ArrayList();
>>
>>if (requestFormModel != null) {
>>
>>if (requestFormModel.getId() != null) {
>>request =
>> requestService.getRequest(requestFormModel.getId());
>>result.add(request);
>>it = result.iterator();
>>
>>} else if (requestFormModel.getFileName() != null)
>> {
>>it =
>> requestService.findRequestByFileName(requestFormModel.getFileName()).iterator();
>>
>>}
>>
>> Regards,
>>
>>
>> Charles Moulliard
>> Senior Enterprise Architect
>> Apache Camel Committer
>>
>> *
>> blog : http://cmoulliard.blogspot.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
> 
> 


-
Charles Moulliard
SOA Architect

My Blog :  http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/  
-- 
View this message in context: 
http://www.nabble.com/Best-way-to-work-with-the-iterator-of-IDataProvider-tp25644122p25645386.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: Best way to work with the iterator of IDataProvider

2009-09-28 Thread vineet semwal
Iterator is not serializable,
wicket will try to serialize it if it's at class level
so either move it inside iterator method
or make it transient ,
In your case,you can easily move it inside method ;)

-- 
regards,
Vineet Semwal

On Mon, Sep 28, 2009 at 6:42 PM, T Ames  wrote:

> Further, you don't really need to define the Iterator, just return them.
>
>
>   public Iterator iterator(int first, int count) {
>
>   result = new ArrayList();
>
>   if (requestFormModel != null) {
>
>   if (requestFormModel.getId() != null) {
>   request =
> requestService.getRequest(requestFormModel.getId());
>
> >result.add(request);
> >return result.iterator();
> >
> >} else if (requestFormModel.getFileName() != null)
> {
> >return
> >
> requestService.findRequestByFileName(requestFormModel.getFileName()).iterator();
> >
>
>
>
> On Mon, Sep 28, 2009 at 9:08 AM, T Ames  wrote:
>
> > I see several undefined objects:
> >
> > result
> > requestFormModel
> > it
> >
> > If these are defined at the class level, they must be serializable.
> >
> > If you have Logging set at Info, Wicket will give you the actual field
> that
> > is not serializable, although from the error it looks like something to
> do
> > with AbstractList
> >
> > Iterator objects are not serializable.  I would look at how you are
> > defining the "it" variable.
> >
> >
> >
> >
> > On Mon, Sep 28, 2009 at 7:25 AM, Charles Moulliard  >wrote:
> >
> >> Hi,
> >>
> >> I would like to know what is the best way to work with the method
> >> iterator of DataProvider.
> >>
> >> I have created a class implementing IDataProvider. Depending of a
> >> parameter, the DAO service called is not the same inside in the
> >> iterator method. For some DAO services, a list is returned but for one
> >> service, an object is returned instead of a list.
> >>
> >> If I try to create a ArrayList inside the iterator, the following
> >> error is generated :
> >>
> >>
> >>
> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
> >> Unable to serialize class: java.util.AbstractList$Itr
> >> Field hierarchy is:
> >>  0 [class=com.xpectis.x3s.fundbox.web.RequestPage, path=0]
> >>private java.lang.Object
> >> org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
> >>  java.lang.Object org.apache.wicket.Component.data[3]
> >> [class=com.xpectis.x3s.fundbox.web.RequestPage$1, path=0:requestList]
> >>private final
> >> org.apache.wicket.markup.repeater.data.IDataProvider
> >> org.apache.wicket.markup.repeater.data.DataViewBase.dataProvider
> >> [class=com.xpectis.x3s.fundbox.web.data.RequestProvider]
> >>  private java.util.Iterator
> >> com.xpectis.x3s.fundbox.web.data.RequestProvider.it
> >> [class=java.util.AbstractList$Itr] <- field that is not
> >> serializable
> >>at
> >>
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:346)
> >>
> >> How can I avoid this issue ?
> >>
> >> Here is my code :
> >>
> >> public class RequestProvider implements IDataProvider {
> >>
> >> ...
> >>
> >>public Iterator iterator(int first, int count) {
> >>
> >>result = new ArrayList();
> >>
> >>if (requestFormModel != null) {
> >>
> >>if (requestFormModel.getId() != null) {
> >>request =
> >> requestService.getRequest(requestFormModel.getId());
> >>result.add(request);
> >>it = result.iterator();
> >>
> >>} else if (requestFormModel.getFileName() !=
> null)
> >> {
> >>it =
> >>
> requestService.findRequestByFileName(requestFormModel.getFileName()).iterator();
> >>
> >>}
> >>
> >> Regards,
> >>
> >>
> >> Charles Moulliard
> >> Senior Enterprise Architect
> >> Apache Camel Committer
> >>
> >> *
> >> blog : http://cmoulliard.blogspot.com
> >>
> >> -
> >> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> >> For additional commands, e-mail: users-h...@wicket.apache.org
> >>
> >>
> >
>


How can we display by example the format to be used to input Date in DateTextField ?

2009-09-28 Thread Charles Moulliard
I use a DateTextField to check if a user encode date according to the
Date pattern format defined.

DateTextField textfieldFromDate = new DateTextField("fromDate", "MMdd" );

Question 1 : Is it possible in the message displayed by Wicket after
the validation in the feedbackPanel to show the correct format to be
used ?

Question 2 . Can we define the format to be used (in the case of a
date) as setLenient() to verify if the date encoded is correct unlike
as the following date "20090230" ?

Regards,

Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*
blog : http://cmoulliard.blogspot.com

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



Re: Best way to work with the iterator of IDataProvider

2009-09-28 Thread T Ames
Further, you don't really need to define the Iterator, just return them.


   public Iterator iterator(int first, int count) {

   result = new ArrayList();

   if (requestFormModel != null) {

   if (requestFormModel.getId() != null) {
   request =
requestService.getRequest(requestFormModel.getId());

>result.add(request);
>return result.iterator();
>
>} else if (requestFormModel.getFileName() != null) {
>return
> requestService.findRequestByFileName(requestFormModel.getFileName()).iterator();
>



On Mon, Sep 28, 2009 at 9:08 AM, T Ames  wrote:

> I see several undefined objects:
>
> result
> requestFormModel
> it
>
> If these are defined at the class level, they must be serializable.
>
> If you have Logging set at Info, Wicket will give you the actual field that
> is not serializable, although from the error it looks like something to do
> with AbstractList
>
> Iterator objects are not serializable.  I would look at how you are
> defining the "it" variable.
>
>
>
>
> On Mon, Sep 28, 2009 at 7:25 AM, Charles Moulliard 
> wrote:
>
>> Hi,
>>
>> I would like to know what is the best way to work with the method
>> iterator of DataProvider.
>>
>> I have created a class implementing IDataProvider. Depending of a
>> parameter, the DAO service called is not the same inside in the
>> iterator method. For some DAO services, a list is returned but for one
>> service, an object is returned instead of a list.
>>
>> If I try to create a ArrayList inside the iterator, the following
>> error is generated :
>>
>>
>> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
>> Unable to serialize class: java.util.AbstractList$Itr
>> Field hierarchy is:
>>  0 [class=com.xpectis.x3s.fundbox.web.RequestPage, path=0]
>>private java.lang.Object
>> org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
>>  java.lang.Object org.apache.wicket.Component.data[3]
>> [class=com.xpectis.x3s.fundbox.web.RequestPage$1, path=0:requestList]
>>private final
>> org.apache.wicket.markup.repeater.data.IDataProvider
>> org.apache.wicket.markup.repeater.data.DataViewBase.dataProvider
>> [class=com.xpectis.x3s.fundbox.web.data.RequestProvider]
>>  private java.util.Iterator
>> com.xpectis.x3s.fundbox.web.data.RequestProvider.it
>> [class=java.util.AbstractList$Itr] <- field that is not
>> serializable
>>at
>> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:346)
>>
>> How can I avoid this issue ?
>>
>> Here is my code :
>>
>> public class RequestProvider implements IDataProvider {
>>
>> ...
>>
>>public Iterator iterator(int first, int count) {
>>
>>result = new ArrayList();
>>
>>if (requestFormModel != null) {
>>
>>if (requestFormModel.getId() != null) {
>>request =
>> requestService.getRequest(requestFormModel.getId());
>>result.add(request);
>>it = result.iterator();
>>
>>} else if (requestFormModel.getFileName() != null)
>> {
>>it =
>> requestService.findRequestByFileName(requestFormModel.getFileName()).iterator();
>>
>>}
>>
>> Regards,
>>
>>
>> Charles Moulliard
>> Senior Enterprise Architect
>> Apache Camel Committer
>>
>> *
>> blog : http://cmoulliard.blogspot.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>


Re: Best way to work with the iterator of IDataProvider

2009-09-28 Thread T Ames
I see several undefined objects:

result
requestFormModel
it

If these are defined at the class level, they must be serializable.

If you have Logging set at Info, Wicket will give you the actual field that
is not serializable, although from the error it looks like something to do
with AbstractList

Iterator objects are not serializable.  I would look at how you are defining
the "it" variable.



On Mon, Sep 28, 2009 at 7:25 AM, Charles Moulliard wrote:

> Hi,
>
> I would like to know what is the best way to work with the method
> iterator of DataProvider.
>
> I have created a class implementing IDataProvider. Depending of a
> parameter, the DAO service called is not the same inside in the
> iterator method. For some DAO services, a list is returned but for one
> service, an object is returned instead of a list.
>
> If I try to create a ArrayList inside the iterator, the following
> error is generated :
>
>
> org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
> Unable to serialize class: java.util.AbstractList$Itr
> Field hierarchy is:
>  0 [class=com.xpectis.x3s.fundbox.web.RequestPage, path=0]
>private java.lang.Object
> org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
>  java.lang.Object org.apache.wicket.Component.data[3]
> [class=com.xpectis.x3s.fundbox.web.RequestPage$1, path=0:requestList]
>private final
> org.apache.wicket.markup.repeater.data.IDataProvider
> org.apache.wicket.markup.repeater.data.DataViewBase.dataProvider
> [class=com.xpectis.x3s.fundbox.web.data.RequestProvider]
>  private java.util.Iterator
> com.xpectis.x3s.fundbox.web.data.RequestProvider.it
> [class=java.util.AbstractList$Itr] <- field that is not
> serializable
>at
> org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:346)
>
> How can I avoid this issue ?
>
> Here is my code :
>
> public class RequestProvider implements IDataProvider {
>
> ...
>
>public Iterator iterator(int first, int count) {
>
>result = new ArrayList();
>
>if (requestFormModel != null) {
>
>if (requestFormModel.getId() != null) {
>request =
> requestService.getRequest(requestFormModel.getId());
>result.add(request);
>it = result.iterator();
>
>} else if (requestFormModel.getFileName() != null) {
>it =
> requestService.findRequestByFileName(requestFormModel.getFileName()).iterator();
>
>}
>
> Regards,
>
>
> Charles Moulliard
> Senior Enterprise Architect
> Apache Camel Committer
>
> *
> blog : http://cmoulliard.blogspot.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: confused about component parent field

2009-09-28 Thread Haulyn R. Jason
Hi, Pedro,

after debug, I found the problem, and I add this line before my code:

this.getParent().addOrReplace(currentPanel),
this line resolve the problem.

Thanks :)


On Mon, Sep 28, 2009 at 7:25 PM, Pedro Santos  wrote:

> Hi Haulyn, if you call
>
> currentPanel.replaceWith(targetPanel);
>
> an got
> java.lang.IllegalStateException: This method can only be called on a
> component that has already been added to its parent.
>
> the only thing that can cause that exception is: currentPanel hasn't an
> parent.
>
> Work direct with the parent when you swap panels, just to make sure you
> will
> not fall in that exception. You have a list of then right? Use:
> parent.replace(childChoicedOnListOfPanelToSwap)
>
> On Sat, Sep 26, 2009 at 10:24 PM, Haulyn R. Jason  >wrote:
>
> > Hi, all
> > I design a component for display a navigation bar with panel swap tech.
> > I define a Panel as the name of currentPanel and use DashboardPanel to
> > instance it., and define a List to generate the navigation bar.
> > Other people will transfer the list to my component, and when the Link be
> > clicked, my component will execute these codes:
> >
> > currentPanel.replaceWith(targetPanel);
> > currentPanel = targetPanel;
> >
> > but I get the following error message:
> >
> > WicketMessage: Method onLinkClicked of interface
> > org.apache.wicket.markup.html.link.ILinkListener targeted at component
> > [MarkupContainer [Component id = url]] threw an exception
> >
> > Root cause:
> >
> > java.lang.IllegalStateException: This method can only be called on a
> > component that has already been added to its parent.
> >
> >
> > I debug the application and I find there is a parent field in the
> > currentPanel, in the begining, the value of parent field is "Panel",
> > but parent field of targetPanel from the List which is
> > transfered from other application is NULL.
> >
> >
> > I am confused on the parent field, who can tell me which part I forget
> > to use the panel swapping tech?
> >
> >
> >
> > --
> > Many thanks!
> >
> > Haulyn Microproduction
> >
> > Mobile: +086-15864011231
> > email: saharab...@gmail.com, hmp.hau...@foxmail.com
> > website: http://haulynjason.net
> > gtalk: saharab...@gmail.com
> > skype: saharabear
> > QQ: 378606292
> >
> > Haulyn Jason
> >
>
>
>
> --
> Pedro Henrique Oliveira dos Santos
>



-- 
Many thanks!

Haulyn Microproduction

Mobile: +086-15864011231
email: saharab...@gmail.com, hmp.hau...@foxmail.com
website: http://haulynjason.net/
gtalk: saharab...@gmail.com
skype: saharabear
QQ: 378606292

Haulyn Jason


Best way to work with the iterator of IDataProvider

2009-09-28 Thread Charles Moulliard
Hi,

I would like to know what is the best way to work with the method
iterator of DataProvider.

I have created a class implementing IDataProvider. Depending of a
parameter, the DAO service called is not the same inside in the
iterator method. For some DAO services, a list is returned but for one
service, an object is returned instead of a list.

If I try to create a ArrayList inside the iterator, the following
error is generated :

org.apache.wicket.util.io.SerializableChecker$WicketNotSerializableException:
Unable to serialize class: java.util.AbstractList$Itr
Field hierarchy is:
  0 [class=com.xpectis.x3s.fundbox.web.RequestPage, path=0]
private java.lang.Object
org.apache.wicket.MarkupContainer.children [class=[Ljava.lang.Object;]
  java.lang.Object org.apache.wicket.Component.data[3]
[class=com.xpectis.x3s.fundbox.web.RequestPage$1, path=0:requestList]
private final
org.apache.wicket.markup.repeater.data.IDataProvider
org.apache.wicket.markup.repeater.data.DataViewBase.dataProvider
[class=com.xpectis.x3s.fundbox.web.data.RequestProvider]
  private java.util.Iterator
com.xpectis.x3s.fundbox.web.data.RequestProvider.it
[class=java.util.AbstractList$Itr] <- field that is not
serializable
at 
org.apache.wicket.util.io.SerializableChecker.check(SerializableChecker.java:346)

How can I avoid this issue ?

Here is my code :

public class RequestProvider implements IDataProvider {

...

public Iterator iterator(int first, int count) {

result = new ArrayList();

if (requestFormModel != null) {

if (requestFormModel.getId() != null) {
request = 
requestService.getRequest(requestFormModel.getId());
result.add(request);
it = result.iterator();

} else if (requestFormModel.getFileName() != null) {
it = 
requestService.findRequestByFileName(requestFormModel.getFileName()).iterator();

}

Regards,


Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer

*
blog : http://cmoulliard.blogspot.com

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



Re: confused about component parent field

2009-09-28 Thread Pedro Santos
Hi Haulyn, if you call

currentPanel.replaceWith(targetPanel);

an got
java.lang.IllegalStateException: This method can only be called on a
component that has already been added to its parent.

the only thing that can cause that exception is: currentPanel hasn't an
parent.

Work direct with the parent when you swap panels, just to make sure you will
not fall in that exception. You have a list of then right? Use:
parent.replace(childChoicedOnListOfPanelToSwap)

On Sat, Sep 26, 2009 at 10:24 PM, Haulyn R. Jason wrote:

> Hi, all
> I design a component for display a navigation bar with panel swap tech.
> I define a Panel as the name of currentPanel and use DashboardPanel to
> instance it., and define a List to generate the navigation bar.
> Other people will transfer the list to my component, and when the Link be
> clicked, my component will execute these codes:
>
> currentPanel.replaceWith(targetPanel);
> currentPanel = targetPanel;
>
> but I get the following error message:
>
> WicketMessage: Method onLinkClicked of interface
> org.apache.wicket.markup.html.link.ILinkListener targeted at component
> [MarkupContainer [Component id = url]] threw an exception
>
> Root cause:
>
> java.lang.IllegalStateException: This method can only be called on a
> component that has already been added to its parent.
>
>
> I debug the application and I find there is a parent field in the
> currentPanel, in the begining, the value of parent field is "Panel",
> but parent field of targetPanel from the List which is
> transfered from other application is NULL.
>
>
> I am confused on the parent field, who can tell me which part I forget
> to use the panel swapping tech?
>
>
>
> --
> Many thanks!
>
> Haulyn Microproduction
>
> Mobile: +086-15864011231
> email: saharab...@gmail.com, hmp.hau...@foxmail.com
> website: http://haulynjason.net
> gtalk: saharab...@gmail.com
> skype: saharabear
> QQ: 378606292
>
> Haulyn Jason
>



-- 
Pedro Henrique Oliveira dos Santos


Re: avoid setters / getters by using ?

2009-09-28 Thread Erik Post
Blasphemy!! But since we're suggesting unheard of approaches anyway,
you might consider ditching Java in favour of Scala. (Or Groovy? I
would imagine that could help as well.)

Cheers,
Erik

On Mon, Sep 28, 2009 at 5:57 AM, Martin Makundi
 wrote:
>> My intention is how to get rid of these boring setters/getters from service
>> beans that are usually generated only for the purpose of spring-injection.
>
> Well, my solution is:
> 1. Use abstract static service classes that cannot be instantiated.
> 2. Won't need spring.
>
> **
> Martin
>
>>
>> --- On Sun, 9/27/09, Martin Makundi  
>> wrote:
>>
>>> From: Martin Makundi 
>>> Subject: Re: avoid setters / getters by using ?
>>> To: users@wicket.apache.org
>>> Date: Sunday, September 27, 2009, 3:55 PM
>>> At least in wicket you can access the
>>> fields themselves using propertymodels.
>>>
>>> **
>>> Martin
>>>
>>> 2009/9/27 David Chang :
>>> > Hello,
>>> >
>>> > I have Wicket+Spring application. It has a service
>>> object which has a few DAO members. I can use Spring's
>>> autowiring to avoid mentioning the DAO dependencies for the
>>> service bean. However, in the Java program for the service
>>> bean, I still have to add setters and getters for each DAO
>>> member, which I don't like. How can I avoid these setters
>>> and getters? Using AOP? Any examples?
>>> >
>>> > I understand that this question is not strictly a
>>> Wicket, but I definitely want to ask my Wicket friends
>>> here.
>>> >
>>> > Thank you!
>>> >
>>> >
>>> >
>>> >
>>> >
>>> -
>>> > 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



How to run wicket-stuff phonebook example?

2009-09-28 Thread Petr Fejfar
Hi all,

few months ago I've run wicket-stuff phonebook examples and it worked.

No I'd like to study it again, hence I downloaded wicket-stuff from the trunk,
run command  mvn clean install  with result BUILD SUCCESSFUL.

But on command mvn jetty:run, I've got exception:

org.springframework.beans.factory.BeanCreationException:
  Error creating bean with name 'dataSource' defined in class path
resource [common.xml]:
  Instantiation of bean failed; nested exception is
java.lang.NoClassDefFoundError:
  org/apache/commons/pool/impl/GenericObjectPool

I'd expect that Maven will download all modules the example
depends on... What shall I do to make the example running on my machine?


Thanks, Petr

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



Redirections and Reverse-Proxy

2009-09-28 Thread Stéphane Jeanjean

Hello,

I'm using Wicket in a backend which is behind a reverse-proxy.
I understand that Wicket does some redirections even if it's not's 
explicity requested by my code. (perhaps, here, it depends of some 
strategies, but I don't know them)


When a redirection is sent by the back-end the hostname used is the 
reverse proxy host instead of the back-end host. I would like to use the 
back-end host in this response to be able to translate the back-end host 
to front-end host in the reverse-proxy.

What I can see in the reponse :
BackEnd -> 302:http://RPhost/myApp/mypage --> ReverseProxy -> 
302:http://RPhost/myApp/mypage -> Browser

What I would like :
BackEnd -> 302:http://BEhost/myApp/mypage --> ReverseProxy -> 
302:https://RPhost/myApp/mypage -> Browser


I'm using Jetty for my server and mod_proxy in ligthtpd for the reverse 
proxy.


Any idea ?

Thanks,

Stéphane



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