Re: Associating a request to a Session

2008-10-22 Thread Serkan Camurcuoglu

I'm glad it worked :)




David Leangen-8 wrote:
> 
> 
> Thanks for taking the time to look at this. I got so used to debugging
> this way that I didn't even think about that.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Associating-a-request-to-a-Session-tp19641227p20125368.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: have anyone tried empire-DB?

2008-10-22 Thread Wayne Pope
well I'm new to Hibernate, and it seems that you must be extremely consious
of how hibernate handles mapping etc. This may also be the same with other
object to relational frameworks. An example is the the behaviour of
OneToMany mappings using List as this uses "bag sematics". Hibernate's
handling of these relationships is somewhat brute force i.e. it deletes
existing entries and re-inserts to match the current collection and
therefore you need to use Set's or use collectionid to create an idbag.
Therefore straight away I can't use a List (which is all I need) in the
code.

There seems (to me) many many gotchas with Hibernate that you need to be
aware of and the error messages don't tell you much compare to say Wicket.

I come from a world where we used stored proceedures before and you simply
provided the straight mapping from the result columns to your pojos. This
was very flexible as you could change your pojos with no impact to the db
structure and vice-versa we could completly change the db schema (for
performance or any reason) with no impact on the code. This seems to work
well.

On Thu, Oct 23, 2008 at 8:36 AM, Igor Vaynberg <[EMAIL PROTECTED]>wrote:

> im curious in what way does it influence java code...
>
> -igor
>
> On Wed, Oct 22, 2008 at 10:59 PM, Wayne Pope
> <[EMAIL PROTECTED]> wrote:
> > Nino what do you recommend in terms orf DB framework. We're currently
> using
> > Hibernate and I'm personally finding it a pain - it seems to influence
> the
> > java code way too much and it create some horrible joins if we're not
> > carefull. Any suggestions that you've used in the real world?
> >
> > On Fri, Oct 17, 2008 at 8:15 PM, Nino Saturnino Martinez Vazquez Wael <
> > [EMAIL PROTECTED]> wrote:
> >
> >> This is interesting:
> >>
> >> (JaQu) Provide API level compatibility with JPA (so that JaQu can be
> used
> >> as an extension of JPA).
> >>
> >> But I think something similar are on its way for JPA 2.0..?
> >>
> >>
> >> marco.behler wrote:
> >>
> >>> I gave empireDB a quick look a while ago and it looks interesting.
> Besides
> >>> JPersist I also stumbled upon JaQu
> >>> (http://www.h2database.com/html/jaqu.html), which is still in its
> >>> infancy.
> >>> I'm sure there's more LINQ-like clones out there.
> >>>
> >>> As far as I'm concerned, I'd really like to have a thorough look at
> stuff
> >>> like db4o or couchDB, especially performance wise. I did
> Hibernate/iBatis
> >>> in
> >>> the past and am currently working on a project with iBatis again. Both
> >>> have
> >>> advantages and disadvantages and I don't "love" either. I would rather
> not
> >>> have to care about tables, objects,the mighty mismatch (and in
> Hibernate's
> >>> case the mighty session) anymore, but just shove that damn thing into
> an
> >>> object database ;)
> >>>
> >>> *hides from enraged DBAs and their optimised queries*
> >>>
> >>>
> >>>
> >>> Nino.Martinez wrote:
> >>>
> >>>
>  Yeah seems to be nice...
> 
>  At WUG DK we discussed. That if using stuff like hibernate, for simple
>  cruds it's nice but if you have a complex object graph it becomes very
>  troublesome to use (if you use cascade all etc.)..
> 
>  Ames, Tim wrote:
> 
> 
> > Looks like it has a lot in common with JPersist.  That is what I have
> > been using. No XML, all POJO.
> >
> > -Original Message-
> > From: Nino Saturnino Martinez Vazquez Wael
> > [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, October 16, 2008 11:28 AM
> > To: users@wicket.apache.org
> > Subject: have anyone tried empire-DB?
> >
> > So have you tried it with wicket?
> >
> > http://incubator.apache.org/empire-db/
> >
> > --
> > -Wicket for love
> >
> > Nino Martinez Wael
> > Java Specialist @ Jayway DK
> > http://www.jayway.dk
> > +45 2936 7684
> >
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> > _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> > _
> > _
> >
> > EMAIL CONFIDENTIALITY NOTICE
> > This Email message, and any attachments, may contain confidential
> > patient health information that is legally protected. This
> information is
> > intended only for the use of the individual or entity named above.
> The
> > authorized recipient of this information is prohibited from
> > disclosing this information to any other party unless required to do
> so
> > by law or regulation and is required to destroy the information after
> its
> > stated need has been fulfilled. If you are not the intended
> recipient, you
> > are hereby notified that any disclosure, copying, distribution, or
> action
> > taken in reliance on the contents of this message is strictly
> prohibited.
> > If you have received this information in e

Re: GMAP2 with Wicket AjaxTabbedPanel

2008-10-22 Thread Martin Funk
Hi kiks,

could you boil that down to a quickstart. I'll be happy to look into that.

mf

2008/10/23, ej595 <[EMAIL PROTECTED]>:
>
> Im having a most strange problem and im wondering if anyone has a fix at
> all.
> I have a series of ajax tabbed panels one of which is supposed to show a
> gmap2 google map. For some totally bizarre reason, the tab blows up with the
> following error ...
>
> " ERROR org.apache.wicket.RequestCycle - Too many path parts, please provide
> sufficient number of path parameter names"
>
> Now, ive inspected the URI and noticed that the bookmarkable page link has
> some weird googlemap url appended to it, and hence makes the bookmarkable
> link seem to have more parameters then the mount statement declares. So ...
> URI SHOULD be /V/2/ON/Color/Brown/  But is coming out as
> /V/2/ON/Color/Brown/http://www.google.com/jsapi
> I have no idea at all why this is occurring. If the same components are
> stored outside the tabbedpanel, then its all fine.
>
> Has anyone come across this, or does anyone have a workaround ?
> Many thanks in advance.
> --
> View this message in context:
> http://www.nabble.com/GMAP2-with-Wicket-AjaxTabbedPanel-tp20124469p20124469.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



What's the difference between Check and CheckBox

2008-10-22 Thread Minto van der Sluis

Messing around with unittesting a CheckBox, I discovered Check as well:

org.apache.wicket.markup.html.form.Check;
org.apache.wicket.markup.html.form.CheckBox;

To me it's not very clean what the difference is, since they are both
attached to the same markup:



Can anyone enlighten me ?

regards,

Minto van der Sluis
-- 
View this message in context: 
http://www.nabble.com/What%27s-the-difference-between-Check-and-CheckBox-tp20125256p20125256.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to unittest a checkbox

2008-10-22 Thread Minto van der Sluis

thx for your reply.

Yes I already tried used FormTester, but I can't find any method to change
the value of a CheckBox besides the "select" method. But my checkbox is a
stand-alone one and not part of a group. Using the select method did not
results in the outcome I was looking for. :-(

1) Should I use a checkgroup with just one checkbox ? 
2) Have I overlooked some other way to change the value of a CheckBox from
inside a unittest?

In regard to option 1, it feels incorrect to change working code just to
facilitate unittesting? If that's what it takes I will change my code. It's
just that I wonder if I missed something.

regards,

Minto van der Sluis


jwcarman wrote:
> 
> Have you tried using FormTester?
> 
> On Wed, Oct 22, 2008 at 5:20 AM, Minto van der Sluis
> <[EMAIL PROTECTED]> wrote:
>>
>> Hi folks,
>>
>> Creating unittests for my pages I managed to read the value a checkbox of
>> a
>> rendered page. I used:
>>
>>tester.assertModelValue( "form:myCheckBox, true );
>>
>> However I failed to change that value in my unittest prior to submitting
>> the
>> form.
>>
>> Can anyone point in the right direction?
>>
>> Kind regards,
>>
>> Minto van der Sluis
>>
>> --
>> View this message in context:
>> http://www.nabble.com/how-to-unittest-a-checkbox-tp20106917p20106917.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-unittest-a-checkbox-tp20106917p20125169.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Associating a request to a Session

2008-10-22 Thread David Leangen
On Wed, 2008-10-22 at 23:10 -0700, Serkan Camurcuoglu wrote:
> I think your session id changes because you access the server as
> localhost:8080 for the first time, but yahoo forwards you back to
> www.bioscene.co.jp (which I think is the same host), so you access the same
> server with a different host name, and your browser does not send the same
> cookie..

Damn, you're smart!

Thanks for taking the time to look at this. I got so used to debugging
this way that I didn't even think about that.

OpenID is a bit problematic to debug because if you are not on the
production host, you need to jump through all sorts of hoops to get it
working.


Anyway, thanks a lot! :-)


Cheers,
=dml




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: Antwort: Wicket community traction / Wicket Web 2.0 experience

2008-10-22 Thread Igor Vaynberg
http://ptrthomas.wordpress.com/2008/09/04/wicket-and-gwt-compared-with-code/

-igor

On Wed, Oct 22, 2008 at 10:42 PM,  <[EMAIL PROTECTED]> wrote:
> Hi Bruno,
>
> I appreciate it that you pray for the rest of my team :-) I won't be a bad
> looser, so I will give my best with the other devs to build a good
> solution with GWT. I really hope that it is not inherent to GWT that the
> code gets big and unmaintainable. So I cross my fingers and hope for the
> best...
>
> Kind regards,
> Christoph

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: have anyone tried empire-DB?

2008-10-22 Thread Igor Vaynberg
im curious in what way does it influence java code...

-igor

On Wed, Oct 22, 2008 at 10:59 PM, Wayne Pope
<[EMAIL PROTECTED]> wrote:
> Nino what do you recommend in terms orf DB framework. We're currently using
> Hibernate and I'm personally finding it a pain - it seems to influence the
> java code way too much and it create some horrible joins if we're not
> carefull. Any suggestions that you've used in the real world?
>
> On Fri, Oct 17, 2008 at 8:15 PM, Nino Saturnino Martinez Vazquez Wael <
> [EMAIL PROTECTED]> wrote:
>
>> This is interesting:
>>
>> (JaQu) Provide API level compatibility with JPA (so that JaQu can be used
>> as an extension of JPA).
>>
>> But I think something similar are on its way for JPA 2.0..?
>>
>>
>> marco.behler wrote:
>>
>>> I gave empireDB a quick look a while ago and it looks interesting. Besides
>>> JPersist I also stumbled upon JaQu
>>> (http://www.h2database.com/html/jaqu.html), which is still in its
>>> infancy.
>>> I'm sure there's more LINQ-like clones out there.
>>>
>>> As far as I'm concerned, I'd really like to have a thorough look at stuff
>>> like db4o or couchDB, especially performance wise. I did Hibernate/iBatis
>>> in
>>> the past and am currently working on a project with iBatis again. Both
>>> have
>>> advantages and disadvantages and I don't "love" either. I would rather not
>>> have to care about tables, objects,the mighty mismatch (and in Hibernate's
>>> case the mighty session) anymore, but just shove that damn thing into an
>>> object database ;)
>>>
>>> *hides from enraged DBAs and their optimised queries*
>>>
>>>
>>>
>>> Nino.Martinez wrote:
>>>
>>>
 Yeah seems to be nice...

 At WUG DK we discussed. That if using stuff like hibernate, for simple
 cruds it's nice but if you have a complex object graph it becomes very
 troublesome to use (if you use cascade all etc.)..

 Ames, Tim wrote:


> Looks like it has a lot in common with JPersist.  That is what I have
> been using. No XML, all POJO.
>
> -Original Message-
> From: Nino Saturnino Martinez Vazquez Wael
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 16, 2008 11:28 AM
> To: users@wicket.apache.org
> Subject: have anyone tried empire-DB?
>
> So have you tried it with wicket?
>
> http://incubator.apache.org/empire-db/
>
> --
> -Wicket for love
>
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> _
> _
>
> EMAIL CONFIDENTIALITY NOTICE
> This Email message, and any attachments, may contain confidential
> patient health information that is legally protected. This information is
> intended only for the use of the individual or entity named above. The
> authorized recipient of this information is prohibited from
> disclosing this information to any other party unless required to do so
> by law or regulation and is required to destroy the information after its
> stated need has been fulfilled. If you are not the intended recipient, you
> are hereby notified that any disclosure, copying, distribution, or action
> taken in reliance on the contents of this message is strictly prohibited.
> If you have received this information in error, please notify the sender
> immediately by replying to this message and delete the message from your
> system.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
 --
 -Wicket for love

 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





>>>
>>>
>>>
>>
>> --
>> -Wicket for love
>>
>> Nino Martinez Wael
>> Java Specialist @ Jayway DK
>> http://www.jayway.dk
>> +45 2936 7684
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to use Menu component in wicket-yui stuff?

2008-10-22 Thread 张伟
Hello,
I want to konw how to use Menu component in wicket-yui stuff? Can anyone
give me a demo or example? I could ont find any javadoc or sourcecode.
Thanks!


Antwort: Re: Antwort: Wicket community traction / Wicket Web 2.0 experience

2008-10-22 Thread christoph . grothaus
Hi Bruno,

I appreciate it that you pray for the rest of my team :-) I won't be a bad 
looser, so I will give my best with the other devs to build a good 
solution with GWT. I really hope that it is not inherent to GWT that the 
code gets big and unmaintainable. So I cross my fingers and hope for the 
best...

Kind regards,
Christoph

Re: Associating a request to a Session

2008-10-22 Thread Serkan Camurcuoglu

I think your session id changes because you access the server as
localhost:8080 for the first time, but yahoo forwards you back to
www.bioscene.co.jp (which I think is the same host), so you access the same
server with a different host name, and your browser does not send the same
cookie..

I hope I did not get it all wrong..




David Leangen-8 wrote:
> 
>> Yeah... didn't explain this well.
>> 
>> Here's the thread in context:
>> 
>> http://www.nabble.com/Associating-a-request-to-a-Session-td19641227.html
> 
> And here's headers of the handshake(with some editing for privacy and
> brevity)...
> 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Associating-a-request-to-a-Session-tp19641227p20124897.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Antwort: Wicket community traction / Wicket Web 2.0 experience

2008-10-22 Thread Nino Saturnino Martinez Vazquez Wael

Hehe Bruno

I were about to write a similar mail..

[EMAIL PROTECTED] wrote:

That's ok Chris,

It's just a matter of time until they find out they did the wrong 
choice - unless this is going to be a small software, with very 
specific functions, like GMail. :-) There's a team by my side here 
that is working in a sub-project with GWT and they chose it using that 
same argument: "easy creation of Web2.0 style user interfaces". But 
now, they are going nuts because of how big the code is getting (and 
the project is by far from the end) - so, it's not just about few 
effort. You have to consider everything. Maintenance is one of them. 
By the way, it's really hard to create custom components within GWT. 
So I think you can see the problem here about code size.


But, good luck for the rest of you team... I'll pray for them... :-D

Best regards (really),
Bruno

On Oct 22, 2008 6:41am, [EMAIL PROTECTED] wrote:

Martin, Richard, thanks for your answers!



Unfortunately, I could not convince the other devs of the various

advantages of wicket. The team chose GWT because it allows to create Web

2.0 style user interfaces with fewer effort.



Regards,

Christoph




--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: have anyone tried empire-DB?

2008-10-22 Thread Wayne Pope
Nino what do you recommend in terms orf DB framework. We're currently using
Hibernate and I'm personally finding it a pain - it seems to influence the
java code way too much and it create some horrible joins if we're not
carefull. Any suggestions that you've used in the real world?

On Fri, Oct 17, 2008 at 8:15 PM, Nino Saturnino Martinez Vazquez Wael <
[EMAIL PROTECTED]> wrote:

> This is interesting:
>
> (JaQu) Provide API level compatibility with JPA (so that JaQu can be used
> as an extension of JPA).
>
> But I think something similar are on its way for JPA 2.0..?
>
>
> marco.behler wrote:
>
>> I gave empireDB a quick look a while ago and it looks interesting. Besides
>> JPersist I also stumbled upon JaQu
>> (http://www.h2database.com/html/jaqu.html), which is still in its
>> infancy.
>> I'm sure there's more LINQ-like clones out there.
>>
>> As far as I'm concerned, I'd really like to have a thorough look at stuff
>> like db4o or couchDB, especially performance wise. I did Hibernate/iBatis
>> in
>> the past and am currently working on a project with iBatis again. Both
>> have
>> advantages and disadvantages and I don't "love" either. I would rather not
>> have to care about tables, objects,the mighty mismatch (and in Hibernate's
>> case the mighty session) anymore, but just shove that damn thing into an
>> object database ;)
>>
>> *hides from enraged DBAs and their optimised queries*
>>
>>
>>
>> Nino.Martinez wrote:
>>
>>
>>> Yeah seems to be nice...
>>>
>>> At WUG DK we discussed. That if using stuff like hibernate, for simple
>>> cruds it's nice but if you have a complex object graph it becomes very
>>> troublesome to use (if you use cascade all etc.)..
>>>
>>> Ames, Tim wrote:
>>>
>>>
 Looks like it has a lot in common with JPersist.  That is what I have
 been using. No XML, all POJO.

 -Original Message-
 From: Nino Saturnino Martinez Vazquez Wael
 [mailto:[EMAIL PROTECTED]
 Sent: Thursday, October 16, 2008 11:28 AM
 To: users@wicket.apache.org
 Subject: have anyone tried empire-DB?

 So have you tried it with wicket?

 http://incubator.apache.org/empire-db/

 --
 -Wicket for love

 Nino Martinez Wael
 Java Specialist @ Jayway DK
 http://www.jayway.dk
 +45 2936 7684


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
 _
 _

 EMAIL CONFIDENTIALITY NOTICE
 This Email message, and any attachments, may contain confidential
 patient health information that is legally protected. This information is
 intended only for the use of the individual or entity named above. The
 authorized recipient of this information is prohibited from
 disclosing this information to any other party unless required to do so
 by law or regulation and is required to destroy the information after its
 stated need has been fulfilled. If you are not the intended recipient, you
 are hereby notified that any disclosure, copying, distribution, or action
 taken in reliance on the contents of this message is strictly prohibited.
 If you have received this information in error, please notify the sender
 immediately by replying to this message and delete the message from your
 system.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



>>> --
>>> -Wicket for love
>>>
>>> Nino Martinez Wael
>>> Java Specialist @ Jayway DK
>>> http://www.jayway.dk
>>> +45 2936 7684
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
> --
> -Wicket for love
>
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Wicket AJAX update form TextField value from another field

2008-10-22 Thread steve222

Thanks.  I now have this fully working now with a customised model class
containing a setter to store the calculated field if upated from the Wicket
form.  

Will look at FormComponentPanel - thanks for the suggestion.


Steve





Timo Rantalaiho wrote:
> 
> On Wed, 22 Oct 2008, steve222 wrote:
>> But DiscountPercentage does not have a setter in my model - just a getter
>> (it's calculated for viewing only and does not get persisted anywhere). 
>> So
>> I get errors when Wicket attempts to update the model.
> 
> I would have done this by using customised models, but a 
> while back in a similar discussion on this list Igor 
> suggested using FormComponentPanel. You can probably solve
> your situation with it.
> 
> Best wishes,
> Timo
> 
> -- 
> Timo Rantalaiho   
> Reaktor Innovations Oyhttp://www.ri.fi/ >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-AJAX-update-form-TextField-value-from-another-field-tp20117258p20124799.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Associating a request to a Session

2008-10-22 Thread David Leangen
> Yeah... didn't explain this well.
> 
> Here's the thread in context:
> 
> http://www.nabble.com/Associating-a-request-to-a-Session-td19641227.html

And here's headers of the handshake(with some editing for privacy and
brevity)...

I mark some notes below with "*" where the session gets switched during
the handshake.


[Load the sign in page]
::
GET /openid HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1)
Gecko/20060313 Fedora/1.5.0.1-9 Firefox/1.5.0.1 pango-te
xt
Accept: text/xml,application/xml,application/xhtml
+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.7,ja;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: languagePref=en; cookieSupport=true; JSESSIONID=f5n
iml6s6ts9
Cache-Control: max-age=0

[ok]
::
HTTP/1.1 200
Content-Type: text/html; charset=utf-8
Content-Language: en
Pragma: no-cache
Cache-Control: no-cache, max-age=0, must-revalidate

[Submit the signin page]
::
POST /openid/signIn/?wicket:interface=:3:form.openId::IFormSubmitListener:: 
HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1)
Gecko/20060313 Fedora/1.5.0.1-9 Firefox/1.5.0.1 pango-te
xt
Accept: text/xml,application/xml,application/xhtml
+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.7,ja;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: languagePref=en; cookieSupport=true; JSESSIONID=f5n
iml6s6ts9
Referer: http://localhost:8080/openid
Content-Type: application/x-www-form-urlencoded
Content-Length: 21

[Redirect to OpenID handler)]
::
HTTP/1.1 302
Location: http://localhost:8080/openid/authorization/?uid=https%3A%2F%
2Fme.yahoo.com


[Resubmit request to OpenId handler using requested OpenID for auth]
::
GET /openid/authorization/?uid=https%3A%2F%2Fme.yahoo.com HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1)
Gecko/20060313 Fedora/1.5.0.1-9 Firefox/1.5.0.1 pango-te
xt
Accept: text/xml,application/xml,application/xhtml
+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.7,ja;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: languagePref=en; cookieSupport=true; JSESSIONID=f5n
iml6s6ts9
Referer: http://localhost:8080/openid

[Redirect to Yahoo (our OpenID Provider)]
::
HTTP/1.1 302
Location: https://open.login.yahooapis.com/openid/op/auth?lotsofparams

[Yahoo is verifying our identity before processing the auth]
[**Note that from here on, we lose our session id because a new one was
created]
::
GET /openid/verification HTTP/1.1
Host: www.bioscene.co.jp
Accept: application/xrds+xml,text/html,text/plain
Max-Forwards: 9
X-Forwarded-Host: www.bioscene.co.jp, www.bioscene.co.jp

[Tell Yahoo what they want to know]
::
HTTP/1.1 200
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: cookieSupport=true;Path=/;Expires=Sat, 22-Nov-08 05:20:40
GMT
Set-Cookie: JSESSIONID=o8cfish2xt6v;Path=/
Content-Type: text/html; charset=utf-8
Content-Language: en-US
X-XRDS-Location: locationOfXrds
Pragma: no-cache
Cache-Control: no-cache, max-age=0, must-revalidate, no-store

[Yahoo has accepted the auth and replies with an auth token]
[*Note that once again we have a different session id]
::
GET /openid/verification?authToken HTTP/1.1
Host: www.bioscene.co.jp
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1)
Gecko/20060313 Fedora/1.5.0.1-9 Firefox/1.5.0.1 pango-te
xt
Accept: text/xml,application/xml,application/xhtml
+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.7,ja;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Cookie: cookieSupport=true; languagePref=en; JSESSIONID=iwjw2dd164zn
Max-Forwards: 9
X-Forwarded-Host: www.bioscene.co.jp, www.bioscene.co.jp

[We can now carry on... except that this is not longer the same session]
::
HTTP/1.1 200
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: JSESSIONID=pb0x661fuk0r;Path=/
Content-Type: text/html; charset=utf-8
Content-Language: en
Pragma: no-cache
Cache-Control: no-cache, max-age=0, must-revalidate






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to pass parameters to a BreadCrumbPanel

2008-10-22 Thread Wayne Pope
Hi Naveen,

I do it something like this:

TabbedPanel tabbedPanel = new TabbedPanel("tabs", tabs){
@Override
protected WebMarkupContainer newLink(String linkId, final int
index) {
PageParameters parameters = new PageParameters();
parameters.put("selected", ((ITab) getTabs().get(index))
.getTitle().getObject());
parameters.put("somethingIneedID", somethingIneedID);
return new BookmarkablePageLink(linkId, MyPage.class,
parameters);
}

};
if (found)
tabbedPanel.setSelectedTab(selected);

if (tabSelect != null)
tabbedPanel.setSelectedTab(tabSelect);
add(tabbedPanel);

you should be able to figue it out from there.
Wayne


On Tue, Oct 21, 2008 at 9:06 PM, Nav Che <[EMAIL PROTECTED]> wrote:

> Hello All,
>
> How do i pass parameters between panels. Basically i have panels in my
> appilcation which use breadcrumb model.
>
> Say on panel A i display list of users and I want the user Id to be a link
> upon clickin it should show the edit panel ( panel B )  of user and for
> which it shld either pass user object or userid.
>
> Please advise.
>
> Thanks in advance
>
> Regards
> naveen
>


GMAP2 with Wicket AjaxTabbedPanel

2008-10-22 Thread ej595

Im having a most strange problem and im wondering if anyone has a fix at all.
I have a series of ajax tabbed panels one of which is supposed to show a
gmap2 google map. For some totally bizarre reason, the tab blows up with the
following error ... 

" ERROR org.apache.wicket.RequestCycle - Too many path parts, please provide
sufficient number of path parameter names"

Now, ive inspected the URI and noticed that the bookmarkable page link has
some weird googlemap url appended to it, and hence makes the bookmarkable
link seem to have more parameters then the mount statement declares. So ...
URI SHOULD be /V/2/ON/Color/Brown/  But is coming out as
/V/2/ON/Color/Brown/http://www.google.com/jsapi
I have no idea at all why this is occurring. If the same components are
stored outside the tabbedpanel, then its all fine.

Has anyone come across this, or does anyone have a workaround ?
Many thanks in advance.
-- 
View this message in context: 
http://www.nabble.com/GMAP2-with-Wicket-AjaxTabbedPanel-tp20124469p20124469.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: redirect issue on IE causing HTTP 4040

2008-10-22 Thread Igor Vaynberg
create a quickstart that reproduces this and attach it to a jira issue.

-igor

On Wed, Oct 22, 2008 at 9:27 PM, freak182 <[EMAIL PROTECTED]> wrote:
>
> Hello Igor,
>
> I have a problem in IE when i redirect wicket pages using javascript using
> location.href = '?wicket:interface=:3' . here is the scenario:
>
> public class InitBehavior extends AbstractBehavior
> {
>   final IModel params = new AbstractReadOnlyModel() {
>
>@Override
>public Object getObject()
>{
>
>// redirect url's
>map.put("roamUrl", RequestCycle.get().urlFor(NoIdPage.class,
> null));
>map.put("loginUrl", RequestCycle.get().urlFor(new
> LoginPage()));
>map.put("errorUrl", RequestCycle.get().urlFor(new
> ErrorPage()));
>return map;
>}
>
>};
>
>component.add(TextTemplateHeaderContributor.forJavaScript(
>InitBehavior.class, "init.js", params));
>super.bind(component);
>}
>
> ...
> }
>
> and in init.js
>
> function clientReady() {
>
>
>// detect if arcot id exist
>if (!IDExists(strWFUserID)) {
>if (Flag) {
>//
> document.getElementById('divErrPopup').style.display = 'block';
>
>location.href = '${errorUrl}';
>} else {
>
>
> location.href = '${roamUrl}';
>}
>} else {
>
>
>location.href = '${loginUrl}';
>
>}
> }
>
> this script is executed upon loading of the page. This working fine in
> firefox. im using wicket 1.3.4 i also try the latest release 1.3.5 but it
> still problem in IE(http://localhost:8080/test/undefined). I also, mount(new
> QueryStringUrlCodingStrategy("noid", NoIdPage.class)); again this works only
> in firefox but not in IE. since our client mostly IE users. i also found
> this bug https://issues.apache.org/jira/browse/WICKET-1449 ... How can i
> solve this problem? Is there a work around to this?
>
> Thanks a lot.
> Cheers.
>
> --
> View this message in context: 
> http://www.nabble.com/redirect-issue-on-IE-causing-HTTP-4040-tp20124228p20124228.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



redirect issue on IE causing HTTP 4040

2008-10-22 Thread freak182

Hello Igor,

I have a problem in IE when i redirect wicket pages using javascript using
location.href = '?wicket:interface=:3' . here is the scenario:

public class InitBehavior extends AbstractBehavior
{
   final IModel params = new AbstractReadOnlyModel() {

@Override
public Object getObject()
{
   
// redirect url's
map.put("roamUrl", RequestCycle.get().urlFor(NoIdPage.class,
null));
map.put("loginUrl", RequestCycle.get().urlFor(new
LoginPage()));
map.put("errorUrl", RequestCycle.get().urlFor(new
ErrorPage()));
return map;
}

};

component.add(TextTemplateHeaderContributor.forJavaScript(
InitBehavior.class, "init.js", params));
super.bind(component);
}

...
}

and in init.js

function clientReady() {
   
   
// detect if arcot id exist
if (!IDExists(strWFUserID)) {
if (Flag) {
//
document.getElementById('divErrPopup').style.display = 'block';
   
location.href = '${errorUrl}';
} else {
   
   
 location.href = '${roamUrl}';
}
} else {
   
   
location.href = '${loginUrl}';
   
}
}

this script is executed upon loading of the page. This working fine in
firefox. im using wicket 1.3.4 i also try the latest release 1.3.5 but it
still problem in IE(http://localhost:8080/test/undefined). I also, mount(new
QueryStringUrlCodingStrategy("noid", NoIdPage.class)); again this works only
in firefox but not in IE. since our client mostly IE users. i also found
this bug https://issues.apache.org/jira/browse/WICKET-1449 ... How can i
solve this problem? Is there a work around to this?

Thanks a lot.
Cheers.

-- 
View this message in context: 
http://www.nabble.com/redirect-issue-on-IE-causing-HTTP-4040-tp20124228p20124228.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket AJAX update form TextField value from another field

2008-10-22 Thread Timo Rantalaiho
On Wed, 22 Oct 2008, steve222 wrote:
> But DiscountPercentage does not have a setter in my model - just a getter
> (it's calculated for viewing only and does not get persisted anywhere).  So
> I get errors when Wicket attempts to update the model.

I would have done this by using customised models, but a 
while back in a similar discussion on this list Igor 
suggested using FormComponentPanel. You can probably solve
your situation with it.

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to add item to repeater without updating all items

2008-10-22 Thread Timo Rantalaiho
On Wed, 22 Oct 2008, metalotus wrote:
> "partial ajax updates on repeater components"
> https://issues.apache.org/jira/browse/WICKET-1177
> 
> This bug mentions: You would probably need something new like 
> 
>   AjaxRequestTarget#insertComponent(String parentMarkupId, index) 
> 
> to insert a new component's markup into the browser's HTML. 
> 
> 
> Okay, so I am wondering how to implement such a method?

Maybe something like this

  
http://www.nabble.com/Adding-item-to-ListView-over-Ajax---refresh-only-newest-row-tt11272937.html#a11275262

Best wishes,
Timo

-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Associating a request to a Session

2008-10-22 Thread David Leangen
> What exactly do you want to achieve, from the user 
> perspective?

Yeah... didn't explain this well.

Here's the thread in context:

http://www.nabble.com/Associating-a-request-to-a-Session-td19641227.html


I am trying to get OpenID authentication to work in Wicket.

The related part on my original question is this:

> I am forwarding a request to a third party server (OpenId 
> Provider), so I guess it's normal that Wicket thinks it's 
> not part of the same session... 

Basically, to authenticate the user, I throw a 
  RestartResponseException( OpenIdSignInPage.class );

The user enters her OpenID, as the relying party, I forward the request
to the OpenID Provider (OP), and the OP sends me back a reply with an
authentication token.

What the user sees is:

  1. Try to access protected page
  2. Redirect to sign in page
  3. Redirect to OP site (where authentication occurs)
  4. Redirect again back to original destination

The problem is that 4 ends up being a different Session from 1, for
reasons mentioned previously.

Ideally, just like the "normal" sign in procedure, if we take the above
as one single "AUTH" step, the user should see:

  A. Try to perform task
  B. Interrupt to AUTH
  C. Continue with original request

A -> C should normally be in the same Session, just like the "normal"
sign in does.


> Maybe you could have your own token in the URL by using a
> suitable url encoding strategy, and store the data you want
> to restore in the database.

Possible, but ideally, I'd like the OpenID login to work just like a
"normal" login, as described above.


Cheers,
=dml




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Associating a request to a Session

2008-10-22 Thread Timo Rantalaiho
On Thu, 23 Oct 2008, David Leangen wrote:
> Before I dig into the container implementation (which I would prefer to
> avoid), does anybody have any suggestions about how I can somehow return
> to the original session, or at least copy over the state of the old
> session into the new session in a clean way?

What exactly do you want to achieve, from the user 
perspective?

Maybe you could have your own token in the URL by using a
suitable url encoding strategy, and store the data you want
to restore in the database.

Best wishes,
Timo


-- 
Timo Rantalaiho   
Reaktor Innovations Oyhttp://www.ri.fi/ >

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to add item to repeater without updating all items

2008-10-22 Thread metalotus

"partial ajax updates on repeater components"
https://issues.apache.org/jira/browse/WICKET-1177

This bug mentions: You would probably need something new like 

  AjaxRequestTarget#insertComponent(String parentMarkupId, index) 

to insert a new component's markup into the browser's HTML. 


Okay, so I am wondering how to implement such a method?


-- 
View this message in context: 
http://www.nabble.com/How-to-add-item-to-repeater-without-updating-all-items-tp20122998p20123439.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Associating a request to a Session

2008-10-22 Thread David Leangen

> Before I dig into the container implementation (which I would prefer to
> avoid), does anybody have any suggestions about how I can somehow return
> to the original session, or at least copy over the state of the old
> session into the new session in a clean way?

Actually, the only thing I want to do is
continueToOriginalDestination().

So maybe I can just copy the state of this originalDestination from the
original session into the new one?




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Associating a request to a Session

2008-10-22 Thread David Leangen
On Tue, 2008-09-23 at 20:50 -0700, Igor Vaynberg wrote:
> wicket does not associate a request with a session. wicket uses
> httpsession to store its own session object.
> 
> what you want is to know how the servlet container associates a
> request with http session. usually that is done with the jsessionid
> cookie or by appending jsessionid into the url.


I tried playing around with this, but was not successful.

Essentially, I appended the jsessionid parameter into the url (and
various other things related to jessionid), but I guess the container is
too smart for that trick. I was not able to succeed that way.

Before I dig into the container implementation (which I would prefer to
avoid), does anybody have any suggestions about how I can somehow return
to the original session, or at least copy over the state of the old
session into the new session in a clean way?


Thank you!
=dml





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to add item to repeater without updating all items

2008-10-22 Thread metalotus

hi,

I have an AbstractRepeater, and I want to add an item to the repeater and
display it without updating all the items in the repeater. When I try
AjaxRequestTarget.addComponent(newItem) I get the following error: 

"Unable to find the markup for the component. That may be due to transparent
containers or components implementing IComponentResolver"

I am willing to try *anything* to get this to work.

This bug related "attempt to get a list that is ajax refreshed just at the
tail", but I don't know how to re-use the solution.
https://issues.apache.org/jira/browse/WICKET-841

We've come up with a few design for repeaters that allow adding an
individual item without repainting the whole thing. However, they are kinda
complex and was wondering if someone already knows how to do it.
-- 
View this message in context: 
http://www.nabble.com/How-to-add-item-to-repeater-without-updating-all-items-tp20122998p20122998.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Static injection not working (wicket-guice)

2008-10-22 Thread Edgar Merino

Anyone for this?


Edgar Merino escribió:

Hello,

   I've been trying to inject a service to some classes that are not 
wicket components, I've asked here and was suggested to use static 
injection: InjectorHolder.getInjector().inject(this); however this is 
not working with guice, I always get an illegalstateexception, 
injectorholder has not been assigned an injector. I've tried 
((GuiceInjectorHolder) 
(RequestCycle.get().getApplication().getMetaData(GuiceInjectorHolder.INJECTOR_KEY))).getInjector().injectMembers(this); 
however that gives me serialization problems, since wicket is not 
creating a proxy for my service. I'm on my way to give salve a try but 
I'm having some problems there too (waiting for a response from the 
Discussion group), what suggestions can you make?


Thanks in advance,
Edgar Merino




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket AJAX update form TextField value from another field

2008-10-22 Thread steve222

But not for the field where the model does not have a setter (hibernate POJO
- and no field in the database, just a formula).   

Fairly obvious why that's not going to work for an update - but I can't
think of a solution on how to change the calculated value just to show it on
the form.


Steve 





steve222 wrote:
> 
> Ooops - my error.  
> 
> I need to do something like: 
> 
>pcntDiscount.setModel(new Model(amount.getModelObject().toString()));
> 
> Then the AjaxFormComponentUpdatingBehavior works as expected.
> 
> 
> Steve 
> 
> 
> 
> 
> 
> steve222 wrote:
>> 
>> Many thanks for the detailed answer. 
>> 
>> I don't think the single field AbsoluteOrPercentage idea will work for me
>> without a lot of other changes.  I use the same form for editing a record
>> as creating a new one.  So I actually need to show both the
>> AbsoluteDiscount and PercentageDiscount on the form at the same time -
>> user enters % during initial entry, he needs to see % on later edit, etc. 
>> Both fields need to be editable, with the one that doesn't get edited
>> being calculated.  But thanks for the idea and the detail on how to
>> implement this. 
>> 
>> I've been attempting to do it with separate fields for AbsoluteDiscount
>> and PercentageDiscount - but it does not work for me.  My model object
>> used in the form does not have setters for the calculated field
>> PercentageDiscount - just a getter to display the calculated % value.  So
>> I can't update this with AjaxFormComponentUpdatingBehavior.   
>> 
>> And it seems I can't update the fields using AjaxEventBehavior, eg: 
>> 
>> final RequireTextfield amount = new RequiredTextfield("amount",
>> Double.class);
>> amount.add(DoubleMinimumValidator.minimum(1));
>> amount.setOutputMarkupId(true);
>> container.add(amount);   
>>  
>> amount.add(new AjaxEventBehavior("onblur") {  
>>  protected void onEvent(AjaxRequestTarget target) {  
>>  
>>  // this will always be null on new data entry, and old value
>> on edit
>>   pcntDiscount.setModelObject(amount.getModelObject().toString());
>>   target.addComponent(pcntDiscount);
>>  }
>> });
>> 
>> 
>> 
>> jWeekend wrote:
>>> 
>>> Steve,
>>> 
>>> If you prefer not to take the easy option and add a couple of radio
>>> buttons to let the user select currency or percentage input, that could
>>> also control a couple of labels (or a border) that shows, in a locale
>>> specific way, the currency symbol or the percentage sign you could ...
>>> create an AbsoluteOrPercentage class an instance of which will back the
>>> model of your DiscountAmount field. Make a validator that checks that
>>> the last character entered looks like an int or a '%' and that the other
>>> characters represent a number, and, if required, put your validation
>>> messages in the appropriate place. Add this validator to your
>>> DiscountAmount text field. Make an appropriate converter (implement
>>> IConverter - very simple logic required for both methods) and override
>>> getConverter on your text field to return it for your
>>> AbsoluteOrPercentage class. If this text field will be useful elsewhere,
>>> make a (top level) subclass of TextField - AbsoluteOrPercentageTextField
>>> for instance that does all of the above.
>>> 
>>> It is not clear from your post what you want updated, but let's assume
>>> you have three fields, one for each of SalePrice, DiscountAmount and
>>> ActualAmount (price with discount applied) and you want the latter
>>> updated. Add an AjaxFormComponentUpdatingBehavior (probably "onblur") to
>>> both the input fields. In the onUpdate methods of each update the
>>> (dynamic) model object backing the ActualAmount field (probably rendered
>>> by a label since it is not meant to be edited by the user). Don't forget
>>> to add your "actualAmountTextField" component to the AjaxRequestTarget
>>> in both your onUpdate methods and also to request a markup id for
>>> actualAmountTextField - actualAmountField.setMarkupId(true) - where you
>>> build up the container. If this lot is likely to be useful elsewhere,
>>> wrap all three fields (and probably all the rest of the stuff described
>>> above) in a Panel so you can just drop it in a div anywhere you like
>>> later on.
>>> 
>>> Does that do it?
>>> 
>>> Regards - Cemal
>>>  http://www.jWeekend.co.uk  http://jWeekend.co.uk  
>>> 
>>> 
>>> 
>>> 
>>> steve222 wrote:
 
 Hi.  Hopefully I can explain this scenario OK - I'll try to keep it
 simple.
 
 On a form, I have a couple of TextFields - SalePrice and
 DiscountAmount.  
 
 After the user enters SalePrice, I need a way to allow the user to
 enter the DiscountAmount as either a flat rate or as a percentage of
 the SalePrice.
 
 For example, if entered SalePrice is 1000, the user could enter a flat
 DiscountAmount of 200.00.  Or they could enter 20%.  I'd like the
 option to do either since SalePrice might be 8,745 and the d

Re: Wicket AJAX update form TextField value from another field

2008-10-22 Thread steve222

Ooops - my error.  

I need to do something like: 

   pcntDiscount.setModel(new Model(amount.getModelObject().toString()));

Then the AjaxFormComponentUpdatingBehavior works as expected.


Steve 





steve222 wrote:
> 
> Many thanks for the detailed answer. 
> 
> I don't think the single field AbsoluteOrPercentage idea will work for me
> without a lot of other changes.  I use the same form for editing a record
> as creating a new one.  So I actually need to show both the
> AbsoluteDiscount and PercentageDiscount on the form at the same time -
> user enters % during initial entry, he needs to see % on later edit, etc. 
> Both fields need to be editable, with the one that doesn't get edited
> being calculated.  But thanks for the idea and the detail on how to
> implement this. 
> 
> I've been attempting to do it with separate fields for AbsoluteDiscount
> and PercentageDiscount - but it does not work for me.  My model object
> used in the form does not have setters for the calculated field
> PercentageDiscount - just a getter to display the calculated % value.  So
> I can't update this with AjaxFormComponentUpdatingBehavior.   
> 
> And it seems I can't update the fields using AjaxEventBehavior, eg: 
> 
> final RequireTextfield amount = new RequiredTextfield("amount",
> Double.class);
> amount.add(DoubleMinimumValidator.minimum(1));
> amount.setOutputMarkupId(true);
> container.add(amount);
>   
> amount.add(new AjaxEventBehavior("onblur") {  
>   protected void onEvent(AjaxRequestTarget target) {  
>   
>  // this will always be null on new data entry, and old value
> on edit
>pcntDiscount.setModelObject(amount.getModelObject().toString());
>target.addComponent(pcntDiscount);
>   }
> });
> 
> 
> 
> jWeekend wrote:
>> 
>> Steve,
>> 
>> If you prefer not to take the easy option and add a couple of radio
>> buttons to let the user select currency or percentage input, that could
>> also control a couple of labels (or a border) that shows, in a locale
>> specific way, the currency symbol or the percentage sign you could ...
>> create an AbsoluteOrPercentage class an instance of which will back the
>> model of your DiscountAmount field. Make a validator that checks that the
>> last character entered looks like an int or a '%' and that the other
>> characters represent a number, and, if required, put your validation
>> messages in the appropriate place. Add this validator to your
>> DiscountAmount text field. Make an appropriate converter (implement
>> IConverter - very simple logic required for both methods) and override
>> getConverter on your text field to return it for your
>> AbsoluteOrPercentage class. If this text field will be useful elsewhere,
>> make a (top level) subclass of TextField - AbsoluteOrPercentageTextField
>> for instance that does all of the above.
>> 
>> It is not clear from your post what you want updated, but let's assume
>> you have three fields, one for each of SalePrice, DiscountAmount and
>> ActualAmount (price with discount applied) and you want the latter
>> updated. Add an AjaxFormComponentUpdatingBehavior (probably "onblur") to
>> both the input fields. In the onUpdate methods of each update the
>> (dynamic) model object backing the ActualAmount field (probably rendered
>> by a label since it is not meant to be edited by the user). Don't forget
>> to add your "actualAmountTextField" component to the AjaxRequestTarget in
>> both your onUpdate methods and also to request a markup id for
>> actualAmountTextField - actualAmountField.setMarkupId(true) - where you
>> build up the container. If this lot is likely to be useful elsewhere,
>> wrap all three fields (and probably all the rest of the stuff described
>> above) in a Panel so you can just drop it in a div anywhere you like
>> later on.
>> 
>> Does that do it?
>> 
>> Regards - Cemal
>>  http://www.jWeekend.co.uk  http://jWeekend.co.uk  
>> 
>> 
>> 
>> 
>> steve222 wrote:
>>> 
>>> Hi.  Hopefully I can explain this scenario OK - I'll try to keep it
>>> simple.
>>> 
>>> On a form, I have a couple of TextFields - SalePrice and DiscountAmount.  
>>> 
>>> After the user enters SalePrice, I need a way to allow the user to enter
>>> the DiscountAmount as either a flat rate or as a percentage of the
>>> SalePrice.
>>> 
>>> For example, if entered SalePrice is 1000, the user could enter a flat
>>> DiscountAmount of 200.00.  Or they could enter 20%.  I'd like the option
>>> to do either since SalePrice might be 8,745 and the discount 2.75% or
>>> something (so hard to just calculat the true cash amount).  Or it might
>>> just really be a flat £200 in which case hard to calculate the %.
>>> 
>>> In a traditional app where I'm writing the JavaScript, I can think of
>>> various ways to do this involving extra fields for flatrate and/or % -
>>> then updating the real DiscountAmount field when the "dummy" fields
>>> change.
>>> 
>>> But I'm trying to work out an elegant

Re: Wicket AJAX update form TextField value from another field

2008-10-22 Thread steve222

Many thanks for the detailed answer. 

I don't think the single field AbsoluteOrPercentage idea will work for me
without a lot of other changes.  I use the same form for editing a record as
creating a new one.  So I actually need to show both the AbsoluteDiscount
and PercentageDiscount on the form at the same time - user enters % during
initial entry, he needs to see % on later edit, etc.  Both fields need to be
editable, with the one that doesn't get edited being calculated.  But thanks
for the idea and the detail on how to implement this. 

I've been attempting to do it with separate fields for AbsoluteDiscount and
PercentageDiscount - but it does not work for me.  My model object used in
the form does not have setters for the calculated field PercentageDiscount -
just a getter to display the calculated % value.  So I can't update this.   

And it seems I can't update the fields anyway since the need to be final 






  



jWeekend wrote:
> 
> Steve,
> 
> If you prefer not to take the easy option and add a couple of radio
> buttons to let the user select currency or percentage input, that could
> also control a couple of labels (or a border) that shows, in a locale
> specific way, the currency symbol or the percentage sign you could ...
> create an AbsoluteOrPercentage class an instance of which will back the
> model of your DiscountAmount field. Make a validator that checks that the
> last character entered looks like an int or a '%' and that the other
> characters represent a number, and, if required, put your validation
> messages in the appropriate place. Add this validator to your
> DiscountAmount text field. Make an appropriate converter (implement
> IConverter - very simple logic required for both methods) and override
> getConverter on your text field to return it for your AbsoluteOrPercentage
> class. If this text field will be useful elsewhere, make a (top level)
> subclass of TextField - AbsoluteOrPercentageTextField for instance that
> does all of the above.
> 
> It is not clear from your post what you want updated, but let's assume you
> have three fields, one for each of SalePrice, DiscountAmount and
> ActualAmount (price with discount applied) and you want the latter
> updated. Add an AjaxFormComponentUpdatingBehavior (probably "onblur") to
> both the input fields. In the onUpdate methods of each update the
> (dynamic) model object backing the ActualAmount field (probably rendered
> by a label since it is not meant to be edited by the user). Don't forget
> to add your "actualAmountTextField" component to the AjaxRequestTarget in
> both your onUpdate methods and also to request a markup id for
> actualAmountTextField - actualAmountField.setMarkupId(true) - where you
> build up the container. If this lot is likely to be useful elsewhere, wrap
> all three fields (and probably all the rest of the stuff described above)
> in a Panel so you can just drop it in a div anywhere you like later on.
> 
> Does that do it?
> 
> Regards - Cemal
>  http://www.jWeekend.co.uk  http://jWeekend.co.uk  
> 
> 
> 
> 
> steve222 wrote:
>> 
>> Hi.  Hopefully I can explain this scenario OK - I'll try to keep it
>> simple.
>> 
>> On a form, I have a couple of TextFields - SalePrice and DiscountAmount.  
>> 
>> After the user enters SalePrice, I need a way to allow the user to enter
>> the DiscountAmount as either a flat rate or as a percentage of the
>> SalePrice.
>> 
>> For example, if entered SalePrice is 1000, the user could enter a flat
>> DiscountAmount of 200.00.  Or they could enter 20%.  I'd like the option
>> to do either since SalePrice might be 8,745 and the discount 2.75% or
>> something (so hard to just calculat the true cash amount).  Or it might
>> just really be a flat £200 in which case hard to calculate the %.
>> 
>> In a traditional app where I'm writing the JavaScript, I can think of
>> various ways to do this involving extra fields for flatrate and/or % -
>> then updating the real DiscountAmount field when the "dummy" fields
>> change.
>> 
>> But I'm trying to work out an elegant way with Wicket/AJAX - without too
>> much success so far.  
>> 
>> Any suggestions - or links to similar examples?  Ideally, the fewer extra
>> dummy fields the better.
>> 
>> Thanks. 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-AJAX-update-form-TextField-value-from-another-field-tp20117258p20120528.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Example of pseudo-ajax file uploading using iframes

2008-10-22 Thread bryan0101

I have confirmed that the code attached is working great!!! (the attachment
is in tar. gzip format. use 7-zip)
THANK YOU CARLO! The code is awesome. This feature been bugging for the last
week or so. The php side have long been able to do this with their
frameworks (using the same technique I believe). 

This piece should be in the extension package.

Thanks again.


Carlos Pita-4 wrote:
> 
> Hi all,
> 
> here is a hopefully functional example showing how to use an iframe to
> upload a file and afterwards call a behavior on a component belonging to
> the
> top frame, so that an ajax action could be carried on in consequence
> (maybe
> to get rid of the iframe, or to show an informative message, or whatever).
> This is along the same venue as other examples that are around the web,
> like
> http://www.air4web.com/files/upload/. I don't have the time to write a
> proper wiki page just right now, so I simply attach the example here. Hope
> it helps.
> 
> Regards,
> Carlos
> 
>  
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
View this message in context: 
http://www.nabble.com/Example-of-pseudo-ajax-file-uploading-using-iframes-tp12400088p20120038.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket AJAX update form TextField value from another field

2008-10-22 Thread jWeekend

Steve,

If you prefer not to take the easy option and add a couple of radio buttons
to let the user select currency or percentage input, that could also control
a couple of labels (or a border) that shows, in a locale specific way, the
currency symbol or the percentage sign you could ... create an
AbsoluteOrPercentage class an instance of which will back the model of your
DiscountAmount field. Make a validator that checks that the last character
entered looks like an int or a '%' and that the other characters represent a
number, and, if required, put your validation messages in the appropriate
place. Add this validator to your DiscountAmount text field. Make an
appropriate converter (implement IConverter - very simple logic required for
both methods) and override getConverter on your text field to return it for
your AbsoluteOrPercentage class. If this text field will be useful
elsewhere, make a (top level) subclass of TextField -
AbsoluteOrPercentageTextField for instance that does all of the above.

It is not clear from your post what you want updated, but let's assume you
have three fields, one for each of SalePrice, DiscountAmount and
ActualAmount (price with discount applied) and you want the latter updated.
Add an AjaxFormComponentUpdatingBehavior (probably "onblur") to both the
input fields. In the onUpdate methods of each update the (dynamic) model
object backing the ActualAmount field (probably rendered by a label since it
is not meant to be edited by the user). Don't forget to add your
"actualAmountTextField" component to the AjaxRequestTarget in both your
onUpdate methods and also to request a markup id for actualAmountTextField -
actualAmountField.setMarkupId(true) - where you build up the container. If
this lot is likely to be useful elsewhere, wrap all three fields (and
probably all the rest of the stuff described above) in a Panel so you can
just drop it in a div anywhere you like later on.

Does that do it?

Regards - Cemal
http://www.jWeekend.co.uk  http://jWeekend.co.uk  




steve222 wrote:
> 
> Hi.  Hopefully I can explain this scenario OK - I'll try to keep it
> simple.
> 
> On a form, I have a couple of TextFields - SalePrice and DiscountAmount.  
> 
> After the user enters SalePrice, I need a way to allow the user to enter
> the DiscountAmount as either a flat rate or as a percentage of the
> SalePrice.
> 
> For example, if entered SalePrice is 1000, the user could enter a flat
> DiscountAmount of 200.00.  Or they could enter 20%.  I'd like the option
> to do either since SalePrice might be 8,745 and the discount 2.75% or
> something (so hard to just calculat the true cash amount).  Or it might
> just really be a flat £200 in which case hard to calculate the %.
> 
> In a traditional app where I'm writing the JavaScript, I can think of
> various ways to do this involving extra fields for flatrate and/or % -
> then updating the real DiscountAmount field when the "dummy" fields
> change.
> 
> But I'm trying to work out an elegant way with Wicket/AJAX - without too
> much success so far.  
> 
> Any suggestions - or links to similar examples?  Ideally, the fewer extra
> dummy fields the better.
> 
> Thanks. 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-AJAX-update-form-TextField-value-from-another-field-tp20117258p20120021.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket AJAX update form TextField value from another field

2008-10-22 Thread steve222

Maybe I should have stated I have tried something like this.  I have data
entry TextFields for: 

  SalePrice
  DiscountAmount

then add another for: 

  DiscountPercentage

When I enter an amount into DiscountAmount I need DiscountPercentage to get
calculated and update on the form.  And it should also work the other way
around - enter DiscountPercentage and DiscountAmount gets updated.  

But DiscountPercentage does not have a setter in my model - just a getter
(it's calculated for viewing only and does not get persisted anywhere).  So
I get errors when Wicket attempts to update the model.

And if I enter an an amount in DiscountPercentage and attempt to update the
value for DiscountAmount then I can't update this either since I don't want
to persist the form until all the other fields are entered. 

I am using the same form for creating a new record and editing an existing
one, so when doing a new record I don't have mandatory fields filled when
I'm entering the Discount stuff.


Steve 







steve222 wrote:
> 
> Hi.  Hopefully I can explain this scenario OK - I'll try to keep it
> simple.
> 
> On a form, I have a couple of TextFields - SalePrice and DiscountAmount.  
> 
> After the user enters SalePrice, I need a way to allow the user to enter
> the DiscountAmount as either a flat rate or as a percentage of the
> SalePrice.
> 
> For example, if entered SalePrice is 1000, the user could enter a flat
> DiscountAmount of 200.00.  Or they could enter 20%.  I'd like the option
> to do either since SalePrice might be 8,745 and the discount 2.75% or
> something (so hard to just calculat the true cash amount).  Or it might
> just really be a flat £200 in which case hard to calculate the %.
> 
> In a traditional app where I'm writing the JavaScript, I can think of
> various ways to do this involving extra fields for flatrate and/or % -
> then updating the real DiscountAmount field when the "dummy" fields
> change.
> 
> But I'm trying to work out an elegant way with Wicket/AJAX - without too
> much success so far.  
> 
> Any suggestions - or links to similar examples?  Ideally, the fewer extra
> dummy fields the better.
> 
> Thanks. 
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Wicket-AJAX-update-form-TextField-value-from-another-field-tp20117258p20119555.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Ajax validating individual form fields

2008-10-22 Thread fatefree

Just a little update, I managed to get the form level validator working by
doing what you said, basically creating a validator that takes a component
as an argument, and compares the ivalidatable.value against the model
object:

 protected void onValidate(IValidatable validatable) {

if(!validatable.getValue().toString().equals(component.getModelObjectAsString()))
error(validatable);
}

Unfortunately the getResetPassword is a final method for some reason, so I
was not able to override it as I hoped. Instead I did this on the ajaxbutton
used to submit the form: 

 protected void onAfterRender() {
super.onAfterRender();
pass.setResetPassword(false);
}

protected void onBeforeRender() {
super.onBeforeRender();
pass.setResetPassword(true);
}

And that seemed to work for the password fields. Thanks for your help!
-- 
View this message in context: 
http://www.nabble.com/Ajax-validating-individual-form-fields-tp20090299p20118595.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket AJAX update form TextField value from another field

2008-10-22 Thread steve222

Hi.  Hopefully I can explain this scenario OK - I'll try to keep it simple.

On a form, I have a couple of TextFields - SalePrice and DiscountAmount.  

After the user enters SalePrice, I need a way to allow the user to enter the
DiscountAmount as either a flat rate or as a percentage of the SalePrice.

For example, if entered SalePrice is 1000, the user could enter a flat
DiscountAmount of 200.00.  Or they could enter 20%.  I'd like the option to
do either since SalePrice might be 8,745 and the discount 2.75% or something
(so hard to just calculat the true cash amount).  Or it might just really be
a flat £200 in which case hard to calculate the %.

In a traditional app where I'm writing the JavaScript, I can think of
various ways to do this involving extra fields for flatrate and/or % - then
updating the real DiscountAmount field when the "dummy" fields change.

But I'm trying to work out an elegant way with Wicket/AJAX - without too
much success so far.  

Any suggestions - or links to similar examples?  Ideally, the fewer extra
dummy fields the better.

Thanks. 


-- 
View this message in context: 
http://www.nabble.com/Wicket-AJAX-update-form-TextField-value-from-another-field-tp20117258p20117258.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket and Ext JS integration

2008-10-22 Thread Nino Saturnino Martinez Vazquez Wael
I thought there were a licensing issue! Could'nt just remember if it 
were the guy doing the wicket contrib or ext js..


Martijn Dashorst wrote:

The GPL licensing of ExtJS is really a brain damage inflicting mess.
Personally I would stay very far away from JS libraries that are GPL
licensed (it is not clear how the viral aspect infects your server
side code, possibly requiring you to ship your server side code to
your users—you *are* distributing the GPL licensed code, which is
linked to your product)

Martijn

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: CSRF Protection: double submitted cookie

2008-10-22 Thread Zappaterrini, Larry
I need to read more about this, but I am interested to know if there are any 
advantages to storing the token in a cookie for validation rather than putting 
it into the session. I suppose if statelessness is required then it is 
necessary. One advantage to storing it in session is that it does help prevent 
the double form submit error. See 
http://www.nabble.com/Double-submit-problem-td15957979.html#a15957979 for 
example.

The JIRA issue you mention has a broken link. It looks like it should be 

http://freedom-to-tinker.com/blog/wzeller/popular-websites-vulnerable-cross-site-request-forgery-attacks

If I am not mistaken.

-Original Message-
From: Jörn Zaefferer [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 22, 2008 8:05 AM
To: users@wicket.apache.org
Subject: Re: CSRF Protection: double submitted cookie

I've created a ticket and attached a reference implementation:
https://issues.apache.org/jira/browse/WICKET-1885

Jörn

On Mon, Oct 20, 2008 at 11:31 PM, Jörn Zaefferer
<[EMAIL PROTECTED]> wrote:
> The double-submitted-cookie isn't related to double submit protection,
> no. Thats a completely different turf.
>
> With that out of the way, its enough to create just one cookie and use
> that both while rendering and validating forms.
>
> I hope that makes it clearer. I'll try to provide a reference
> implementation tomorrow.
>
> Jörn
>
> On Mon, Oct 20, 2008 at 12:58 PM, Johan Compagner <[EMAIL PROTECTED]> wrote:
>> hmm i will read the paper then
>> I stil dont get it how it is possible with 1 cookie, that then can never
>> change when it is first generated
>> and all the forms also just have that value right?
>>
>> But it is also for double submit protection right? So the cookie has to
>> change right?
>> But how can you then have 1 cookie? for all the forms?
>> If i submit one and that is rerendered or redirected to another page.
>> (so it has a new cookie so the double submit cant happen)
>> But if a new cookie is set then all other forms are also suddenly invalid..
>> and that looks pretty wrong to me
>>
>> johan
>>
>>
>> On Mon, Oct 20, 2008 at 12:44 PM, Jörn Zaefferer <
>> [EMAIL PROTECTED]> wrote:
>>
>>> No, the cookie is subject to the same-origin-policy, both in reading
>>> and writing. The request is authenticated because the session cookie
>>> is set, but its invalid when the form itself is missing the value.
>>> Combining the attack with XSS would give access to the cookie, but
>>> then he could just as well hijack the session directly.
>>>
>>> In other words: With CSRF alone there is no way for the attacker to
>>> read the cookie, therefore its enough to use just one.
>>>
>>> Their whitepaper may do a better job of explaining the techniquie:
>>> http://www.freedom-to-tinker.com/sites/default/files/csrf.pdf
>>> Solutions are described on page 8ff.
>>>
>>> Jörn
>>>
>>> On Mon, Oct 20, 2008 at 12:33 PM, Johan Compagner <[EMAIL PROTECTED]>
>>> wrote:
>>> > what i dont get
>>> > if an attacker wants to submit the form. and it can get to the form it
>>> can
>>> > do the post
>>> > but you say it cant access the cookie. But if the cookie value is just
>>> > compared to the form post value
>>> > we have to make sure that the name of the cookie cant be guessed right?
>>> So
>>> > what should the name be?
>>> >
>>> > Because if the name would be "wicket-form-uuid" then couldnt the attacker
>>> > also just generate that cookie?
>>> >
>>> > I guess there is a cookie per form (there can be many forms on the same
>>> page
>>> > or different active pages)
>>> > and that cookie must be regenerated/set on every form render?
>>> >
>>> > johan
>>> >
>>> >
>>> > On Mon, Oct 20, 2008 at 11:27 AM, Jörn Zaefferer <
>>> > [EMAIL PROTECTED]> wrote:
>>> >
>>> >> Hi,
>>> >>
>>> >> my application currently uses CryptedUrlWebRequestCodingStrategy to
>>> >> protect against CRSF attacks. Afaik 1.3.5 will include an update that
>>> >> generates the key based on user sessions:
>>> >> http://issues.apache.org/jira/browse/WICKET-1782
>>> >> According to Johan Compagner, there are still issues with that
>>> >> approach, though I don't know if that has been fixed:
>>> >> http://www.nabble.com/Wicket-not-secure--to19556259.html#a19557593
>>> >>
>>> >> Anyway, the point of this mail is to bring up a different strategy for
>>> >> CSRF protection, the double-submitted-cookie. Discussion of that are
>>> >> here http://www.codinghorror.com/blog/archives/001175.html which links
>>> >> to this article, including a whitepaper:
>>> >>
>>> >>
>>> http://freedom-to-tinker.com/blog/wzeller/popular-websites-vulnerable-cross-site-request-forgery-attacks
>>> >>
>>> >> The basic idea is:
>>> >>
>>> >> "When a user visits a site, the site should generate a
>>> >> (cryptographically strong) pseudorandom value and set it as a cookie
>>> >> on the user's machine. The site should require every form submission
>>> >> to include this pseudorandom value as a form value and also as a
>>> >> cookie value. When a POST request is sent to the s

[ANNOUNCE] Apache Wicket 1.3.5

2008-10-22 Thread Martijn Dashorst
The Apache Wicket team is proud to announce the availability of the
fifth maintenance release: Apache Wicket 1.3.5. A lot of bugs have
been squashed and several improvements implemented. It is recommended
you update to Wicket 1.3.5 at your earliest convenience.

Eager people click here to download the distribution, others can read further:

http://www.apache.org/dyn/closer.cgi/wicket/1.3.5

We thank you for your patience and support.

- The Wicket Team

Apache Wicket

Apache Wicket is a component oriented Java web application framework.
With proper mark-up/logic separation, a POJO data model, and a
refreshing lack of XML, Apache Wicket makes developing web-apps simple
and enjoyable again. Swap the boilerplate, complex debugging and
brittle code for powerful, reusable components written with plain Java
and HTML.

You can find out more about Apache Wicket on our website:

http://wicket.apache.org

This release

This release is the fifth maintenance release for the Wicket 1.3
product. This release fixes several bugs and adds some minor
improvements. You can find out about the changes at the bottom of this
announcement.

Migrating from 1.2

If you are coming from Wicket 1.2, you really want to read our
migration guide, found on the wiki:

http://cwiki.apache.org/WICKET/migrate-13.html

Downloading the release

You can download the release from the official Apache mirror system,
and you can find it through the following link:

http://www.apache.org/dyn/closer.cgi/wicket/1.3.5/

For the Maven and Ivy fans out there: update your pom's to the
following, and everything will be downloaded automatically:


  org.apache.wicket
  wicket
  1.3.5


Substitute the artifact ID with the projects of your liking to get the
other projects.

Please note that we don't prescribe a Logging implementation for
SLF4J. You need to specify yourself which one you prefer. Read more
about SLF4J here:

http://slf4j.org

Validating the release

The release has been signed by Martijn Dashorst, your release manager
for today. The public key can be found in the KEYS file in the
download area. Download the KEYS file only from the Apache website.

http://www.apache.org/dist/wicket/1.3.5/KEYS

Instructions on how to validate the release can be found here:

http://www.apache.org/dev/release-signing.html#check-integrity

Reporting bugs

In case you do encounter a bug, we would appreciate a report in our JIRA:

http://issues.apache.org/jira/browse/WICKET

The distribution

In the distribution you will find a README. The README contains
instructions on how to build from source yourself. You also find a
CHANEGELOG-1.3 which contains a list of all things that have been
fixed, added and/or removed since Wicket 1.3.0.

Release Notes - Wicket - Version 1.3.5

** Sub-task
* [WICKET-1805] - Allow to change charset in StringRequestTarget:
change CharSet used by the OutStream as well

** Bug
* [WICKET-406] - form fields are reset when a file upload fails
* [WICKET-431] - Modal window can not be closed after session timeout
* [WICKET-622] - Component.toString() is unsafe
* [WICKET-625] - Wicket doesn't clean up properly when
hot-deploying; hangs onto Class references.
* [WICKET-847] - setResponsePage redirects to wrong url
* [WICKET-861] - NumberFormatException with
UrlCompressingWebRequestProcessor in WicketTester
* [WICKET-928] - Exception when clicking two times rapidly on the
"next" button in a wizard
* [WICKET-1003] - Modal Window Does Not Close When Using
IndicatingAjaxButton
* [WICKET-1104] - Modal window sticks to cursor on resize
* [WICKET-1120] - Problem closing a ModalWindow when used through an IFrame
* [WICKET-1161] - DiskPageStore should write the sessions index
file to disk on destroy (from WicketFilter.destroy())
* [WICKET-1205] - Relative path calculations for inline paths in
non-bookmarkable pages are incorrect on Tomcat.
* [WICKET-1346] - Generated HTML page contains incorrect content
when "WicketMessage: No get method defined for class"
* [WICKET-1376] - Using AbstractAjaxTimerBehavior and mounting
that page gives exception
* [WICKET-1413] - RequestUtils.toAbsolutePath() has a bug
regarding to UTF-8 encoded page parameter.
* [WICKET-1425] - appendToInit() method is not called in class DatePicker
* [WICKET-1437] - Pagemap lock calculates timeout wrong
* [WICKET-1449] - './' appended to URL causes HTTP 404 in Internet
Explorer (using root context)
* [WICKET-1450] - Ajax Re-render does not work after
AbstractRestartResponseException()
* [WICKET-1471] - FeedbackPanel does not work properly in
clustered environment
* [WICKET-1478] - AbortWithWebErrorCodeException in onBeforeRender
causes WicketRuntimeException
* [WICKET-1494] - IntegerConvert cannot handle locale specific input/output
* [WICKET-1496] - DataTable.html does not validate (HTML 4.01/XHTML-Strict)
* [WICKET-1520] - JavaScriptStripper breaks prototype.js
* [WICKET-1535] - ExternalLi

Re: Automatic inserting HTML code

2008-10-22 Thread Igor Vaynberg
search this list for TextLink and see how it outputs text into link's body.

-igor

On Wed, Oct 22, 2008 at 3:08 AM, Milan Křápek <[EMAIL PROTECTED]> wrote:
> Hi, I have probably a newbie question, but I cannot find way how to do it.
>
> I my application I use many AjaxLinks. I always want the link to be 
> represented by an image. The image is always the same so I want to prevent 
> myself for writing the same code.
> I made my component that extends AjaxLink. In constructor of this component I 
> just add the image to it.
> add (new Image ("myImg", new ResourceReference ("myImg")));
> Now I need to automatically add the correspond HTML code
>
> to the web page when I use this component.
>
> E.G.
>  JAVA
> .
> add (new MyAjaxLink ("myLink") {
>  @Override
>  public void onClick (AjaxRequestTarget target) {
>...
>  }
> );
> .
> and
> HTML
> .
>  here should be the HTML code from my component 
> .
> will be rendered as
>
>
> I know that the functionality that I ant is provided by Panel Component. But 
> I need it when using component that extends AjaxLink not Panel. I think that 
> one possible reason is to insert the image to my component as a Panel. But 
> that will be very awful reason. Is there any other way how to do it??
>
> Thank for any advice.
>
> Milan
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Double clickable rows in AjaxFallbackDefaultDataTable

2008-10-22 Thread Igor Vaynberg
add a behavior to the row item that listens to ondblclick or whatever
the event is called. i am not sure that TRs support this, so check in
the browser first.

to add the behavior to the row item override newrowitem on the table.

-igor

On Wed, Oct 22, 2008 at 7:58 AM, Yazeed Isaacs
<[EMAIL PROTECTED]> wrote:
> Hi
>
> Does anyone know how to implement something that could do this.
>
> Please point me in the right direction.
>
> Regards,
> Yazeed Isaacs
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Validation Messages

2008-10-22 Thread Igor Vaynberg
try org.apache.wicket.Localizer

-igor

On Wed, Oct 22, 2008 at 1:55 AM, Kai Mütz <[EMAIL PROTECTED]> wrote:
> Thank you, but it seems that only found resources are logged. Meanwhile I
> have found out that I have to use a key like this:
>
> myform.tabs.panel.myfield=My Field
>
> where "tabs" is the id of my tabbed panel. But I haven't found a log message
> that points to a missing key "myform.tabs.panel.myfield".
>
> Kai
>
> Igor Vaynberg  wrote:
>> log4j.logger.org.apache.wicket.resource=DEBUG
>>
>> should do it afair.
>>
>> -igor
>>
>>
>> On Tue, Oct 21, 2008 at 8:16 AM, Kai Mütz <[EMAIL PROTECTED]>
>> wrote:
>>
>> Hi,
>>
>> I have some problems with validation messages. Normally I set my
>> validation messages within the property files like this:
>>
>> Required='${label}' is required
>> StringValidator.maximum='${label}' [...] ${maximum} [...]
>>
>> myform.myfield=My Field
>>
>> and got (as expected) "'My Field' is required" if I do not fill
>> myfield.
>>
>> A problem occurs with a form which contains a tapped panel. The
>> validator does not find the resource and I got the message "'myfield'
>> is required". Is there a possibility to find out which resource key
>> the validator uses to find the resource? And in which property files
>> the validator is searching?
>>
>> Thanks in advance,
>> Kai
>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Double clickable rows in AjaxFallbackDefaultDataTable

2008-10-22 Thread Yazeed Isaacs
Hi

Does anyone know how to implement something that could do this.

Please point me in the right direction.

Regards,
Yazeed Isaacs


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket and Ext JS integration

2008-10-22 Thread Martijn Dashorst
The GPL licensing of ExtJS is really a brain damage inflicting mess.
Personally I would stay very far away from JS libraries that are GPL
licensed (it is not clear how the viral aspect infects your server
side code, possibly requiring you to ship your server side code to
your users—you *are* distributing the GPL licensed code, which is
linked to your product)

Martijn

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Wicket and Ext JS integration

2008-10-22 Thread Paolo Di Tommaso
I'm working on a wicket-ext integration project.

Until now I've done just really simple stuff, like simple TextField,
DateField, TimeField, ComboBox, AutoComplete field and basic (static) grid
elements.

Though my implementation is trivial I would say that is really promising and
I've not found any evident obstacle to a more complete integration.


Paolo

On Wed, Oct 22, 2008 at 1:53 PM, Richard Allen <[EMAIL PROTECTED]>wrote:

> We currently use Ext JS 2.2 (http://extjs.com) with Struts 1.x, and we are
> considering migrating to Wicket. I have seen on the mail archive that some
> people have integrated Wicket and Ext JS with mixed success. In particular,
> I found the wicket-tools-extjs project,
> http://www.wickettools.org/index.php/extjs-integrationm, which is version
> 0.1.0, published in February 2008.
>
> Is the wicket-tools-extjs project in active development or was that project
> abandoned? Is there any other significant work undergoing to integrate
> Wicket and Ext JS?
>
> Thanks,
> Richard Allen
>


Re: Proposal: the browser as a desktop client

2008-10-22 Thread cowwoc

I just to clarify one point. You would still have three types of components:

HTML
CSS
Java

You would still be binding the Java code against HTML IDs (clean separation
of concerns). The only thing that would change is where the Java code
executes.
-- 
View this message in context: 
http://www.nabble.com/Proposal%3A-the-browser-as-a-desktop-client-tp20111040p20111247.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to submit form to external page sending parameters by post, please Help

2008-10-22 Thread Pablo Scagno

Thanks for your response, I've used the second choice...it was very helpful

Bye
Pablo

--
From: "Jeremy Thomerson" <[EMAIL PROTECTED]>
Sent: Tuesday, October 21, 2008 10:51 PM
To: 
Subject: Re: How to submit form to external page sending parameters by post, 
please Help



Perhaps one of the following:

  1. Don't use wicket "Form" - use web markup containers of some sort and
  attribute modifiers to output a form that actually posts directly to the
  paypal site.  (In other words - generate a real form with action=
  https://www.sandbox.paypal.com.)
  2. OR - if you need to post back into Wicket and then submit the
  information to Paypal - use an HTTP client like Commons to post
  programmatically.  (See
  http://www.java2s.com/Code/Java/Apache-Common/HttppostmethodExample.htm 
for

  example)

If you want your user to actually end up at the posted paypal page, as I
suspect you do from your details below, I definitely think number one is
what you need.

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


On Tue, Oct 21, 2008 at 4:49 PM, Pablo Scagno <[EMAIL PROTECTED]> wrote:


Hi, I'm trying to submit a form to Paypal but I don't know how I can do
this.
I have a wicket form with all the fields that I need to submit but when I
redirect the page to paypal I can't send the form fields. I can't put the
parameters in the querystring, I must send them by post.
This is my code to redirect in the button onSubmit() event
  
  RedirectPage redirectPage = new RedirectPage("
https://www.sandbox.paypal.com/cgi-bin/webscr";);
  setResponsePage(redirectPage);
  ...

Is there any way to send the values?

My form must be wicket because It depends on a model...

Thanks
Pablo

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Proposal: the browser as a desktop client

2008-10-22 Thread cowwoc

Hi,

I'd like to propose we leverage existing Java to Javascript compilers to
improve Wicket on a couple of fronts. If you think of the web browser as a
desktop client involved in a client-server architecture then it becomes
obvious that Wicket is currently asking the server to handle a lot of logic
on behalf of the client. It does this because it's easier to develop in Java
than in Javascript. In an ideal world, the server should only see HTML forms
in two states:

- their initial state (sent to the client)
- their submitted state (merged into the database)

The client would be able to communicate with web services in between to
update the client-side state but most applications won't even need this. The
vast majority of form manipulation (adding rows, data validation) can be
handled completely on the client-end.

I foresee the following benefits:

- Vastly simplified logic: A lot of resources have been spent building the
HTML parser and classes related to server-side form manipulation. All these
are built in for free in JS. For example, interacting with HTML elements and
IDs is far easier than in Java code.
- Improved responsiveness for end-users
- Improved server scalability
- "Nice" URLs, both for humans and for web crawlers. This would also open up
the door for RESTful implementations.

This would be different from GWT. You would benefit from the modularity of
Wicket, coding HTML and CSS in their native languages. The only difference
is that you'd now be manipulating dynamic forms on the client-end instead of
the server-end.

Let me know what you think.

Gili
-- 
View this message in context: 
http://www.nabble.com/Proposal%3A-the-browser-as-a-desktop-client-tp20111040p20111040.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Pages or components... how do u decide?

2008-10-22 Thread James Carman
Isn't there already another thread about this question started by you?

On Wed, Oct 22, 2008 at 9:27 AM, Nav Che <[EMAIL PROTECTED]> wrote:
> Hello Ned,
>
> I am using BreadCrumbPanels, and on a BreadCrumbLink, i wanted to pass a
> parameter but looks like I cannot instantiate the custom constructor of the
> panel in this case. Please advise. :(
>
> //Naveen
>
> On Tue, Oct 21, 2008 at 6:19 PM, Ned Collyer <[EMAIL PROTECTED]> wrote:
>
>>
>> Their constructor :)
>>
>>
>> Nav Che wrote:
>> >
>> > Ned,
>> >
>> > But then how do u pass parameters across the panels???
>> >
>> > //nav
>> >
>> --
>> View this message in context:
>> http://www.nabble.com/Pages-or-components...-how-do-u-decide--tp20016807p20100652.html
>>  Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Pages or components... how do u decide?

2008-10-22 Thread Nav Che
Hello Ned,

I am using BreadCrumbPanels, and on a BreadCrumbLink, i wanted to pass a
parameter but looks like I cannot instantiate the custom constructor of the
panel in this case. Please advise. :(

//Naveen

On Tue, Oct 21, 2008 at 6:19 PM, Ned Collyer <[EMAIL PROTECTED]> wrote:

>
> Their constructor :)
>
>
> Nav Che wrote:
> >
> > Ned,
> >
> > But then how do u pass parameters across the panels???
> >
> > //nav
> >
> --
> View this message in context:
> http://www.nabble.com/Pages-or-components...-how-do-u-decide--tp20016807p20100652.html
>  Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Who's in charge of wicketstuff yui?

2008-10-22 Thread marco.behler

Korbinian Bachl? Someone else? :)

Thanks
-- 
View this message in context: 
http://www.nabble.com/Who%27s-in-charge-of-wicketstuff-yui--tp20109670p20109670.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: CSRF Protection: double submitted cookie

2008-10-22 Thread Jörn Zaefferer
I've created a ticket and attached a reference implementation:
https://issues.apache.org/jira/browse/WICKET-1885

Jörn

On Mon, Oct 20, 2008 at 11:31 PM, Jörn Zaefferer
<[EMAIL PROTECTED]> wrote:
> The double-submitted-cookie isn't related to double submit protection,
> no. Thats a completely different turf.
>
> With that out of the way, its enough to create just one cookie and use
> that both while rendering and validating forms.
>
> I hope that makes it clearer. I'll try to provide a reference
> implementation tomorrow.
>
> Jörn
>
> On Mon, Oct 20, 2008 at 12:58 PM, Johan Compagner <[EMAIL PROTECTED]> wrote:
>> hmm i will read the paper then
>> I stil dont get it how it is possible with 1 cookie, that then can never
>> change when it is first generated
>> and all the forms also just have that value right?
>>
>> But it is also for double submit protection right? So the cookie has to
>> change right?
>> But how can you then have 1 cookie? for all the forms?
>> If i submit one and that is rerendered or redirected to another page.
>> (so it has a new cookie so the double submit cant happen)
>> But if a new cookie is set then all other forms are also suddenly invalid..
>> and that looks pretty wrong to me
>>
>> johan
>>
>>
>> On Mon, Oct 20, 2008 at 12:44 PM, Jörn Zaefferer <
>> [EMAIL PROTECTED]> wrote:
>>
>>> No, the cookie is subject to the same-origin-policy, both in reading
>>> and writing. The request is authenticated because the session cookie
>>> is set, but its invalid when the form itself is missing the value.
>>> Combining the attack with XSS would give access to the cookie, but
>>> then he could just as well hijack the session directly.
>>>
>>> In other words: With CSRF alone there is no way for the attacker to
>>> read the cookie, therefore its enough to use just one.
>>>
>>> Their whitepaper may do a better job of explaining the techniquie:
>>> http://www.freedom-to-tinker.com/sites/default/files/csrf.pdf
>>> Solutions are described on page 8ff.
>>>
>>> Jörn
>>>
>>> On Mon, Oct 20, 2008 at 12:33 PM, Johan Compagner <[EMAIL PROTECTED]>
>>> wrote:
>>> > what i dont get
>>> > if an attacker wants to submit the form. and it can get to the form it
>>> can
>>> > do the post
>>> > but you say it cant access the cookie. But if the cookie value is just
>>> > compared to the form post value
>>> > we have to make sure that the name of the cookie cant be guessed right?
>>> So
>>> > what should the name be?
>>> >
>>> > Because if the name would be "wicket-form-uuid" then couldnt the attacker
>>> > also just generate that cookie?
>>> >
>>> > I guess there is a cookie per form (there can be many forms on the same
>>> page
>>> > or different active pages)
>>> > and that cookie must be regenerated/set on every form render?
>>> >
>>> > johan
>>> >
>>> >
>>> > On Mon, Oct 20, 2008 at 11:27 AM, Jörn Zaefferer <
>>> > [EMAIL PROTECTED]> wrote:
>>> >
>>> >> Hi,
>>> >>
>>> >> my application currently uses CryptedUrlWebRequestCodingStrategy to
>>> >> protect against CRSF attacks. Afaik 1.3.5 will include an update that
>>> >> generates the key based on user sessions:
>>> >> http://issues.apache.org/jira/browse/WICKET-1782
>>> >> According to Johan Compagner, there are still issues with that
>>> >> approach, though I don't know if that has been fixed:
>>> >> http://www.nabble.com/Wicket-not-secure--to19556259.html#a19557593
>>> >>
>>> >> Anyway, the point of this mail is to bring up a different strategy for
>>> >> CSRF protection, the double-submitted-cookie. Discussion of that are
>>> >> here http://www.codinghorror.com/blog/archives/001175.html which links
>>> >> to this article, including a whitepaper:
>>> >>
>>> >>
>>> http://freedom-to-tinker.com/blog/wzeller/popular-websites-vulnerable-cross-site-request-forgery-attacks
>>> >>
>>> >> The basic idea is:
>>> >>
>>> >> "When a user visits a site, the site should generate a
>>> >> (cryptographically strong) pseudorandom value and set it as a cookie
>>> >> on the user's machine. The site should require every form submission
>>> >> to include this pseudorandom value as a form value and also as a
>>> >> cookie value. When a POST request is sent to the site, the request
>>> >> should only be considered valid if the form value and the cookie value
>>> >> are the same. When an attacker submits a form on behalf of a user, he
>>> >> can only modify the values of the form. An attacker cannot read any
>>> >> data sent from the server or modify cookie values, per the same-origin
>>> >> policy. This means that while an attacker can send any value he wants
>>> >> with the form, he will be unable to modify or read the value stored in
>>> >> the cookie. Since the cookie value and the form value must be the
>>> >> same, the attacker will be unable to successfully submit a form unless
>>> >> he is able to guess the pseudorandom value."
>>> >>
>>> >> For Wicket, this would mean: Generate a pseudorandom value and set is
>>> >> as a session cookie, when the cookie doesn't yet exist. Inse

Re: FireFox 3.x.x issue with wicket

2008-10-22 Thread James Carman
I think they mean that it is not the case that half of the text is
submitted.  The only problem is in the view.

On Wed, Oct 22, 2008 at 3:54 AM, Michael Sparer <[EMAIL PROTECTED]> wrote:
>
> what do you mean by saying "But Actually half text is not gets submitted."?
> If there's a problem on the wicket site it would be helpful to see some code
>
>
> swapnil.wadagave wrote:
>>
>> Thanks For Reply,
>> But Actually half text is not gets submitted.Only pbm is with view.same is
>> working fine with IE and mozila backward version like mozila 2.x.x..So
>> where can i get help for this kind of issues.
>> Regards,
>> swapnil
>>
>> swapnil.wadagave wrote:
>>>
>>> Respected sir,
>>>
>>> "When I am writing in the search boxes I only see half of the text.
>>>
>>> This happens with FireFox 3.x.x"
>>>
>>> What can i do in this case?This is happening in some pcs.
>>>
>>
>>
>
>
> -
> Michael Sparer
> http://talk-on-tech.blogspot.com
> --
> View this message in context: 
> http://www.nabble.com/FireFox-3.x.x-issue-with-wicket-tp20104033p20105728.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to unittest a checkbox

2008-10-22 Thread James Carman
Have you tried using FormTester?

On Wed, Oct 22, 2008 at 5:20 AM, Minto van der Sluis
<[EMAIL PROTECTED]> wrote:
>
> Hi folks,
>
> Creating unittests for my pages I managed to read the value a checkbox of a
> rendered page. I used:
>
>tester.assertModelValue( "form:myCheckBox, true );
>
> However I failed to change that value in my unittest prior to submitting the
> form.
>
> Can anyone point in the right direction?
>
> Kind regards,
>
> Minto van der Sluis
>
> --
> View this message in context: 
> http://www.nabble.com/how-to-unittest-a-checkbox-tp20106917p20106917.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Wicket and Ext JS integration

2008-10-22 Thread Richard Allen
We currently use Ext JS 2.2 (http://extjs.com) with Struts 1.x, and we are
considering migrating to Wicket. I have seen on the mail archive that some
people have integrated Wicket and Ext JS with mixed success. In particular,
I found the wicket-tools-extjs project,
http://www.wickettools.org/index.php/extjs-integrationm, which is version
0.1.0, published in February 2008.

Is the wicket-tools-extjs project in active development or was that project
abandoned? Is there any other significant work undergoing to integrate
Wicket and Ext JS?

Thanks,
Richard Allen


Re: Ajax validating individual form fields

2008-10-22 Thread Daan van Etten

Hi fatefree,

On 22 okt 2008, at 03:53, fatefree wrote:


Thank you very much, I didn't realize that the
AjaxFormComponentUpdatingBehavior submitted individual components, I  
guess i

got it confused with AjaxFormValidatingBehavior.

I think the only issue is when a form level validator needs to be  
used, for
instance to compare that two fields are equal. Am I correct in  
assuming
theres no way to attach a form component validator to a field and  
have it
compare against the value of another component? If so I'm not sure  
if it
would be possible to fire a form level validator on the onblur of  
the second

component without submitting the entire form.

I think you are correct.
Maybe it is an option to write a custom validator that compares the  
two fields, and attach that to the second field. The error can then be  
shown at the second field.


Another issue I thought of is if you use a password text field you  
wouldn't
be able to use AjaxFormComponentUpdatingBehavior because even if the  
input
is valid it would erase immediately. Maybe there is a clever way to  
override
the isPasswordReset so that it only is true when the form is submit  
through

a button and not that behavior?


I have no idea, but am curious to see your solution :-).

Regards,

Daan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Why is Wicket called Wicket?

2008-10-22 Thread shetc

Because it's wicked, man!

(see  http://onlineslangdictionary.com/definition+of/wicked
http://onlineslangdictionary.com/definition+of/wicked )
-- 
View this message in context: 
http://www.nabble.com/Why-is-Wicket-called-Wicket--tp20106097p20108508.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Antwort: Wicket community traction / Wicket Web 2.0 experience

2008-10-22 Thread bruno . borges

That's ok Chris,

It's just a matter of time until they find out they did the wrong choice -  
unless this is going to be a small software, with very specific functions,  
like GMail. :-) There's a team by my side here that is working in a  
sub-project with GWT and they chose it using that same argument: "easy  
creation of Web2.0 style user interfaces". But now, they are going nuts  
because of how big the code is getting (and the project is by far from the  
end) - so, it's not just about few effort. You have to consider everything.  
Maintenance is one of them. By the way, it's really hard to create custom  
components within GWT. So I think you can see the problem here about code  
size.


But, good luck for the rest of you team... I'll pray for them... :-D

Best regards (really),
Bruno

On Oct 22, 2008 6:41am, [EMAIL PROTECTED] wrote:

Martin, Richard, thanks for your answers!



Unfortunately, I could not convince the other devs of the various

advantages of wicket. The team chose GWT because it allows to create Web

2.0 style user interfaces with fewer effort.



Regards,

Christoph


Automatic inserting HTML code

2008-10-22 Thread Milan Křápek
Hi, I have probably a newbie question, but I cannot find way how to do it.

I my application I use many AjaxLinks. I always want the link to be represented 
by an image. The image is always the same so I want to prevent myself for 
writing the same code. 
I made my component that extends AjaxLink. In constructor of this component I 
just add the image to it. 
 add (new Image ("myImg", new ResourceReference ("myImg")));  
Now I need to automatically add the correspond HTML code 

to the web page when I use this component.

E.G. 
 JAVA
.
add (new MyAjaxLink ("myLink") {
  @Override
  public void onClick (AjaxRequestTarget target) {
...
  } 
);
.
and
HTML
.
 here should be the HTML code from my component 
.
will be rendered as


I know that the functionality that I ant is provided by Panel Component. But I 
need it when using component that extends AjaxLink not Panel. I think that one 
possible reason is to insert the image to my component as a Panel. But that 
will be very awful reason. Is there any other way how to do it??

Thank for any advice.

Milan

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Why is Wicket called Wicket?

2008-10-22 Thread Nino Saturnino Martinez Vazquez Wael

Seems so.

I like to think of the sentence

"a small framework at which the bowler aims the ball."

As doing a bullseye, within web frameworks:)


Wayne Pope wrote:

thanks Nino, I knew I'd seen it somewhere but couldn't remember.

so it was reference to the game of cricket stumps rather than to quote a
dictionary: "a window or opening, often closed by a grating or the like, as
in a door, or forming a place of communication in a ticket office, a
teller's cage in a bank, etc."


On Wed, Oct 22, 2008 at 10:59 AM, Nino Saturnino Martinez Vazquez Wael <
[EMAIL PROTECTED]> wrote:

  

Jonathan Locke wrote something about it in his foreword in WIA:

"Several 60-hour weeks later, the first version of Wicket was born. (In
case you're
wondering, Wicket was the first fun and unique-sounding short word that
Miko also
liked and that wasn't being used for a major software project. It also
appears in some
dictionaries as a cricket term for "a small framework at which the bowler
aims the
ball.") I'm happy to say that after more than four years and the input of
many manyears
of effort from the open source community, Wicket now meets most if not all
of
my criteria for a web framework"


Wayne Pope wrote:



We where just chating here, and we're wondering where the name wicket
comes
from ?
Looking it up on in the dictionary I couldn't really see the connection.

Anyone know how the name came about?

thanks
Wayne



  

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Antwort: Wicket community traction / Wicket Web 2.0 experience

2008-10-22 Thread christoph . grothaus
Martin, Richard, thanks for your answers!

Unfortunately, I could not convince the other devs of the various 
advantages of wicket. The team chose GWT because it allows to create Web 
2.0 style user interfaces with fewer effort.

Regards,
Christoph

how to unittest a checkbox

2008-10-22 Thread Minto van der Sluis

Hi folks,

Creating unittests for my pages I managed to read the value a checkbox of a
rendered page. I used:

tester.assertModelValue( "form:myCheckBox, true );

However I failed to change that value in my unittest prior to submitting the
form.

Can anyone point in the right direction?

Kind regards,

Minto van der Sluis

-- 
View this message in context: 
http://www.nabble.com/how-to-unittest-a-checkbox-tp20106917p20106917.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Why is Wicket called Wicket?

2008-10-22 Thread Wayne Pope
thanks Nino, I knew I'd seen it somewhere but couldn't remember.

so it was reference to the game of cricket stumps rather than to quote a
dictionary: "a window or opening, often closed by a grating or the like, as
in a door, or forming a place of communication in a ticket office, a
teller's cage in a bank, etc."


On Wed, Oct 22, 2008 at 10:59 AM, Nino Saturnino Martinez Vazquez Wael <
[EMAIL PROTECTED]> wrote:

> Jonathan Locke wrote something about it in his foreword in WIA:
>
> "Several 60-hour weeks later, the first version of Wicket was born. (In
> case you're
> wondering, Wicket was the first fun and unique-sounding short word that
> Miko also
> liked and that wasn't being used for a major software project. It also
> appears in some
> dictionaries as a cricket term for "a small framework at which the bowler
> aims the
> ball.") I'm happy to say that after more than four years and the input of
> many manyears
> of effort from the open source community, Wicket now meets most if not all
> of
> my criteria for a web framework"
>
>
> Wayne Pope wrote:
>
>> We where just chating here, and we're wondering where the name wicket
>> comes
>> from ?
>> Looking it up on in the dictionary I couldn't really see the connection.
>>
>> Anyone know how the name came about?
>>
>> thanks
>> Wayne
>>
>>
>>
>
> --
> -Wicket for love
>
> Nino Martinez Wael
> Java Specialist @ Jayway DK
> http://www.jayway.dk
> +45 2936 7684
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Why is Wicket called Wicket?

2008-10-22 Thread Nino Saturnino Martinez Vazquez Wael

Jonathan Locke wrote something about it in his foreword in WIA:

"Several 60-hour weeks later, the first version of Wicket was born. (In 
case you’re
wondering, Wicket was the first fun and unique-sounding short word that 
Miko also
liked and that wasn’t being used for a major software project. It also 
appears in some
dictionaries as a cricket term for “a small framework at which the 
bowler aims the
ball.”) I’m happy to say that after more than four years and the input 
of many manyears
of effort from the open source community, Wicket now meets most if not 
all of

my criteria for a web framework"

Wayne Pope wrote:

We where just chating here, and we're wondering where the name wicket comes
from ?
Looking it up on in the dictionary I couldn't really see the connection.

Anyone know how the name came about?

thanks
Wayne

  


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Validation Messages

2008-10-22 Thread Kai Mütz
Thank you, but it seems that only found resources are logged. Meanwhile I
have found out that I have to use a key like this:

myform.tabs.panel.myfield=My Field

where "tabs" is the id of my tabbed panel. But I haven't found a log message
that points to a missing key "myform.tabs.panel.myfield".

Kai

Igor Vaynberg  wrote:
> log4j.logger.org.apache.wicket.resource=DEBUG
>
> should do it afair.
>
> -igor
>
>
> On Tue, Oct 21, 2008 at 8:16 AM, Kai Mütz <[EMAIL PROTECTED]>
> wrote:
>
> Hi,
>
> I have some problems with validation messages. Normally I set my
> validation messages within the property files like this:
>
> Required='${label}' is required
> StringValidator.maximum='${label}' [...] ${maximum} [...]
>
> myform.myfield=My Field
>
> and got (as expected) "'My Field' is required" if I do not fill
> myfield.
>
> A problem occurs with a form which contains a tapped panel. The
> validator does not find the resource and I got the message "'myfield'
> is required". Is there a possibility to find out which resource key
> the validator uses to find the resource? And in which property files
> the validator is searching?
>
> Thanks in advance,
> Kai
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Why is Wicket called Wicket?

2008-10-22 Thread Wayne Pope
We where just chating here, and we're wondering where the name wicket comes
from ?
Looking it up on in the dictionary I couldn't really see the connection.

Anyone know how the name came about?

thanks
Wayne


Static injection not working (wicket-guice)

2008-10-22 Thread Edgar Merino

Hello,

   I've been trying to inject a service to some classes that are not 
wicket components, I've asked here and was suggested to use static 
injection: InjectorHolder.getInjector().inject(this); however this is 
not working with guice, I always get an illegalstateexception, 
injectorholder has not been assigned an injector. I've tried 
((GuiceInjectorHolder) 
(RequestCycle.get().getApplication().getMetaData(GuiceInjectorHolder.INJECTOR_KEY))).getInjector().injectMembers(this); 
however that gives me serialization problems, since wicket is not 
creating a proxy for my service. I'm on my way to give salve a try but 
I'm having some problems there too (waiting for a response from the 
Discussion group), what suggestions can you make?


Thanks in advance,
Edgar Merino

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FireFox 3.x.x issue with wicket

2008-10-22 Thread Michael Sparer

what do you mean by saying "But Actually half text is not gets submitted."? 
If there's a problem on the wicket site it would be helpful to see some code


swapnil.wadagave wrote:
> 
> Thanks For Reply,
> But Actually half text is not gets submitted.Only pbm is with view.same is
> working fine with IE and mozila backward version like mozila 2.x.x..So
> where can i get help for this kind of issues.
> Regards,
> swapnil
> 
> swapnil.wadagave wrote:
>> 
>> Respected sir,
>> 
>> "When I am writing in the search boxes I only see half of the text.
>> 
>> This happens with FireFox 3.x.x"
>> 
>> What can i do in this case?This is happening in some pcs.
>> 
> 
> 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/FireFox-3.x.x-issue-with-wicket-tp20104033p20105728.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to avoid blank node labels in TreeTable?

2008-10-22 Thread Hannes

Hi all,

if text is too long to fit into column width of PropertyTreeColumn, then 
it gets blanked. This results in empty node labels in tree, what is a 
problem, the more levels the tree has. So I would prefer clipping 
instead blanks... Any hints for a highly enthusiastic wicket rookie?


Best regards

Hannes

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FireFox 3.x.x issue with wicket

2008-10-22 Thread swapnil.wadagave

Thanks For Reply,
But Actually half text is not gets submitted.Only pbm is with view.same is
working fine with IE and mozila backward version like mozila 2.x.x..So where
can i get help for this kind of issues.
Regards,
swapnil

swapnil.wadagave wrote:
> 
> Respected sir,
> 
> "When I am writing in the search boxes I only see half of the text.
> 
> This happens with FireFox 3.x.x"
> 
> What can i do in this case?This is happening in some pcs.
> 

-- 
View this message in context: 
http://www.nabble.com/FireFox-3.x.x-issue-with-wicket-tp20104033p20105253.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: FireFox 3.x.x issue with wicket

2008-10-22 Thread Michael Sparer

well, make the searchbox wider? ;-)
no honestly, i don't believe this is a wicket related issue, sounds like
plain html after all ... or do you mean that only half of the text gets
submitted?


swapnil.wadagave wrote:
> 
> Respected sir,
> 
> "When I am writing in the search boxes I only see half of the text.
> 
> This happens with FireFox 3.x.x"
> 
> What can i do in this case?This is happening in some pcs.
> 


-
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/FireFox-3.x.x-issue-with-wicket-tp20104033p20105053.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]