AW: Thanks Wicket-Team!

2009-07-28 Thread Arthur Leigh Allen
Gute Arbeit Leute und viel Erfolg mit dem Projekt.
Ich hoffe wir ziehen auch bald nach :)

Gruß
Arthur





Von: Oliver Krohne 
An: users@wicket.apache.org
Gesendet: Dienstag, den 28. Juli 2009, 13:01:53 Uhr
Betreff: Thanks Wicket-Team!

Hi,

Many thanks to the Wicket-Team for the great Framework and 
of course for the support I have received from the mailinglist.

I started with zero-Wicket knowledge and now 4 month later
we have launched a new community website:

http://fytch.com 

It is based on Wicket, Spring, OpenJPA, Lucene, PostgreSQL.

I would be glad if you try out Fytch and of course any feedback is welcome.
Should I put Fytch on the wiki "Sites using Wicket"?

Thanks for the fabulous Wicket,
Oliver


  

AW: AW: SSL - ajax login

2009-07-28 Thread Arthur Leigh Allen
i use my own (graphic) buttons in wicket.
after getting rid of my own code and just using a modified AjaxFallbackButton 
with overridden getCallbackUrl() method,
the form was submitted but i could see an error in the error console of firefox 
(translated by me):

security error: content from 
http://localhost:8080/projectname/?wicket:interface=:0:2::: is not allowed to 
load data from 
https://localhost:8443/projectname/?wicket:interface=:0:content:container:areaTop:2:panelTop:container:loginForm:buttonLogin:2:IBehaviorListener:0:&random=0.573852961623538

error: uncaught exception: [Exception... "Access to restricted URI denied"  
code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_BAD_URI)"  location: 
"http://localhost:8080/projectname/resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js
 Line: 884"]

is it about cross domain (http and https) AJAX queries?






Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Montag, den 27. Juli 2009, 18:24:20 Uhr
Betreff: Re: AW: SSL - ajax login

hmm, it might be like you said - ajax request with an untrusted cert
might be failing.

it looks from the console like wicket is trying to hit that url, what
you can do is set a breakpoint in wicketfilter and see if that request
ever reaches the server.

-igor

On Mon, Jul 27, 2009 at 4:56 AM, Arthur Leigh
Allen wrote:
> Hi again Igor,
>
> I did the following now:
> I called the website directly with https://localhost:8443/projectname and 
> then I performed a login and it worked.
>
> Any idea?
>
> Thx Arthur
>
>
>
>
> 
> Von: Igor Vaynberg 
> An: users@wicket.apache.org
> Gesendet: Sonntag, den 26. Juli 2009, 22:22:22 Uhr
> Betreff: Re: AW: SSL - ajax login
>
> the href is not a problem; you seeing # appended to the end of the url
> is the correct behavior. what should have happened was the ajax call
> to that https url in the background.
>
> so what you should be looking into is why the ajax call with that
> https url was never made or response from it not processed, since we
> know the url itself works - because you pasted it into the browser and
> it worked. maybe wicket ajax console can give you a clue, firebug also
> has facilities that let you monitor requests being made. you should
> see a call to that https url when you click the link.
>
> -igor
>
> On Sun, Jul 26, 2009 at 1:15 PM, Arthur Leigh
> Allen wrote:
>> Hi Igor,
>>
>> I used Firebug to have a look at the onClick event.
>> I've inspected two links, one usual ajax link and one for the ssl login.
>>
>> 
>>
>> Regarding the first link:
>> href="?wicket:interface=:6:content:container:areaTop:2:panelTop:container:loginForm:linkForgotLogin:container:link::ILinkListener::"
>>
>> onClick="var 
>> wcall=wicketAjaxGet('?wicket:interface=:6:content:container:areaTop:2:panelTop:container:loginForm:linkForgotLogin:container:link::IBehaviorListener:0:',null,null,
>>  function() {return Wicket.$('link141') != null;}.bind(this));return !wcall;"
>>
>> 
>>
>> Regarding the ssl login link:
>> href="#"
>>
>> onClick="var wcall=wicketSubmitFormById('loginForm13b', 
>> 'https://localhost:8443/projectname/?wicket:interface=:6:content:container:areaTop:2:panelTop:container:loginForm:buttonLogin:container:link::IActivePageBehaviorListener:0:&wicket:ignoreIfNotActive=true',
>>  'buttonLogin:container:link' ,null,null, function() {return 
>> Wicket.$$(this)&&Wicket.$$('loginForm13b')}.bind(this));;; return false;"
>>
>> 
>>
>> I clicked on the ssl login link and the page jumped to the anchor # but the 
>> form is not submitted. The symbol # was appended to the address bar of the 
>> browser.
>> I copied the url in the onClick event and entered it manually in the address 
>> bar of my browser. The xml code for the ajax response was shown in the 
>> browser - as known from wicket ajax debug.
>>
>> I guess the problem is the href attribute. I would expect to see an url like 
>> https://localhost:8443/projectname/wicket:interface=:6:content:container:areaTop:2:panelTop:container:loginForm:buttonLogin:container:link::
>>  [etc.]
>>
>> Do you have any idea how I can solve the problem?
>>
>> Thx,
>> Arthur
>>
>>
>>
>>
>>
>>
>>
>> 
>> Von: Igor Vaynberg 
>> An: users@wicket.apache.org
>> Gesendet: Freitag, den 24. Juli 2009, 21:51:48 Uhr
>> Betreff: Re: AW: SSL - ajax login
>>
>> 

AW: the effective ways of wicket models to access database

2009-07-27 Thread Arthur Leigh Allen
what about the LoadableDetachableModel?
 
IModel model = new LoadableDetachableModel() {
    protected Object load() {
    return dao.getX();
    }
};





Von: David Chang 
An: users@wicket.apache.org
Gesendet: Montag, den 27. Juli 2009, 14:20:14 Uhr
Betreff: the effective ways of wicket models to access database


Hello, I am reading <> to learn Wicket. The example on Page 
99 is about teaching detachable models. Here it goes:

---
public class CheeseModel extends Model {
    private Long id;
    private transient Cheese cheese;
        public CheeseModel() {
    }
    public CheeseModel(Cheese cheese) {
        setObject(cheese);
    }
    public CheeseModel(Long id) {
        this.id = id;
    }
    @Override
    public Object getObject() {
        if(cheese != null) return cheese;
        if(id == null ) {
            cheese = new Cheese();
        } else {
            CheeseDao dao = ...
            cheese = dao.getCheese(id);
    }
    return cheese;
    }
    @Override
    public void setObject(Object object) {
        this. cheese = (Cheese)object;
        id = (cheese == null) ? null : cheese.getId();
    }
    @Override
    public void detach() {
        this. cheese = null;
    }
}
---

I would like to know how dao is obtained as indicated as follows:

            CheeseDao dao = ...

Use a locator pattern? Or should I let CheeseModel extend a custom model in 
which dao is set via Spring? Does the latter way create more memory footprint? 
What are the effective ways of getting DAO avaiable to wicket models?

Thanks for your input!

Cheers!


      

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


  

AW: AW: SSL - ajax login

2009-07-27 Thread Arthur Leigh Allen
Hi again Igor,

I did the following now:
I called the website directly with https://localhost:8443/projectname and then 
I performed a login and it worked.

Any idea?

Thx Arthur





Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Sonntag, den 26. Juli 2009, 22:22:22 Uhr
Betreff: Re: AW: SSL - ajax login

the href is not a problem; you seeing # appended to the end of the url
is the correct behavior. what should have happened was the ajax call
to that https url in the background.

so what you should be looking into is why the ajax call with that
https url was never made or response from it not processed, since we
know the url itself works - because you pasted it into the browser and
it worked. maybe wicket ajax console can give you a clue, firebug also
has facilities that let you monitor requests being made. you should
see a call to that https url when you click the link.

-igor

On Sun, Jul 26, 2009 at 1:15 PM, Arthur Leigh
Allen wrote:
> Hi Igor,
>
> I used Firebug to have a look at the onClick event.
> I've inspected two links, one usual ajax link and one for the ssl login.
>
> 
>
> Regarding the first link:
> href="?wicket:interface=:6:content:container:areaTop:2:panelTop:container:loginForm:linkForgotLogin:container:link::ILinkListener::"
>
> onClick="var 
> wcall=wicketAjaxGet('?wicket:interface=:6:content:container:areaTop:2:panelTop:container:loginForm:linkForgotLogin:container:link::IBehaviorListener:0:',null,null,
>  function() {return Wicket.$('link141') != null;}.bind(this));return !wcall;"
>
> 
>
> Regarding the ssl login link:
> href="#"
>
> onClick="var wcall=wicketSubmitFormById('loginForm13b', 
> 'https://localhost:8443/projectname/?wicket:interface=:6:content:container:areaTop:2:panelTop:container:loginForm:buttonLogin:container:link::IActivePageBehaviorListener:0:&wicket:ignoreIfNotActive=true',
>  'buttonLogin:container:link' ,null,null, function() {return 
> Wicket.$$(this)&&Wicket.$$('loginForm13b')}.bind(this));;; return false;"
>
> 
>
> I clicked on the ssl login link and the page jumped to the anchor # but the 
> form is not submitted. The symbol # was appended to the address bar of the 
> browser.
> I copied the url in the onClick event and entered it manually in the address 
> bar of my browser. The xml code for the ajax response was shown in the 
> browser - as known from wicket ajax debug.
>
> I guess the problem is the href attribute. I would expect to see an url like 
> https://localhost:8443/projectname/wicket:interface=:6:content:container:areaTop:2:panelTop:container:loginForm:buttonLogin:container:link::
>  [etc.]
>
> Do you have any idea how I can solve the problem?
>
> Thx,
> Arthur
>
>
>
>
>
>
>
> 
> Von: Igor Vaynberg 
> An: users@wicket.apache.org
> Gesendet: Freitag, den 24. Juli 2009, 21:51:48 Uhr
> Betreff: Re: AW: SSL - ajax login
>
> whatever url you see when hovering over the link is not the url used
> for ajax - not necessarily. you should inspect the onclick handlers.
>
> -igor
>
> On Fri, Jul 24, 2009 at 12:20 PM, Arthur Leigh
> Allen wrote:
>> no, sorry... the url is not changing to http://locahost:8080/projectname/# 
>> but when I hold the mouse pointer over the link, I see the url in the status 
>> bar. When I hold the mouse pointer over other links, I see very long urls a 
>> la http://localhost:8080/projectname/;jsessionid=wicket:interface.
>>
>> But as you suggested, I'll debug the javascript to see the url modifications.
>> Thank you for your support Igor!
>>
>> Have a nice weekend.
>> Greetz, Arthur
>>
>>
>>
>> 
>> Von: Igor Vaynberg 
>> An: users@wicket.apache.org
>> Gesendet: Freitag, den 24. Juli 2009, 17:30:27 Uhr
>> Betreff: Re: AW: SSL - ajax login
>>
>> no, i havent tried it myself. i never had to do an ajax login.
>>
>> the url in the browser changes to http://locahost:8080/projectname/# ?
>> thats fine. the main part is what the actual ajax url is used - you
>> wont see that in the browser's bar. i suggest you use firebug or
>> something similar to walk the javascript and see why your *ajax* url
>> is being mangled.
>>
>> obviously if you return just "https://localhost:8443/projectname"; that
>> will not work because that doesnt have the listener interface target
>> that will hit the behavior in your button.
>>
>> -igor
>>
>>
>> On Fri, Jul 24, 2009 at 2:19 AM, Arthur Leigh
>> Allen w

AW: AW: SSL - ajax login

2009-07-27 Thread Arthur Leigh Allen
I'll try to find out more.
Here is the output from wicket debug console:

---
SSL-Link clicked:

INFO: focus set on link34
INFO: Using XMLHttpRequest transport
INFO:
INFO: Initiating Ajax POST request on 
https://localhost:8443/projectname/;jsessionid=039EAC776571BA623EA885F798AC6A10?wicket:interface=:0:content:container:areaTop:2:panelTop:container:loginForm:buttonLogin:container:link::IBehaviorListener:0:&random=0.30097839823986994
INFO: Invoking pre-call handler(s)... (<-- no answer/response)
INFO: focus removed from link76
INFO: focus set on link7b
INFO: Channel busy - postponing... (<-- shown when a different link is clicked)

Usual Link clicked:
INFO: focus set on link7b
INFO: Using XMLHttpRequest transport
INFO:
INFO: Initiating Ajax GET request on 
?wicket:interface=:2:content:container:areaTop:2:panelTop:container:loginForm:linkForgotLogin:container:link::IBehaviorListener:0:&random=0.39846398226416335
INFO: Invoking pre-call handler(s)...
INFO: Received ajax response (20795 characters)
INFO:
...
INFO: Response parsed. Now invoking steps...
INFO: setHistoryItem: 1
INFO: setHistoryItem: 2
INFO: Response processed successfully.
INFO: Invoking post-call handler(s)...
INFO: Couldn't set focus on  not on the page anymore
---

btw: I'm using an own made ssl certificate for testing purposes, so it's not 
trustable.
Could it be because of that?

For example: When using a non ajax ssl link the browser (IE) ask me if I'd like 
to proceed.
Only if I proceed, the website is loaded/shown.
If it's an ajax ssl call, maybe there is no way to ask the user whether he want 
to proceed or not.

Arthur

 




Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Sonntag, den 26. Juli 2009, 22:22:22 Uhr
Betreff: Re: AW: SSL - ajax login

the href is not a problem; you seeing # appended to the end of the url
is the correct behavior. what should have happened was the ajax call
to that https url in the background.

so what you should be looking into is why the ajax call with that
https url was never made or response from it not processed, since we
know the url itself works - because you pasted it into the browser and
it worked. maybe wicket ajax console can give you a clue, firebug also
has facilities that let you monitor requests being made. you should
see a call to that https url when you click the link.

-igor

On Sun, Jul 26, 2009 at 1:15 PM, Arthur Leigh
Allen wrote:
> Hi Igor,
>
> I used Firebug to have a look at the onClick event.
> I've inspected two links, one usual ajax link and one for the ssl login.
>
> 
>
> Regarding the first link:
> href="?wicket:interface=:6:content:container:areaTop:2:panelTop:container:loginForm:linkForgotLogin:container:link::ILinkListener::"
>
> onClick="var 
> wcall=wicketAjaxGet('?wicket:interface=:6:content:container:areaTop:2:panelTop:container:loginForm:linkForgotLogin:container:link::IBehaviorListener:0:',null,null,
>  function() {return Wicket.$('link141') != null;}.bind(this));return !wcall;"
>
> 
>
> Regarding the ssl login link:
> href="#"
>
> onClick="var wcall=wicketSubmitFormById('loginForm13b', 
> 'https://localhost:8443/projectname/?wicket:interface=:6:content:container:areaTop:2:panelTop:container:loginForm:buttonLogin:container:link::IActivePageBehaviorListener:0:&wicket:ignoreIfNotActive=true',
>  'buttonLogin:container:link' ,null,null, function() {return 
> Wicket.$$(this)&&Wicket.$$('loginForm13b')}.bind(this));;; return false;"
>
> 
>
> I clicked on the ssl login link and the page jumped to the anchor # but the 
> form is not submitted. The symbol # was appended to the address bar of the 
> browser.
> I copied the url in the onClick event and entered it manually in the address 
> bar of my browser. The xml code for the ajax response was shown in the 
> browser - as known from wicket ajax debug.
>
> I guess the problem is the href attribute. I would expect to see an url like 
> https://localhost:8443/projectname/wicket:interface=:6:content:container:areaTop:2:panelTop:container:loginForm:buttonLogin:container:link::
>  [etc.]
>
> Do you have any idea how I can solve the problem?
>
> Thx,
> Arthur
>
>
>
>
>
>
>
> 
> Von: Igor Vaynberg 
> An: users@wicket.apache.org
> Gesendet: Freitag, den 24. Juli 2009, 21:51:48 Uhr
> Betreff: Re: AW: SSL - ajax login
>
> whatever url you see when hovering over the link is not the url used
> for ajax - not necessarily. you should inspect the onclick handlers.
>
> -igor
>
> On Fri, Jul 24, 2009 at 12:20 PM, Arthur Leigh
> Allen wrote:
>> no, sorry... the url is not changing to http://locahost:8080/proj

AW: AW: SSL - ajax login

2009-07-26 Thread Arthur Leigh Allen
btw: the xml code I saw showed me, that the login was successfully executed 
because login content was presented in the xml code.





Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Freitag, den 24. Juli 2009, 21:51:48 Uhr
Betreff: Re: AW: SSL - ajax login

whatever url you see when hovering over the link is not the url used
for ajax - not necessarily. you should inspect the onclick handlers.

-igor

On Fri, Jul 24, 2009 at 12:20 PM, Arthur Leigh
Allen wrote:
> no, sorry... the url is not changing to http://locahost:8080/projectname/# 
> but when I hold the mouse pointer over the link, I see the url in the status 
> bar. When I hold the mouse pointer over other links, I see very long urls a 
> la http://localhost:8080/projectname/;jsessionid=wicket:interface.
>
> But as you suggested, I'll debug the javascript to see the url modifications.
> Thank you for your support Igor!
>
> Have a nice weekend.
> Greetz, Arthur
>
>
>
> 
> Von: Igor Vaynberg 
> An: users@wicket.apache.org
> Gesendet: Freitag, den 24. Juli 2009, 17:30:27 Uhr
> Betreff: Re: AW: SSL - ajax login
>
> no, i havent tried it myself. i never had to do an ajax login.
>
> the url in the browser changes to http://locahost:8080/projectname/# ?
> thats fine. the main part is what the actual ajax url is used - you
> wont see that in the browser's bar. i suggest you use firebug or
> something similar to walk the javascript and see why your *ajax* url
> is being mangled.
>
> obviously if you return just "https://localhost:8443/projectname"; that
> will not work because that doesnt have the listener interface target
> that will hit the behavior in your button.
>
> -igor
>
>
> On Fri, Jul 24, 2009 at 2:19 AM, Arthur Leigh
> Allen wrote:
>> Hi Igor,
>>
>> I tried to do it as simple as possible so I returned 
>> https://localhost:8443/projectname in the overridden method getCallbackUrl 
>> of AjaxFormSubmitBehavior. The result was the same. The link pointed to the 
>> url http://locahost:8080/projectname/#. It seems to me that only relative 
>> pathes can be returned, else the standard url will be used.
>>
>> I wanted to understand how the given url is used in wicket. I found the 
>> method wicketAjaxGet in wicket-ajax.js. There the url is passed to 
>> Wicket.Ajax.Call(...). I couldn't trace the call deeper because I couldn't 
>> find Call() in any javascript file.
>>
>> Have you tried it yourself Igor? Does it work?
>> I'm using wicket 1.3.5. Does it depend on the version I use?
>>
>> Is there a different entry point to manipulate the url for ajax calls?
>>
>> Thx again
>> Arthur
>>
>>
>>
>> 
>> Von: Igor Vaynberg 
>> An: users@wicket.apache.org
>> Gesendet: Donnerstag, den 23. Juli 2009, 16:37:22 Uhr
>> Betreff: Re: AW: SSL - ajax login
>>
>> javascript invokes the url you give it, so it looked like it should
>> work. you might have to trace deeper to see whats going on.
>>
>> -igor
>>
>> On Thu, Jul 23, 2009 at 4:41 AM, Arthur Leigh
>> Allen wrote:
>>> Hi Igor,
>>>
>>> I did it as you said.
>>> I took the code from AjaxFallbackButton and I copied it to an own class.
>>> In the constructor I overwrite the getCallbackUrl() method of the 
>>> AjaxFormSubmitBehavior.
>>> I added the value https://localhost:8443/projectname/ as a prefix to 
>>> super.getCallbackUrl().
>>> By the way: getCallbackUrl() returns a long relative url beginning with 
>>> ";sessionid".
>>> So my url is https://localhost:8443/projectname/;sessionid...
>>>
>>> When starting tomcat and accessing the website, the url wasn't applied.
>>> When clicking the link, the url http://localhost:8080/projectname/# was 
>>> called.
>>> I believe it's the wrong place to manipulate the url. Maybe it is expected 
>>> to return a relative path
>>> beginning with ";sessionid". That url is maybe manipulated at a different 
>>> place, so in my case the
>>> end result would be 
>>> http://localhost:8080/projectname/https://localhost:8443/projectname/;sessionid.
>>> That would result in an error and maybe 
>>> http://localhost:8080/projectname/# is used therefore.
>>>
>>> Am I wrong?
>>>
>>> Thx
>>> Arthur
>>>
>>>
>>>
>>>
>>> 
>>> Von: Igor Vaynberg 
>>> An: users@wick

AW: AW: SSL - ajax login

2009-07-26 Thread Arthur Leigh Allen
Hi Igor,

I used Firebug to have a look at the onClick event.
I've inspected two links, one usual ajax link and one for the ssl login.



Regarding the first link:
href="?wicket:interface=:6:content:container:areaTop:2:panelTop:container:loginForm:linkForgotLogin:container:link::ILinkListener::"

onClick="var 
wcall=wicketAjaxGet('?wicket:interface=:6:content:container:areaTop:2:panelTop:container:loginForm:linkForgotLogin:container:link::IBehaviorListener:0:',null,null,
 function() {return Wicket.$('link141') != null;}.bind(this));return !wcall;"



Regarding the ssl login link:
href="#"

onClick="var wcall=wicketSubmitFormById('loginForm13b', 
'https://localhost:8443/projectname/?wicket:interface=:6:content:container:areaTop:2:panelTop:container:loginForm:buttonLogin:container:link::IActivePageBehaviorListener:0:&wicket:ignoreIfNotActive=true',
 'buttonLogin:container:link' ,null,null, function() {return 
Wicket.$$(this)&&Wicket.$$('loginForm13b')}.bind(this));;; return false;"



I clicked on the ssl login link and the page jumped to the anchor # but the 
form is not submitted. The symbol # was appended to the address bar of the 
browser.
I copied the url in the onClick event and entered it manually in the address 
bar of my browser. The xml code for the ajax response was shown in the browser 
- as known from wicket ajax debug.

I guess the problem is the href attribute. I would expect to see an url like 
https://localhost:8443/projectname/wicket:interface=:6:content:container:areaTop:2:panelTop:container:loginForm:buttonLogin:container:link::
 [etc.]

Do you have any idea how I can solve the problem?

Thx,
Arthur



 




Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Freitag, den 24. Juli 2009, 21:51:48 Uhr
Betreff: Re: AW: SSL - ajax login

whatever url you see when hovering over the link is not the url used
for ajax - not necessarily. you should inspect the onclick handlers.

-igor

On Fri, Jul 24, 2009 at 12:20 PM, Arthur Leigh
Allen wrote:
> no, sorry... the url is not changing to http://locahost:8080/projectname/# 
> but when I hold the mouse pointer over the link, I see the url in the status 
> bar. When I hold the mouse pointer over other links, I see very long urls a 
> la http://localhost:8080/projectname/;jsessionid=wicket:interface.
>
> But as you suggested, I'll debug the javascript to see the url modifications.
> Thank you for your support Igor!
>
> Have a nice weekend.
> Greetz, Arthur
>
>
>
> 
> Von: Igor Vaynberg 
> An: users@wicket.apache.org
> Gesendet: Freitag, den 24. Juli 2009, 17:30:27 Uhr
> Betreff: Re: AW: SSL - ajax login
>
> no, i havent tried it myself. i never had to do an ajax login.
>
> the url in the browser changes to http://locahost:8080/projectname/# ?
> thats fine. the main part is what the actual ajax url is used - you
> wont see that in the browser's bar. i suggest you use firebug or
> something similar to walk the javascript and see why your *ajax* url
> is being mangled.
>
> obviously if you return just "https://localhost:8443/projectname"; that
> will not work because that doesnt have the listener interface target
> that will hit the behavior in your button.
>
> -igor
>
>
> On Fri, Jul 24, 2009 at 2:19 AM, Arthur Leigh
> Allen wrote:
>> Hi Igor,
>>
>> I tried to do it as simple as possible so I returned 
>> https://localhost:8443/projectname in the overridden method getCallbackUrl 
>> of AjaxFormSubmitBehavior. The result was the same. The link pointed to the 
>> url http://locahost:8080/projectname/#. It seems to me that only relative 
>> pathes can be returned, else the standard url will be used.
>>
>> I wanted to understand how the given url is used in wicket. I found the 
>> method wicketAjaxGet in wicket-ajax.js. There the url is passed to 
>> Wicket.Ajax.Call(...). I couldn't trace the call deeper because I couldn't 
>> find Call() in any javascript file.
>>
>> Have you tried it yourself Igor? Does it work?
>> I'm using wicket 1.3.5. Does it depend on the version I use?
>>
>> Is there a different entry point to manipulate the url for ajax calls?
>>
>> Thx again
>> Arthur
>>
>>
>>
>> 
>> Von: Igor Vaynberg 
>> An: users@wicket.apache.org
>> Gesendet: Donnerstag, den 23. Juli 2009, 16:37:22 Uhr
>> Betreff: Re: AW: SSL - ajax login
>>
>> javascript invokes the url you give it, so it looked like it should
>> work. you might have to trace deeper to see whats going on.
>>
>> -igor
>&g

AW: AW: SSL - ajax login

2009-07-24 Thread Arthur Leigh Allen
no, sorry... the url is not changing to http://locahost:8080/projectname/# but 
when I hold the mouse pointer over the link, I see the url in the status bar. 
When I hold the mouse pointer over other links, I see very long urls a la 
http://localhost:8080/projectname/;jsessionid=wicket:interface.

But as you suggested, I'll debug the javascript to see the url modifications.
Thank you for your support Igor!

Have a nice weekend.
Greetz, Arthur




Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Freitag, den 24. Juli 2009, 17:30:27 Uhr
Betreff: Re: AW: SSL - ajax login

no, i havent tried it myself. i never had to do an ajax login.

the url in the browser changes to http://locahost:8080/projectname/# ?
thats fine. the main part is what the actual ajax url is used - you
wont see that in the browser's bar. i suggest you use firebug or
something similar to walk the javascript and see why your *ajax* url
is being mangled.

obviously if you return just "https://localhost:8443/projectname"; that
will not work because that doesnt have the listener interface target
that will hit the behavior in your button.

-igor


On Fri, Jul 24, 2009 at 2:19 AM, Arthur Leigh
Allen wrote:
> Hi Igor,
>
> I tried to do it as simple as possible so I returned 
> https://localhost:8443/projectname in the overridden method getCallbackUrl of 
> AjaxFormSubmitBehavior. The result was the same. The link pointed to the url 
> http://locahost:8080/projectname/#. It seems to me that only relative pathes 
> can be returned, else the standard url will be used.
>
> I wanted to understand how the given url is used in wicket. I found the 
> method wicketAjaxGet in wicket-ajax.js. There the url is passed to 
> Wicket.Ajax.Call(...). I couldn't trace the call deeper because I couldn't 
> find Call() in any javascript file.
>
> Have you tried it yourself Igor? Does it work?
> I'm using wicket 1.3.5. Does it depend on the version I use?
>
> Is there a different entry point to manipulate the url for ajax calls?
>
> Thx again
> Arthur
>
>
>
> 
> Von: Igor Vaynberg 
> An: users@wicket.apache.org
> Gesendet: Donnerstag, den 23. Juli 2009, 16:37:22 Uhr
> Betreff: Re: AW: SSL - ajax login
>
> javascript invokes the url you give it, so it looked like it should
> work. you might have to trace deeper to see whats going on.
>
> -igor
>
> On Thu, Jul 23, 2009 at 4:41 AM, Arthur Leigh
> Allen wrote:
>> Hi Igor,
>>
>> I did it as you said.
>> I took the code from AjaxFallbackButton and I copied it to an own class.
>> In the constructor I overwrite the getCallbackUrl() method of the 
>> AjaxFormSubmitBehavior.
>> I added the value https://localhost:8443/projectname/ as a prefix to 
>> super.getCallbackUrl().
>> By the way: getCallbackUrl() returns a long relative url beginning with 
>> ";sessionid".
>> So my url is https://localhost:8443/projectname/;sessionid...
>>
>> When starting tomcat and accessing the website, the url wasn't applied.
>> When clicking the link, the url http://localhost:8080/projectname/# was 
>> called.
>> I believe it's the wrong place to manipulate the url. Maybe it is expected 
>> to return a relative path
>> beginning with ";sessionid". That url is maybe manipulated at a different 
>> place, so in my case the
>> end result would be 
>> http://localhost:8080/projectname/https://localhost:8443/projectname/;sessionid.
>> That would result in an error and maybe 
>> http://localhost:8080/projectname/# is used therefore.
>>
>> Am I wrong?
>>
>> Thx
>> Arthur
>>
>>
>>
>>
>> 
>> Von: Igor Vaynberg 
>> An: users@wicket.apache.org
>> Gesendet: Mittwoch, den 22. Juli 2009, 18:31:27 Uhr
>> Betreff: Re: AW: SSL - ajax login
>>
>> ah, i thought i replied already because i looked into this yesterday.
>>
>> you will have to roll your own button. i would recommend looking at
>> the sourcecode of the default button. when you add the
>> formsubmitbehavior in your button you can override getcallbackurl()
>> and append https to it.
>>
>> -igor
>>
>> On Wed, Jul 22, 2009 at 2:37 AM, Arthur Leigh
>> Allen wrote:
>>> Hi again,
>>>
>>> I need to know if it's possible to switch to SSL via button or form.
>>> Otherwise I have to switch back to wicket 1.3.5. I'm in hurry because
>>> we will go online within the next 10-14 days.
>>>
>>> Can anyone give me a prompt answer please?
>>>
>>> Thx & Best r

AW: AW: AW: SSL - ajax login

2009-07-24 Thread Arthur Leigh Allen
"I wanted to understand how the given url is used in wicket. I found the method 
wicketAjaxGet in wicket-ajax.js. There the url is passed to 
Wicket.Ajax.Call(...). I couldn't trace the call deeper because I couldn't find 
Call() in any javascript file."

Sorry I was blind yesterday, I found it today
However I would appreciate a response to the other questions.

Thx
Arthur




________
Von: Arthur Leigh Allen 
An: users@wicket.apache.org
Gesendet: Freitag, den 24. Juli 2009, 11:19:23 Uhr
Betreff: AW: AW: SSL - ajax login

Hi Igor,

I tried to do it as simple as possible so I returned 
https://localhost:8443/projectname in the overridden method getCallbackUrl of 
AjaxFormSubmitBehavior. The result was the same. The link pointed to the url 
http://locahost:8080/projectname/#. It seems to me that only relative pathes 
can be returned, else the standard url will be used.

I wanted to understand how the given url is used in wicket. I found the method 
wicketAjaxGet in wicket-ajax.js. There the url is passed to 
Wicket.Ajax.Call(...). I couldn't trace the call deeper because I couldn't find 
Call() in any javascript file.

Have you tried it yourself Igor? Does it work?
I'm using wicket 1.3.5. Does it depend on the version I use?

Is there a different entry point to manipulate the url for ajax calls?

Thx again
Arthur




Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Donnerstag, den 23. Juli 2009, 16:37:22 Uhr
Betreff: Re: AW: SSL - ajax login

javascript invokes the url you give it, so it looked like it should
work. you might have to trace deeper to see whats going on.

-igor

On Thu, Jul 23, 2009 at 4:41 AM, Arthur Leigh
Allen wrote:
> Hi Igor,
>
> I did it as you said.
> I took the code from AjaxFallbackButton and I copied it to an own class.
> In the constructor I overwrite the getCallbackUrl() method of the 
> AjaxFormSubmitBehavior.
> I added the value https://localhost:8443/projectname/ as a prefix to 
> super.getCallbackUrl().
> By the way: getCallbackUrl() returns a long relative url beginning with 
> ";sessionid".
> So my url is https://localhost:8443/projectname/;sessionid...
>
> When starting tomcat and accessing the website, the url wasn't applied.
> When clicking the link, the url http://localhost:8080/projectname/# was 
> called.
> I believe it's the wrong place to manipulate the url. Maybe it is expected to 
> return a relative path
> beginning with ";sessionid". That url is maybe manipulated at a different 
> place, so in my case the
> end result would be 
> http://localhost:8080/projectname/https://localhost:8443/projectname/;sessionid.
> That would result in an error and maybe 
> http://localhost:8080/projectname/# is used therefore.
>
> Am I wrong?
>
> Thx
> Arthur
>
>
>
>
> 
> Von: Igor Vaynberg 
> An: users@wicket.apache.org
> Gesendet: Mittwoch, den 22. Juli 2009, 18:31:27 Uhr
> Betreff: Re: AW: SSL - ajax login
>
> ah, i thought i replied already because i looked into this yesterday.
>
> you will have to roll your own button. i would recommend looking at
> the sourcecode of the default button. when you add the
> formsubmitbehavior in your button you can override getcallbackurl()
> and append https to it.
>
> -igor
>
> On Wed, Jul 22, 2009 at 2:37 AM, Arthur Leigh
> Allen wrote:
>> Hi again,
>>
>> I need to know if it's possible to switch to SSL via button or form.
>> Otherwise I have to switch back to wicket 1.3.5. I'm in hurry because
>> we will go online within the next 10-14 days.
>>
>> Can anyone give me a prompt answer please?
>>
>> Thx & Best regards
>> Arthur
>>
>>
>>
>> 
>> Von: Arthur Leigh Allen 
>> An: users@wicket.apache.org
>> Gesendet: Dienstag, den 21. Juli 2009, 19:18:18 Uhr
>> Betreff: AW: SSL - ajax login
>>
>> Hello Igor,
>>
>> thanks for your early reply.
>> Yes, my login form is submitted via ajax.
>>
>> public class BasePage {
>>
>>     public void switchViaAjax(...) { ... }
>>     public void navigateViaAjax(...) { ... }
>>
>> }
>>
>> @RequireHttps
>> public class SSLForm extends Form { ... }
>>
>> public class LoginPanel {
>>
>>     public LoginPanel() { ... }
>>
>>     public create() {
>>     SSLForm form = new SSLForm("loginForm");
>>     form.add(username);
>>     form.add(password);
>>
>>     AjaxFallbackButton loginButton = new 
>> AjaxFallbackButton("loginButton", form) {
>>     prote

AW: AW: SSL - ajax login

2009-07-24 Thread Arthur Leigh Allen
Hi Igor,

I tried to do it as simple as possible so I returned 
https://localhost:8443/projectname in the overridden method getCallbackUrl of 
AjaxFormSubmitBehavior. The result was the same. The link pointed to the url 
http://locahost:8080/projectname/#. It seems to me that only relative pathes 
can be returned, else the standard url will be used.

I wanted to understand how the given url is used in wicket. I found the method 
wicketAjaxGet in wicket-ajax.js. There the url is passed to 
Wicket.Ajax.Call(...). I couldn't trace the call deeper because I couldn't find 
Call() in any javascript file.

Have you tried it yourself Igor? Does it work?
I'm using wicket 1.3.5. Does it depend on the version I use?

Is there a different entry point to manipulate the url for ajax calls?

Thx again
Arthur




Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Donnerstag, den 23. Juli 2009, 16:37:22 Uhr
Betreff: Re: AW: SSL - ajax login

javascript invokes the url you give it, so it looked like it should
work. you might have to trace deeper to see whats going on.

-igor

On Thu, Jul 23, 2009 at 4:41 AM, Arthur Leigh
Allen wrote:
> Hi Igor,
>
> I did it as you said.
> I took the code from AjaxFallbackButton and I copied it to an own class.
> In the constructor I overwrite the getCallbackUrl() method of the 
> AjaxFormSubmitBehavior.
> I added the value https://localhost:8443/projectname/ as a prefix to 
> super.getCallbackUrl().
> By the way: getCallbackUrl() returns a long relative url beginning with 
> ";sessionid".
> So my url is https://localhost:8443/projectname/;sessionid...
>
> When starting tomcat and accessing the website, the url wasn't applied.
> When clicking the link, the url http://localhost:8080/projectname/# was 
> called.
> I believe it's the wrong place to manipulate the url. Maybe it is expected to 
> return a relative path
> beginning with ";sessionid". That url is maybe manipulated at a different 
> place, so in my case the
> end result would be 
> http://localhost:8080/projectname/https://localhost:8443/projectname/;sessionid.
> That would result in an error and maybe 
> http://localhost:8080/projectname/# is used therefore.
>
> Am I wrong?
>
> Thx
> Arthur
>
>
>
>
> 
> Von: Igor Vaynberg 
> An: users@wicket.apache.org
> Gesendet: Mittwoch, den 22. Juli 2009, 18:31:27 Uhr
> Betreff: Re: AW: SSL - ajax login
>
> ah, i thought i replied already because i looked into this yesterday.
>
> you will have to roll your own button. i would recommend looking at
> the sourcecode of the default button. when you add the
> formsubmitbehavior in your button you can override getcallbackurl()
> and append https to it.
>
> -igor
>
> On Wed, Jul 22, 2009 at 2:37 AM, Arthur Leigh
> Allen wrote:
>> Hi again,
>>
>> I need to know if it's possible to switch to SSL via button or form.
>> Otherwise I have to switch back to wicket 1.3.5. I'm in hurry because
>> we will go online within the next 10-14 days.
>>
>> Can anyone give me a prompt answer please?
>>
>> Thx & Best regards
>> Arthur
>>
>>
>>
>> 
>> Von: Arthur Leigh Allen 
>> An: users@wicket.apache.org
>> Gesendet: Dienstag, den 21. Juli 2009, 19:18:18 Uhr
>> Betreff: AW: SSL - ajax login
>>
>> Hello Igor,
>>
>> thanks for your early reply.
>> Yes, my login form is submitted via ajax.
>>
>> public class BasePage {
>>
>>     public void switchViaAjax(...) { ... }
>>     public void navigateViaAjax(...) { ... }
>>
>> }
>>
>> @RequireHttps
>> public class SSLForm extends Form { ... }
>>
>> public class LoginPanel {
>>
>>     public LoginPanel() { ... }
>>
>>     public create() {
>>     SSLForm form = new SSLForm("loginForm");
>>     form.add(username);
>>     form.add(password);
>>
>>     AjaxFallbackButton loginButton = new 
>> AjaxFallbackButton("loginButton", form) {
>>     protected void onSubmit(AjaxRequestTarget target, Form form) {
>>     // perform login => login is done via http
>>     }
>>     }
>>     }
>> }
>>
>> As you said @RequireSSL is for pages.
>> Do you have any idea how I can remove @RequireHttps from the top of my 
>> BasePage and switch to https on login?
>> Currently I think the only way to provide a ssl ajax call is to show the 
>> base page via ssl as a starting basis.
>>
>> Therefore I have to use @RequireSSL on the Base

AW: AW: SSL - ajax login

2009-07-23 Thread Arthur Leigh Allen
Hi Igor,

I did it as you said.
I took the code from AjaxFallbackButton and I copied it to an own class.
In the constructor I overwrite the getCallbackUrl() method of the 
AjaxFormSubmitBehavior.
I added the value https://localhost:8443/projectname/ as a prefix to 
super.getCallbackUrl().
By the way: getCallbackUrl() returns a long relative url beginning with 
";sessionid".
So my url is https://localhost:8443/projectname/;sessionid...

When starting tomcat and accessing the website, the url wasn't applied.
When clicking the link, the url http://localhost:8080/projectname/# was called.
I believe it's the wrong place to manipulate the url. Maybe it is expected to 
return a relative path
beginning with ";sessionid". That url is maybe manipulated at a different 
place, so in my case the
end result would be 
http://localhost:8080/projectname/https://localhost:8443/projectname/;sessionid.
That would result in an error and maybe http://localhost:8080/projectname/# is 
used therefore.

Am I wrong?

Thx
Arthur





Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Mittwoch, den 22. Juli 2009, 18:31:27 Uhr
Betreff: Re: AW: SSL - ajax login

ah, i thought i replied already because i looked into this yesterday.

you will have to roll your own button. i would recommend looking at
the sourcecode of the default button. when you add the
formsubmitbehavior in your button you can override getcallbackurl()
and append https to it.

-igor

On Wed, Jul 22, 2009 at 2:37 AM, Arthur Leigh
Allen wrote:
> Hi again,
>
> I need to know if it's possible to switch to SSL via button or form.
> Otherwise I have to switch back to wicket 1.3.5. I'm in hurry because
> we will go online within the next 10-14 days.
>
> Can anyone give me a prompt answer please?
>
> Thx & Best regards
> Arthur
>
>
>
> 
> Von: Arthur Leigh Allen 
> An: users@wicket.apache.org
> Gesendet: Dienstag, den 21. Juli 2009, 19:18:18 Uhr
> Betreff: AW: SSL - ajax login
>
> Hello Igor,
>
> thanks for your early reply.
> Yes, my login form is submitted via ajax.
>
> public class BasePage {
>
>     public void switchViaAjax(...) { ... }
>     public void navigateViaAjax(...) { ... }
>
> }
>
> @RequireHttps
> public class SSLForm extends Form { ... }
>
> public class LoginPanel {
>
>     public LoginPanel() { ... }
>
>     public create() {
>     SSLForm form = new SSLForm("loginForm");
>     form.add(username);
>     form.add(password);
>
>     AjaxFallbackButton loginButton = new 
> AjaxFallbackButton("loginButton", form) {
>     protected void onSubmit(AjaxRequestTarget target, Form form) {
>     // perform login => login is done via http
>     }
>     }
>     }
> }
>
> As you said @RequireSSL is for pages.
> Do you have any idea how I can remove @RequireHttps from the top of my 
> BasePage and switch to https on login?
> Currently I think the only way to provide a ssl ajax call is to show the 
> base page via ssl as a starting basis.
>
> Therefore I have to use @RequireSSL on the BasePage but that means every 
> communication is done via ssl
> and that means more server ballast and a slower page refresh.
>
> Greetings
> Arthur
>
>
>
> 
> Von: Igor Vaynberg 
> An: users@wicket.apache.org
> Gesendet: Dienstag, den 21. Juli 2009, 18:08:48 Uhr
> Betreff: Re: SSL - ajax login
>
> @RequreHttps is meant to be a page-level feature, so it doesnt fit your 
> usecase.
>
> is your login form submitted via ajax?
>
> show us the code to sslform, your login form - making sure to include
> the code to the component that submits it.
>
> -igor
>
> On Tue, Jul 21, 2009 at 8:34 AM, Arthur Leigh
> Allen wrote:
>> Hello folks,
>>
>> I'm using wicket 1.4 RC7 now and I have a question regarding the usage of 
>> ssl.
>> I use the HttpsRequestCycleProcessor with the annotation @RequireHttps.
>>
>> Imagine the following case like it is realized on different sites like 
>> web.de or gmx.de as well as xing.com.
>> The first call will result in a http url. If you enter your login name and 
>> your password and submit the form,
>> then the form will be send via https.
>>
>> I only have one page. Everything on my page is exchanged via ajax. The login 
>> is also done via ajax.
>> Currently I use the annotation above for my BasePage but from the first 
>> call, the whole communication
>> is done with ssl.
>>
>> What I would like to realize is: Using the @RequireHttps annotation on forms 
>> or sub

AW: AW: SSL - ajax login

2009-07-22 Thread Arthur Leigh Allen


that's a good hint, thanks a lot
i already switched back to wicket 1.3.5 because there are too many changes and 
the time is too short to makes such changes now

i'll try your suggestion



Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Mittwoch, den 22. Juli 2009, 18:31:27 Uhr
Betreff: Re: AW: SSL - ajax login

ah, i thought i replied already because i looked into this yesterday.

you will have to roll your own button. i would recommend looking at
the sourcecode of the default button. when you add the
formsubmitbehavior in your button you can override getcallbackurl()
and append https to it.

-igor

On Wed, Jul 22, 2009 at 2:37 AM, Arthur Leigh
Allen wrote:
> Hi again,
>
> I need to know if it's possible to switch to SSL via button or form.
> Otherwise I have to switch back to wicket 1.3.5. I'm in hurry because
> we will go online within the next 10-14 days.
>
> Can anyone give me a prompt answer please?
>
> Thx & Best regards
> Arthur
>
>
>
> 
> Von: Arthur Leigh Allen 
> An: users@wicket.apache.org
> Gesendet: Dienstag, den 21. Juli 2009, 19:18:18 Uhr
> Betreff: AW: SSL - ajax login
>
> Hello Igor,
>
> thanks for your early reply.
> Yes, my login form is submitted via ajax.
>
> public class BasePage {
>
>     public void switchViaAjax(...) { ... }
>     public void navigateViaAjax(...) { ... }
>
> }
>
> @RequireHttps
> public class SSLForm extends Form { ... }
>
> public class LoginPanel {
>
>     public LoginPanel() { ... }
>
>     public create() {
>     SSLForm form = new SSLForm("loginForm");
>     form.add(username);
>     form.add(password);
>
>     AjaxFallbackButton loginButton = new 
> AjaxFallbackButton("loginButton", form) {
>     protected void onSubmit(AjaxRequestTarget target, Form form) {
>     // perform login => login is done via http
>     }
>     }
>     }
> }
>
> As you said @RequireSSL is for pages.
> Do you have any idea how I can remove @RequireHttps from the top of my 
> BasePage and switch to https on login?
> Currently I think the only way to provide a ssl ajax call is to show the 
> base page via ssl as a starting basis.
>
> Therefore I have to use @RequireSSL on the BasePage but that means every 
> communication is done via ssl
> and that means more server ballast and a slower page refresh.
>
> Greetings
> Arthur
>
>
>
> 
> Von: Igor Vaynberg 
> An: users@wicket.apache.org
> Gesendet: Dienstag, den 21. Juli 2009, 18:08:48 Uhr
> Betreff: Re: SSL - ajax login
>
> @RequreHttps is meant to be a page-level feature, so it doesnt fit your 
> usecase.
>
> is your login form submitted via ajax?
>
> show us the code to sslform, your login form - making sure to include
> the code to the component that submits it.
>
> -igor
>
> On Tue, Jul 21, 2009 at 8:34 AM, Arthur Leigh
> Allen wrote:
>> Hello folks,
>>
>> I'm using wicket 1.4 RC7 now and I have a question regarding the usage of 
>> ssl.
>> I use the HttpsRequestCycleProcessor with the annotation @RequireHttps.
>>
>> Imagine the following case like it is realized on different sites like 
>> web.de or gmx.de as well as xing.com.
>> The first call will result in a http url. If you enter your login name and 
>> your password and submit the form,
>> then the form will be send via https.
>>
>> I only have one page. Everything on my page is exchanged via ajax. The login 
>> is also done via ajax.
>> Currently I use the annotation above for my BasePage but from the first 
>> call, the whole communication
>> is done with ssl.
>>
>> What I would like to realize is: Using the @RequireHttps annotation on forms 
>> or submit buttons.
>> I implemented an own SSLForm class extending the wicket form class with the 
>> annotation.
>> But when I use the SSLForm for my login, the communication is done without 
>> ssl.
>> I would like to use my page via http, but the ajax login should be done with 
>> ssl.
>>
>> The only thing I can do now is:
>> -page completely with ssl
>> -page completely without ssl
>>
>> I would appreciate any help.
>>
>> Best regards,
>> Arthur
>>
>>
>>
>
> -
> 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


  

AW: AW: SSL - ajax login

2009-07-22 Thread Arthur Leigh Allen
Hi again,

I need to know if it's possible to switch to SSL via button or form.
Otherwise I have to switch back to wicket 1.3.5. I'm in hurry because
we will go online within the next 10-14 days.

Can anyone give me a prompt answer please?

Thx & Best regards
Arthur



____
Von: Arthur Leigh Allen 
An: users@wicket.apache.org
Gesendet: Dienstag, den 21. Juli 2009, 19:18:18 Uhr
Betreff: AW: SSL - ajax login

Hello Igor,

thanks for your early reply.
Yes, my login form is submitted via ajax.

public class BasePage {
    
    public void switchViaAjax(...) { ... }
    public void navigateViaAjax(...) { ... }

}

@RequireHttps
public class SSLForm extends Form { ... }

public class LoginPanel {

    public LoginPanel() { ... }

    public create() {
    SSLForm form = new SSLForm("loginForm");
    form.add(username);
    form.add(password);
    
    AjaxFallbackButton loginButton = new AjaxFallbackButton("loginButton", 
form) {
    protected void onSubmit(AjaxRequestTarget target, Form form) {
    // perform login => login is done via http
    }
    }
    }
}

As you said @RequireSSL is for pages.
Do you have any idea how I can remove @RequireHttps from the top of my BasePage 
and switch to https on login?
Currently I think the only way to provide a ssl ajax call is to show the 
base page via ssl as a starting basis.

Therefore I have to use @RequireSSL on the BasePage but that means every 
communication is done via ssl
and that means more server ballast and a slower page refresh.

Greetings
Arthur




Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Dienstag, den 21. Juli 2009, 18:08:48 Uhr
Betreff: Re: SSL - ajax login

@RequreHttps is meant to be a page-level feature, so it doesnt fit your usecase.

is your login form submitted via ajax?

show us the code to sslform, your login form - making sure to include
the code to the component that submits it.

-igor

On Tue, Jul 21, 2009 at 8:34 AM, Arthur Leigh
Allen wrote:
> Hello folks,
>
> I'm using wicket 1.4 RC7 now and I have a question regarding the usage of ssl.
> I use the HttpsRequestCycleProcessor with the annotation @RequireHttps.
>
> Imagine the following case like it is realized on different sites like web.de 
> or gmx.de as well as xing.com.
> The first call will result in a http url. If you enter your login name and 
> your password and submit the form,
> then the form will be send via https.
>
> I only have one page. Everything on my page is exchanged via ajax. The login 
> is also done via ajax.
> Currently I use the annotation above for my BasePage but from the first call, 
> the whole communication
> is done with ssl.
>
> What I would like to realize is: Using the @RequireHttps annotation on forms 
> or submit buttons.
> I implemented an own SSLForm class extending the wicket form class with the 
> annotation.
> But when I use the SSLForm for my login, the communication is done without 
> ssl.
> I would like to use my page via http, but the ajax login should be done with 
> ssl.
>
> The only thing I can do now is:
> -page completely with ssl
> -page completely without ssl
>
> I would appreciate any help.
>
> Best regards,
> Arthur
>
>
>

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


  

BoundCompoundPropertyModel @Deprecated

2009-07-21 Thread Arthur Leigh Allen
Hallo folks,

can someone please tell me why the BoundCompoundPropertyModel is declared as 
deprecated in wicket 1.4?
I'm about to migrate from 1.3.5 to 1.4RC7 and I got 980 warnings. I solved 
about 450 today.

I got about 350 warnings because of the BoundCompoundPropertyModel.
I loved that model because it disassociates the html markup file from the 
properties within the entities.

Now I have to use the CompoundPropertyModel and therefore I have to change the 
whole html markup ids
in the html files to "entity.entity.variable", etc. I really don't like that 
way because if any variable within an entity
changes (renamed, moved, ...), I have to make sure, the markup ids in the html 
files are changed, too.

Is there a good reason why the BoundCompoundPropertyModel is deprecated now?
I can't understand it because it extended the CompoundPropertyModel for a good 
reason or am I wrong?

Best regards
Arthur


  

AW: SSL - ajax login

2009-07-21 Thread Arthur Leigh Allen
Hello Igor,

thanks for your early reply.
Yes, my login form is submitted via ajax.

public class BasePage {
    
    public void switchViaAjax(...) { ... }
    public void navigateViaAjax(...) { ... }

}

@RequireHttps
public class SSLForm extends Form { ... }

public class LoginPanel {

    public LoginPanel() { ... }

    public create() {
    SSLForm form = new SSLForm("loginForm");
    form.add(username);
    form.add(password);
    
    AjaxFallbackButton loginButton = new AjaxFallbackButton("loginButton", 
form) {
    protected void onSubmit(AjaxRequestTarget target, Form form) {
    // perform login => login is done via http
    }
    }
    }
}

As you said @RequireSSL is for pages.
Do you have any idea how I can remove @RequireHttps from the top of my BasePage 
and switch to https on login?
Currently I think the only way to provide a ssl ajax call is to show the 
base page via ssl as a starting basis.

Therefore I have to use @RequireSSL on the BasePage but that means every 
communication is done via ssl
and that means more server ballast and a slower page refresh.

Greetings
Arthur




Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Dienstag, den 21. Juli 2009, 18:08:48 Uhr
Betreff: Re: SSL - ajax login

@RequreHttps is meant to be a page-level feature, so it doesnt fit your usecase.

is your login form submitted via ajax?

show us the code to sslform, your login form - making sure to include
the code to the component that submits it.

-igor

On Tue, Jul 21, 2009 at 8:34 AM, Arthur Leigh
Allen wrote:
> Hello folks,
>
> I'm using wicket 1.4 RC7 now and I have a question regarding the usage of ssl.
> I use the HttpsRequestCycleProcessor with the annotation @RequireHttps.
>
> Imagine the following case like it is realized on different sites like web.de 
> or gmx.de as well as xing.com.
> The first call will result in a http url. If you enter your login name and 
> your password and submit the form,
> then the form will be send via https.
>
> I only have one page. Everything on my page is exchanged via ajax. The login 
> is also done via ajax.
> Currently I use the annotation above for my BasePage but from the first call, 
> the whole communication
> is done with ssl.
>
> What I would like to realize is: Using the @RequireHttps annotation on forms 
> or submit buttons.
> I implemented an own SSLForm class extending the wicket form class with the 
> annotation.
> But when I use the SSLForm for my login, the communication is done without 
> ssl.
> I would like to use my page via http, but the ajax login should be done with 
> ssl.
>
> The only thing I can do now is:
> -page completely with ssl
> -page completely without ssl
>
> I would appreciate any help.
>
> Best regards,
> Arthur
>
>
>

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


  

SSL - ajax login

2009-07-21 Thread Arthur Leigh Allen
Hello folks,

I'm using wicket 1.4 RC7 now and I have a question regarding the usage of ssl.
I use the HttpsRequestCycleProcessor with the annotation @RequireHttps.
 
Imagine the following case like it is realized on different sites like web.de 
or gmx.de as well as xing.com.
The first call will result in a http url. If you enter your login name and your 
password and submit the form,
then the form will be send via https.

I only have one page. Everything on my page is exchanged via ajax. The login is 
also done via ajax.
Currently I use the annotation above for my BasePage but from the first call, 
the whole communication
is done with ssl.

What I would like to realize is: Using the @RequireHttps annotation on forms or 
submit buttons.
I implemented an own SSLForm class extending the wicket form class with the 
annotation.
But when I use the SSLForm for my login, the communication is done without ssl.
I would like to use my page via http, but the ajax login should be done with 
ssl.

The only thing I can do now is:
-page completely with ssl
-page completely without ssl

I would appreciate any help.

Best regards,
Arthur


  

AW: AutoCompleteTextField buggy?

2009-03-18 Thread Arthur Leigh Allen
Hello people, any more ideas?

Again: It's only happening if I immediately submit the form after entering one 
letter in the AutoCompleteTextField (condition: overridden method getChoices 
must return at least one entry).

The exception is thrown in AbstractRequestCycleProcessor in line 416 (Wicket 
1.3.5).
The class tries to retrieve the component by the relative component path and 
the component is null.
Therefore an exception is thrown.

I have a second problem (maybe the same cause) with auto complete text fields.
If I enter one letter, wait about 0,25 seconds and submit the form, then
-the panel containing the auto complete text field will be removed from the view
-the new panel is shown via ajax
-the div (containing the choices) of the auto complete text field appears 
without the text field in the new panel.

Would appreciate any answers.

Thanks in advance, Leigh




 




Von: Phil Grimm 
An: users@wicket.apache.org
Gesendet: Montag, den 9. Februar 2009, 04:27:35 Uhr
Betreff: Re: AutoCompleteTextField buggy?

I tried it in my app (running 1.4-rc1) and was not able to reproduce this.
Phil

On Sat, Feb 7, 2009 at 1:05 PM, Arthur Leigh Allen <
arthurleigh.al...@yahoo.de> wrote:

> hi igor, it's 1..3.5
>
>
>
>
> 
> Von: Igor Vaynberg 
> An: users@wicket.apache.org
> Gesendet: Samstag, den 7. Februar 2009, 00:44:28 Uhr
> Betreff: Re: AutoCompleteTextField buggy?
>
> what wicket version are you using?
>
> -igor
>
> On Fri, Feb 6, 2009 at 3:32 AM, Arthur Leigh Allen
>  wrote:
> >
> >
> > Hi there
> >
> > I read that some people here got the same exception like me, but I
> couldn't find an answer.
> >
> > Do the following:
> > -use an AutoCompleteTextField
> > -override the method getChoices(String input)
> > -do a time-consuming database call to retrieve the choices
> > -return the choices
> >
> > everything works fine... but do the following steps VERY FAST
> > -click at the AutoCompleteTextField to enter something
> > -press "m" and immediately "enter" to submit the form
> >
> > this will submit the form BEFORE the getChoices method returns the
> choices..
> > the form is submitted and then the AutoCompleteTextField is removed from
> the page because the panel (including the text field) is removed and a
> different panel is displayed via ajax.
> > then the getChoices(...) method returns the choices and the following
> exception occurs:
> >
> > org.apache..wicket.WicketRuntimeException: component
> content:form:nameField:textField not found on page test.MyPage[id = 0],
> listener interface = [RequestListenerInterface
> name=IActivePageBehaviorListener, method=public abstract void
> org.apache.wicket.behavior.IBehaviorListener.onRequest()]
> >  at test.TestApplication.access$0(TestApplication.java:145)
> >  at test.TestApplication$1.onRuntimeException(TestApplication.java:117)
> >  at
> org.apache.wicket.request.AbstractRequestCycleProcessor.onRuntimeException(AbstractRequestCycleProcessor.java:217)
> >  at
> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:119)
> >  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1302)
> >  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
> >  at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
> >  at
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
> >  at
> org.apache.wicket.protocol.http.WicketServlet..doGet(WicketServlet.java:124)
> >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
> >  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >  at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
> >  at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> >  at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> >  at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> >  at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> >  at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> >  at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> >  at
> org..apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> >  at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> >  at
> org.apache.coyote..http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.j

AW: resource cacheable firefox/opera

2009-03-10 Thread Arthur Leigh Allen
the path is the same, the filename differs.
yes you're right, no-store and no-cache didn't change anything.
instead of Image i'm using NonCacheableImage as the subclass
and now it works fine with any browser.

but thanks for the hint

greetz
leigh




Von: Pointbreak 
An: Wicket Users Mailing List 
Gesendet: Dienstag, den 10. März 2009, 16:15:15 Uhr
Betreff: Re: resource cacheable firefox/opera

You use the same url for different images? Firefox uses a memory cache
in addition to a disk cache. Check what headers are send with your
image. No-store and no-cache headers will NOT prevent firefox3 from
using its memory cache (at least not with pages). Your best bet is to
use different urls.

On Tue, 10 Mar 2009 14:56 +, "Arthur Leigh Allen"
 wrote:
> Hi folks,
>  
> I've implemented a RemoteImage class which extends the Image class.
> The method setCacheable works with Internet Explorer but neither with
> Firefox nor with Opera..
> If I load an image the first time, the correct image is shown.
> When I try to load a different image (path is applied correctly), the old
> image is shown.
> 
> What I'm doing wrong?
> I'm using wicket 1.3.5.
>  
> ===
> public
>  classRemoteImage extendsImage {
>     publicRemoteImage(String id, finalString path) {
>         super(id);
>     
>         Resource resource = newWebResource() {
>             publicIResourceStream getResourceStream() {
>                 IResourceStream stream = newFileResourceStream(newFile(path));
>                 returnstream;
>             }
>         };
>  
>         resource.setCacheable(false);
>         setImageResource(resource);
>     }
> }
>  
> ===
>  
> Would appreciate any help.
>  
> Thanks in advance
> Leigh
> 
> 
>      

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


  

AW: resource cacheable firefox/opera

2009-03-10 Thread Arthur Leigh Allen
sorry people.
i was trying all the time but i didn't see the class NonCachingImage

now it works





Von: Arthur Leigh Allen 
An: users@wicket.apache.org
Gesendet: Dienstag, den 10. März 2009, 15:56:24 Uhr
Betreff: resource cacheable firefox/opera

Hi folks,
 
I've implemented a RemoteImage class which extends the Image class.
The method setCacheable works with Internet Explorer but neither with Firefox 
nor with Opera.
If I load an image the first time, the correct image is shown.
When I try to load a different image (path is applied correctly), the old image 
is shown.

What I'm doing wrong?
I'm using wicket 1.3.5.
 
===
public
 classRemoteImage extendsImage {
    publicRemoteImage(String id, finalString path) {
        super(id);
    
        Resource resource = newWebResource() {
            publicIResourceStream getResourceStream() {
                IResourceStream stream = newFileResourceStream(newFile(path));
                returnstream;
            }
        };
 
        resource.setCacheable(false);
        setImageResource(resource);
    }
}
 
===
 
Would appreciate any help.
 
Thanks in advance
Leigh


  

resource cacheable firefox/opera

2009-03-10 Thread Arthur Leigh Allen
Hi folks,
 
I've implemented a RemoteImage class which extends the Image class.
The method setCacheable works with Internet Explorer but neither with Firefox 
nor with Opera.
If I load an image the first time, the correct image is shown.
When I try to load a different image (path is applied correctly), the old image 
is shown.

What I'm doing wrong?
I'm using wicket 1.3.5.
 
===
public
 classRemoteImage extendsImage {
    publicRemoteImage(String id, finalString path) {
        super(id);
    
        Resource resource = newWebResource() {
            publicIResourceStream getResourceStream() {
                IResourceStream stream = newFileResourceStream(newFile(path));
                returnstream;
            }
        };
 
        resource.setCacheable(false);
        setImageResource(resource);
    }
}
 
===
 
Would appreciate any help.
 
Thanks in advance
Leigh


  

AW: AutoCompleteTextField buggy?

2009-02-07 Thread Arthur Leigh Allen
hi igor, it's 1.3.5





Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Samstag, den 7. Februar 2009, 00:44:28 Uhr
Betreff: Re: AutoCompleteTextField buggy?

what wicket version are you using?

-igor

On Fri, Feb 6, 2009 at 3:32 AM, Arthur Leigh Allen
 wrote:
>
>
> Hi there
>
> I read that some people here got the same exception like me, but I couldn't 
> find an answer.
>
> Do the following:
> -use an AutoCompleteTextField
> -override the method getChoices(String input)
> -do a time-consuming database call to retrieve the choices
> -return the choices
>
> everything works fine... but do the following steps VERY FAST
> -click at the AutoCompleteTextField to enter something
> -press "m" and immediately "enter" to submit the form
>
> this will submit the form BEFORE the getChoices method returns the choices..
> the form is submitted and then the AutoCompleteTextField is removed from the 
> page because the panel (including the text field) is removed and a different 
> panel is displayed via ajax.
> then the getChoices(...) method returns the choices and the following 
> exception occurs:
>
> org.apache.wicket.WicketRuntimeException: component 
> content:form:nameField:textField not found on page test.MyPage[id = 0], 
> listener interface = [RequestListenerInterface 
> name=IActivePageBehaviorListener, method=public abstract void 
> org.apache.wicket.behavior.IBehaviorListener.onRequest()]
>  at test.TestApplication.access$0(TestApplication.java:145)
>  at test.TestApplication$1.onRuntimeException(TestApplication.java:117)
>  at 
>org.apache.wicket.request.AbstractRequestCycleProcessor.onRuntimeException(AbstractRequestCycleProcessor.java:217)
>  at 
>org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:119)
>  at org.apache.wicket.RequestCycle.step(RequestCycle.java:1302)
>  at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
>  at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
>  at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
>  at 
>org.apache.wicket.protocol.http.WicketServlet..doGet(WicketServlet.java:124)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
>  at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>  at 
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>  at 
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>  at 
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>  at 
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>  at 
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>  at 
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>  at 
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>  at 
>org..apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
>  at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>  at 
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>  at org.apache.tomcat.util..net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>  at java.lang.Thread.run(Thread.java:619)
>
> When the getChoices method returns "null" or when I press "m" and then 
> "enter" after ca. 3 seconds, everything works fine without an exception.
>
> I already saw that example: 
> http://www.wicket-library.com/wicket-examples/ajax/autocomplete.1
>
> There the exception doesn't occur but I think it's maybe because
> -setResponsePage is used and not ajax or
> -the getChoices method returns the values in time
>
> Would appreciate any help
>
> Best regards,
> Leigh
>
>
>
>

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


  

AW: AW: AW: 2 DropDownChoices with a renderer. ajax update

2009-02-04 Thread Arthur Leigh Allen
thx for your hint
i forgot to mention that my renderer is holding the model data, too.
yes i know it's called "renderer"... but i give it a map with keys and values 
to render.
so it encapsulates the model, too.
after the country selection was done the renderer is updated.

the problem is solved. when i instantiated my drop down choice i used the 
constructor with the 4 parameters.
the choices i gave him were a list of strings and not the model.

i solved the problem by using the abstract read only model which returns the 
current keys in the overridden method getObject.

thx again for your help... 

best regards
Leigh




Von: Jeremy Thomerson 
An: users@wicket.apache.org
Gesendet: Mittwoch, den 4. Februar 2009, 15:37:41 Uhr
Betreff: RE: AW: AW: 2 DropDownChoices with a renderer. ajax update

That's because it's a **renderer** - not where you get data.  Use the model to 
load your states (extend LoadableDetachableModel and override load to load 
states based on what was selected in the country dropdown).

Then use the renderer to do just that - return a renderable display value based 
on the state passed to getDisplayValue.

Jeremy Thomerson
http://www.wickettraining.com
-- sent from a wireless device


-Original Message-
From: Arthur Leigh Allen 
Sent: Wednesday, February 04, 2009 3:57 AM
To: users@wicket.apache.org
Subject: AW: AW: 2 DropDownChoices with a renderer. ajax update

it seems to me like the drop down choice is not retrieving the new data from 
the renderer.
whether the getIdValue nor the getDisplayValue are called to retrieve the new 
data when redrawing the drop down choice.
does the drop down choice cache the first renderer results?




________
Von: Arthur Leigh Allen 
An: users@wicket.apache.org
Gesendet: Mittwoch, den 4. Februar 2009, 09:24:39 Uhr
Betreff: AW: 2 DropDownChoices with a renderer. ajax update

i already saw that example igor but the difference is that they're using a 
property model and they override the getObject method while I'm using a 
renderer for the state choice and i'm updating my renderer data but nothing 
happen. i need a renderer because i need both, a (database) key and a (language 
specific) value. in that example only the values are set.

best regards
leigh




Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Mittwoch, den 4. Februar 2009, 00:24:08 Uhr
Betreff: Re: 2 DropDownChoices with a renderer. ajax update

see here for clues

http://wicketstuff.org/wicket13/ajax/choice.1

-igor

On Tue, Feb 3, 2009 at 2:54 PM, Arthur Leigh Allen
 wrote:
> Hello people,
>
> thanks for helping the newbies in wicket.
>
> I got one more question:
> -I use two drop down choices
> -The first one includes all countries, the second one the related states
> -If the first country choice changed, the second one should be updated via 
> ajax
> -In both choices i use a choice renderer which implements IChoiceRenderer
> -When the country choice was selected, the related states are retrieved from 
> the database and set in the state renderer
> -Then the state choice is added to the target object in on change event
> -In my browser I can see that the state drop down choice was redrawed but the 
> retrieved states are not send to the browser (proved in wicket ajax debug)
>
> I tried a lot of things but nothing could solve my problem.
> Does someone have an advice for me???
>
> The states are definetly retrieved correctly from the database.
> In wicket examples I saw that PropertyModel is used and the getObject method 
> is overridden.
> I'm using a ChoiceRenderer because I need a key and a value.
> The DropDownChoices are working correctly. The only problem is that they are 
> not redrawed correctly.
>
> Note: The initial status is that the country renderer is filled with about 
> 150 countries. The state renderer is empty. The states should be filled when 
> a country was selected. I tested the state choice by initializing it with the 
> states for Germany. The states were shown correctly. Then when I select a 
> different country with no states available, the state choice will be emptied 
> (but the place of the already showed states is reserved as a white 
> rectangle). When I select Germany again the states are shown again correctly. 
> But when the initial status of state choice is empty, nothing happend when 
> switching between different countries.
>
> It seems to me like wicket is not updating the view correctly. Do I have to 
> send an refresh or update signal to the state choice or something similar?
>
> Thanks in advance
> Leigh
>
>
>

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

AW: AW: AW: 2 DropDownChoices with a renderer. ajax update

2009-02-04 Thread Arthur Leigh Allen
sorry i meant:
neither the getIdValue nor the getDisplayValue are called 





Von: Arthur Leigh Allen 
An: users@wicket.apache.org
Gesendet: Mittwoch, den 4. Februar 2009, 10:57:28 Uhr
Betreff: AW: AW: 2 DropDownChoices with a renderer. ajax update

it seems to me like the drop down choice is not retrieving the new data from 
the renderer.
whether the getIdValue nor the getDisplayValue are called to retrieve the new 
data when redrawing the drop down choice.
does the drop down choice cache the first renderer results?





Von: Arthur Leigh Allen 
An: users@wicket.apache.org
Gesendet: Mittwoch, den 4. Februar 2009, 09:24:39 Uhr
Betreff: AW: 2 DropDownChoices with a renderer. ajax update

i already saw that example igor but the difference is that they're using a 
property model and they override the getObject method while I'm using a 
renderer for the state choice and i'm updating my renderer data but nothing 
happen. i need a renderer because i need both, a (database) key and a (language 
specific) value. in that example only the values are set.

best regards
leigh




Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Mittwoch, den 4. Februar 2009, 00:24:08 Uhr
Betreff: Re: 2 DropDownChoices with a renderer. ajax update

see here for clues

http://wicketstuff.org/wicket13/ajax/choice.1

-igor

On Tue, Feb 3, 2009 at 2:54 PM, Arthur Leigh Allen
 wrote:
> Hello people,
>
> thanks for helping the newbies in wicket.
>
> I got one more question:
> -I use two drop down choices
> -The first one includes all countries, the second one the related states
> -If the first country choice changed, the second one should be updated via 
> ajax
> -In both choices i use a choice renderer which implements IChoiceRenderer
> -When the country choice was selected, the related states are retrieved from 
> the database and set in the state renderer
> -Then the state choice is added to the target object in on change event
> -In my browser I can see that the state drop down choice was redrawed but the 
> retrieved states are not send to the browser (proved in wicket ajax debug)
>
> I tried a lot of things but nothing could solve my problem.
> Does someone have an advice for me???
>
> The states are definetly retrieved correctly from the database.
> In wicket examples I saw that PropertyModel is used and the getObject method 
> is overridden.
> I'm using a ChoiceRenderer because I need a key and a value.
> The DropDownChoices are working correctly. The only problem is that they are 
> not redrawed correctly.
>
> Note: The initial status is that the country renderer is filled with about 
> 150 countries. The state renderer is empty. The states should be filled when 
> a country was selected. I tested the state choice by initializing it with the 
> states for Germany. The states were shown correctly. Then when I select a 
> different country with no states available, the state choice will be emptied 
> (but the place of the already showed states is reserved as a white 
> rectangle). When I select Germany again the states are shown again correctly. 
> But when the initial status of state choice is empty, nothing happend when 
> switching between different countries.
>
> It seems to me like wicket is not updating the view correctly. Do I have to 
> send an refresh or update signal to the state choice or something similar?
>
> Thanks in advance
> Leigh
>
>
>

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


  

AW: AW: 2 DropDownChoices with a renderer. ajax update

2009-02-04 Thread Arthur Leigh Allen
it seems to me like the drop down choice is not retrieving the new data from 
the renderer.
whether the getIdValue nor the getDisplayValue are called to retrieve the new 
data when redrawing the drop down choice.
does the drop down choice cache the first renderer results?





Von: Arthur Leigh Allen 
An: users@wicket.apache.org
Gesendet: Mittwoch, den 4. Februar 2009, 09:24:39 Uhr
Betreff: AW: 2 DropDownChoices with a renderer. ajax update

i already saw that example igor but the difference is that they're using a 
property model and they override the getObject method while I'm using a 
renderer for the state choice and i'm updating my renderer data but nothing 
happen. i need a renderer because i need both, a (database) key and a (language 
specific) value. in that example only the values are set.

best regards
leigh




Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Mittwoch, den 4. Februar 2009, 00:24:08 Uhr
Betreff: Re: 2 DropDownChoices with a renderer. ajax update

see here for clues

http://wicketstuff.org/wicket13/ajax/choice.1

-igor

On Tue, Feb 3, 2009 at 2:54 PM, Arthur Leigh Allen
 wrote:
> Hello people,
>
> thanks for helping the newbies in wicket.
>
> I got one more question:
> -I use two drop down choices
> -The first one includes all countries, the second one the related states
> -If the first country choice changed, the second one should be updated via 
> ajax
> -In both choices i use a choice renderer which implements IChoiceRenderer
> -When the country choice was selected, the related states are retrieved from 
> the database and set in the state renderer
> -Then the state choice is added to the target object in on change event
> -In my browser I can see that the state drop down choice was redrawed but the 
> retrieved states are not send to the browser (proved in wicket ajax debug)
>
> I tried a lot of things but nothing could solve my problem.
> Does someone have an advice for me???
>
> The states are definetly retrieved correctly from the database.
> In wicket examples I saw that PropertyModel is used and the getObject method 
> is overridden.
> I'm using a ChoiceRenderer because I need a key and a value.
> The DropDownChoices are working correctly. The only problem is that they are 
> not redrawed correctly.
>
> Note: The initial status is that the country renderer is filled with about 
> 150 countries. The state renderer is empty. The states should be filled when 
> a country was selected. I tested the state choice by initializing it with the 
> states for Germany. The states were shown correctly. Then when I select a 
> different country with no states available, the state choice will be emptied 
> (but the place of the already showed states is reserved as a white 
> rectangle). When I select Germany again the states are shown again correctly. 
> But when the initial status of state choice is empty, nothing happend when 
> switching between different countries.
>
> It seems to me like wicket is not updating the view correctly. Do I have to 
> send an refresh or update signal to the state choice or something similar?
>
> Thanks in advance
> Leigh
>
>
>

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


  

AW: 2 DropDownChoices with a renderer. ajax update

2009-02-04 Thread Arthur Leigh Allen
i already saw that example igor but the difference is that they're using a 
property model and they override the getObject method while I'm using a 
renderer for the state choice and i'm updating my renderer data but nothing 
happen. i need a renderer because i need both, a (database) key and a (language 
specific) value. in that example only the values are set.

best regards
leigh




Von: Igor Vaynberg 
An: users@wicket.apache.org
Gesendet: Mittwoch, den 4. Februar 2009, 00:24:08 Uhr
Betreff: Re: 2 DropDownChoices with a renderer. ajax update

see here for clues

http://wicketstuff.org/wicket13/ajax/choice.1

-igor

On Tue, Feb 3, 2009 at 2:54 PM, Arthur Leigh Allen
 wrote:
> Hello people,
>
> thanks for helping the newbies in wicket.
>
> I got one more question:
> -I use two drop down choices
> -The first one includes all countries, the second one the related states
> -If the first country choice changed, the second one should be updated via 
> ajax
> -In both choices i use a choice renderer which implements IChoiceRenderer
> -When the country choice was selected, the related states are retrieved from 
> the database and set in the state renderer
> -Then the state choice is added to the target object in on change event
> -In my browser I can see that the state drop down choice was redrawed but the 
> retrieved states are not send to the browser (proved in wicket ajax debug)
>
> I tried a lot of things but nothing could solve my problem.
> Does someone have an advice for me???
>
> The states are definetly retrieved correctly from the database.
> In wicket examples I saw that PropertyModel is used and the getObject method 
> is overridden.
> I'm using a ChoiceRenderer because I need a key and a value.
> The DropDownChoices are working correctly. The only problem is that they are 
> not redrawed correctly.
>
> Note: The initial status is that the country renderer is filled with about 
> 150 countries. The state renderer is empty. The states should be filled when 
> a country was selected. I tested the state choice by initializing it with the 
> states for Germany. The states were shown correctly. Then when I select a 
> different country with no states available, the state choice will be emptied 
> (but the place of the already showed states is reserved as a white 
> rectangle). When I select Germany again the states are shown again correctly. 
> But when the initial status of state choice is empty, nothing happend when 
> switching between different countries.
>
> It seems to me like wicket is not updating the view correctly. Do I have to 
> send an refresh or update signal to the state choice or something similar?
>
> Thanks in advance
> Leigh
>
>
>

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


  

2 DropDownChoices with a renderer. ajax update

2009-02-03 Thread Arthur Leigh Allen
Hello people,

thanks for helping the newbies in wicket.

I got one more question:
-I use two drop down choices
-The first one includes all countries, the second one the related states
-If the first country choice changed, the second one should be updated via ajax
-In both choices i use a choice renderer which implements IChoiceRenderer
-When the country choice was selected, the related states are retrieved from 
the database and set in the state renderer
-Then the state choice is added to the target object in on change event
-In my browser I can see that the state drop down choice was redrawed but the 
retrieved states are not send to the browser (proved in wicket ajax debug)

I tried a lot of things but nothing could solve my problem.
Does someone have an advice for me???

The states are definetly retrieved correctly from the database.
In wicket examples I saw that PropertyModel is used and the getObject method is 
overridden.
I'm using a ChoiceRenderer because I need a key and a value.
The DropDownChoices are working correctly. The only problem is that they are 
not redrawed correctly.

Note: The initial status is that the country renderer is filled with about 150 
countries. The state renderer is empty. The states should be filled when a 
country was selected. I tested the state choice by initializing it with the 
states for Germany. The states were shown correctly. Then when I select a 
different country with no states available, the state choice will be emptied 
(but the place of the already showed states is reserved as a white rectangle). 
When I select Germany again the states are shown again correctly. But when the 
initial status of state choice is empty, nothing happend when switching between 
different countries.

It seems to me like wicket is not updating the view correctly. Do I have to 
send an refresh or update signal to the state choice or something similar?

Thanks in advance
Leigh


  

AW: AW: getRequest().getPage() always null

2009-02-03 Thread Arthur Leigh Allen
thx for your hint.





Von: Michael Sparer 
An: users@wicket.apache.org
Gesendet: Donnerstag, den 29. Januar 2009, 11:53:26 Uhr
Betreff: Re: AW: getRequest().getPage() always null


sounds as if you want to implement your own authorization stuff - I'd suggest
to have a look into wicket-auth-roles (and the examples). there's a lot
already implemented and you don't have to hook into the requestcycle too
much ...

regards,
Michael


Arthur Leigh Allen wrote:
> 
> Hello people,
> 
> any explanation or suggestion?
> Is there a possible way to retrieve the page from the request cycle?
> There is the getPage() method but the result is always null. Why?
> 
> I would appreciate any answers.
> 
> Thx a lot
> Leigh
> 
> 
> 
> 
> 
> Von: Dipu 
> An: users@wicket.apache.org
> Gesendet: Mittwoch, den 21. Januar 2009, 17:46:38 Uhr
> Betreff: Re: getRequest().getPage() always null
> 
> I think  setting this
> get().getApplicationSettings().setPageExpiredErrorPage(StartPage.class)
> in your application's init method  will solve your problem if i
> understand it correctly.
> 
> regards
> Dipu
> 
> On Wed, Jan 21, 2009 at 3:18 PM, Arthur Leigh Allen
>  wrote:
>> Hello wicket community,
>>
>>
>> there is a second issue I don't know how to solve.
>>
>> Imagine the following situation:
>> -User visits page
>> -User logs in
>> -User clones the browser window by pressing Strg+N (2 browser windows
>> with logged-in-panels are shown now)
>> -User logs out in second page
>> -User closes second page
>> -User calls a use case function for logged-in-users in a panel in first
>> page (*)
>>
>> The aim is to navigate to the start page when the user tries the last
>> action (*).
>>
>> My idea is to override the onBeginRequest method of the WebRequestCycle
>> in the application class.
>> Then check if the boolean member "wasLoggedIn" in my page is set to true
>> and the boolean member "isLoggedIn" in the session is set to false.
>> When this constellation happens, I would call the
>> setResponsePage(StartPage.class) etc.
>>
>> The problem is: When I call getRequest().getPage() in the onBeginRequest
>> method, the result is always null.
>> Do you know how to get the page the request was initiated from?
>>
>> Best regards
>> Leigh
>>
>>
>>
>>
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
>  
> 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www..nabble.com/getRequest%28%29.getPage%28%29-always-null-tp21585241p21724628.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


  

AW: open link in new window => target is null

2009-01-28 Thread Arthur Leigh Allen
Hello people,

this is my second problem I cannot resolve.
Why is the target object always null if I open an AjaxFallbackLink in a new 
window or tab?

Best regards,
Leigh





Von: Arthur Leigh Allen 
An: users@wicket.apache.org
Gesendet: Mittwoch, den 21. Januar 2009, 13:23:35 Uhr
Betreff: open link in new window => target is null


AjaxFallbackLink link = 
        ...    }
};
 newAjaxFallbackLink("link") {    publicvoidonClick(AjaxRequestTarget target) {

Hello wicket community,

yesterday I found out in the example above that the target object is null if I 
click with the right mouse button on the link and select "open in new window".
Does someone know why?

Best regards
Leigh



  

AW: getRequest().getPage() always null

2009-01-28 Thread Arthur Leigh Allen
Hello people,

any explanation or suggestion?
Is there a possible way to retrieve the page from the request cycle?
There is the getPage() method but the result is always null. Why?

I would appreciate any answers.

Thx a lot
Leigh





Von: Dipu 
An: users@wicket.apache.org
Gesendet: Mittwoch, den 21. Januar 2009, 17:46:38 Uhr
Betreff: Re: getRequest().getPage() always null

I think  setting this
get().getApplicationSettings().setPageExpiredErrorPage(StartPage.class)
in your application's init method  will solve your problem if i
understand it correctly.

regards
Dipu

On Wed, Jan 21, 2009 at 3:18 PM, Arthur Leigh Allen
 wrote:
> Hello wicket community,
>
>
> there is a second issue I don't know how to solve.
>
> Imagine the following situation:
> -User visits page
> -User logs in
> -User clones the browser window by pressing Strg+N (2 browser windows with 
> logged-in-panels are shown now)
> -User logs out in second page
> -User closes second page
> -User calls a use case function for logged-in-users in a panel in first page 
> (*)
>
> The aim is to navigate to the start page when the user tries the last action 
> (*).
>
> My idea is to override the onBeginRequest method of the WebRequestCycle in 
> the application class.
> Then check if the boolean member "wasLoggedIn" in my page is set to true and 
> the boolean member "isLoggedIn" in the session is set to false.
> When this constellation happens, I would call the 
> setResponsePage(StartPage.class) etc.
>
> The problem is: When I call getRequest().getPage() in the onBeginRequest 
> method, the result is always null.
> Do you know how to get the page the request was initiated from?
>
> Best regards
> Leigh
>
>
>
>

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


  

AW: getRequest().getPage() always null

2009-01-21 Thread Arthur Leigh Allen
thx for your reply


the page does not expire. the session is still running. only the login status 
changes.
do you know why getRequest().getPage() is always null? 

best regards
Leigh


  

getRequest().getPage() always null

2009-01-21 Thread Arthur Leigh Allen
Hello wicket community,


there is a second issue I don't know how to solve.

Imagine the following situation:
-User visits page
-User logs in
-User clones the browser window by pressing Strg+N (2 browser windows with 
logged-in-panels are shown now)
-User logs out in second page
-User closes second page
-User calls a use case function for logged-in-users in a panel in first page (*)

The aim is to navigate to the start page when the user tries the last action 
(*).

My idea is to override the onBeginRequest method of the WebRequestCycle in the 
application class.
Then check if the boolean member "wasLoggedIn" in my page is set to true and 
the boolean member "isLoggedIn" in the session is set to false.
When this constellation happens, I would call the 
setResponsePage(StartPage.class) etc.

The problem is: When I call getRequest().getPage() in the onBeginRequest 
method, the result is always null.
Do you know how to get the page the request was initiated from?

Best regards
Leigh



  

getRequest().getPage() always null

2009-01-21 Thread Arthur Leigh Allen
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="0-1602752818-1232550898=:63833"

--0-1602752818-1232550898=:63833
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

=0A=0AHello wicket community,=0A=0A=0Athere is a second issue I don't know =
how to solve.=0A=0AImagine the following situation:=0A-User visits page=0A-=
User logs in=0A-User clones the browser window by pressing Strg+N (2 browse=
r windows with logged-in-panels are shown now)=0A-User logs out in second p=
age=0A-User closes second page=0A-User calls a use case function for logged=
-in-users in a panel in first page (*)=0A=0AThe aim is to navigate to the s=
tart page when the user tries the last action (*).=0A=0AMy idea is to overr=
ide the onBeginRequest method of the WebRequestCycle in the application cla=
ss.=0AThen check if the boolean member "wasLoggedIn" in my page is set to t=
rue and the boolean member "isLoggedIn" in the session is set to false.=0AW=
hen this constellation happens, I would call the setResponsePage(StartPage.=
class) etc.=0A=0AThe problem is: When I call getRequest().getPage() in the =
onBeginRequest method, the result is always null.=0ADo you know how to get =
the page the request was initiated from?=0A=0ABest regards=0ALeigh=0A=0A=0A=
  
--0-1602752818-1232550898=:63833
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

 =0A=0A=0A=0A=
Hello wicket community,=0A=0A=0A=
=0A =0Athere is a second issue I don't know how to sol=
ve.=0A =0AImagine the following situation:=
=0A-User visits page=0A-User logs in=0A-User clo=
nes the browser window by pressing Strg+N (2 browser windows with logged-in=
-panels are shown now)=0A-User logs out in second page=0A<=
DIV>-User closes second page=0A-User calls a use case function f=
or logged-in-users in a panel in first page (*)=0A =
=0AThe aim is to navigate to the start page when the user tries the la=
st action (*).=0A =0AMy idea is to override the =
onBeginRequest method of the WebRequestCycle in the application class.=0AThen check if the boolean member "wasLoggedIn" in my page is set t=
o true and the boolean member "isLoggedIn" in the session is set to false.<=
/DIV>=0AWhen this constellation happens, I would call the setResponseP=
age(StartPage.class) etc.=0A =0AThe problem is: =
When I call getRequest().getPage() in the onBeginRequest method, the result=
 is always null.=0ADo you know how to get the page the request w=
as initiated from?=0A =0ABest regards=0ALeigh=0A=0A=
=0A=0A  
--0-1602752818-1232550898=:63833--


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



open link in new window => target is null

2009-01-21 Thread Arthur Leigh Allen
Hello wicket community,


yesterday I found out that the target object in the onClick event is null if I 
click with the right mouse button on an ajax fallback link and select "open in 
new window".
Does someone know why?

Best regards
Leigh



  

AW: session timeout and session id

2008-11-06 Thread Arthur Leigh Allen
I'm sure it would work fine by using a map but what if 2000 users are logged in 
at the same time?
I think holding a map with 2000 sessionid's and user objects in memory is not 
cheap.

The situation is, even if I hold the user objects in a map, I would have to set 
the offline status
and update the modified user in the database. So this would be a part in both 
solutions.

The only question is:

a) holding a map with sessionid-user pairs. retrieve the proper user object 
from map. set offline status. udpate modified user in database.

vs.

b) retrieve the proper user object from database by searching the additional 
user table column "sessionid". set offline status. udpate modified user in 
database.

vs.

c) a different solution?

greetz






Von: Bruno Borges <[EMAIL PROTECTED]>
An: users@wicket.apache.org
Gesendet: Mittwoch, den 5. November 2008, 20:49:06 Uhr
Betreff: Re: session timeout and session id

How expensive do you think it will be to save and bring back the user object
from the database? I'm pretty sure that working with that information in
memory is faster and less expensive. Why not just staying with the Map
solution? I'm pretty sure it works.

cheers,
Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld


On Wed, Nov 5, 2008 at 1:31 PM, Arthur Leigh Allen <
[EMAIL PROTECTED]> wrote:

> Hello people!
>
> I know there are lots of threads with the same issue but I couldn't find a
> proper and well solved solution.
>
> I have a web application with users to login and logout.
> If a user logs in the user object is hold in the session.
> If the user logs out by using the logout button, the online status of this
> user is set to "offline" in the database.
>
> Well. My problem is the session timeout.
> If a session timeout occurs I only can access the session id of the expired
> session (am I right?).
> So I'm not able to access the user object anymore (?).
>
> Some of you showed a solution by holding a map or list in the application
> class, e.g. key (sessionid) and value (user).
> But I think it's expensive (memory).
>
> It would be more performant to save the session id of the user in the user
> database table when the user logs in.
> When the timeout occurs I could retrieve the user object from the database
> by using the unique session id.
> Then I could modify the user object and make it persistent again.
>
> Does anyone know a better way because I'm not fully satisfied with this
> solution, too?
>
> Best regards!
> Allen
>
>
>



  

session timeout and session id

2008-11-05 Thread Arthur Leigh Allen
Hello people!

I know there are lots of threads with the same issue but I couldn't find a 
proper and well solved solution.

I have a web application with users to login and logout.
If a user logs in the user object is hold in the session.
If the user logs out by using the logout button, the online status of this user 
is set to "offline" in the database.

Well. My problem is the session timeout.
If a session timeout occurs I only can access the session id of the expired 
session (am I right?).
So I'm not able to access the user object anymore (?).

Some of you showed a solution by holding a map or list in the application 
class, e.g. key (sessionid) and value (user).
But I think it's expensive (memory).

It would be more performant to save the session id of the user in the user 
database table when the user logs in.
When the timeout occurs I could retrieve the user object from the database by 
using the unique session id.
Then I could modify the user object and make it persistent again.

Does anyone know a better way because I'm not fully satisfied with this 
solution, too?

Best regards!
Allen