Re: [Wicket-user] 1) PropertyResolver and Lists 2) Page expiration in 1.3

2007-06-26 Thread Juha Alatalo
https://issues.apache.org/jira/browse/WICKET-698

- Juha


Eelco Hillenius wrote:
> Could you please open a JIRA issue[1] for this and attach the test case?
> 
> Thanks,
> 
> Eelco
> 
> [1] http://issues.apache.org/jira/browse/WICKET
> 
> On 6/26/07, Juha Alatalo <[EMAIL PROTECTED]> wrote:
>> Juha Alatalo wrote:
>>> Johan Compagner wrote:
 Yes you have :). private final static IGetAndSet getGetAndSetter(String
 exp, Class clz) has changed quite a lot.

  > Do you have a unit test that fails now that shouldn't that i can
 add to
  > the PropertyResolverTest ?

 No I don't.


>> Anything happened in this case? It's kind of a show stopper for us. Test
>> case is pasted in the end of the mail.
>>
>> - Juha
>>
>>
>> package org.apache.wicket.model;
>>
>> import java.util.Properties;
>> import java.util.Vector;
>>
>> import org.apache.wicket.Component;
>> import org.apache.wicket.WicketTestCase;
>> import org.apache.wicket.markup.html.basic.Label;
>>
>>
>> /**
>>   * Tests the toString() method on the models in the
>> org.apache.wicket.model package.
>>   */
>> public class VectorModelTest extends WicketTestCase
>> {
>> /**
>>  * Used for models in testing.
>>  */
>> private static class InnerVectorPOJO extends Vector
>> {
>> public String   testValue = "vector";
>> }
>>
>> /**
>>  * Construct.
>>  *
>>  * @param name
>>  */
>> public VectorModelTest(String name)
>> {
>> super(name);
>> }
>>
>> /**
>>  * Tests the PropertyModel with vector.
>>  */
>> public void testPropertyModel()
>> {
>> PropertyModel vecModel = new PropertyModel(new 
>> InnerVectorPOJO(),
>> "testValue");
>> String expected = "vector";
>> assertEquals(expected, vecModel.getObject());
>> }
>> }
>>
>> -
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ___
>> Wicket-user mailing list
>> Wicket-user@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wicket-user
>>
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1) PropertyResolver and Lists 2) Page expiration in 1.3

2007-06-26 Thread Eelco Hillenius
Could you please open a JIRA issue[1] for this and attach the test case?

Thanks,

Eelco

[1] http://issues.apache.org/jira/browse/WICKET

On 6/26/07, Juha Alatalo <[EMAIL PROTECTED]> wrote:
> Juha Alatalo wrote:
> > Johan Compagner wrote:
> >> Yes you have :). private final static IGetAndSet getGetAndSetter(String
> >> exp, Class clz) has changed quite a lot.
> >>
> >>  > Do you have a unit test that fails now that shouldn't that i can
> >> add to
> >>  > the PropertyResolverTest ?
> >>
> >> No I don't.
> >>
> >>
>
> Anything happened in this case? It's kind of a show stopper for us. Test
> case is pasted in the end of the mail.
>
> - Juha
>
>
> package org.apache.wicket.model;
>
> import java.util.Properties;
> import java.util.Vector;
>
> import org.apache.wicket.Component;
> import org.apache.wicket.WicketTestCase;
> import org.apache.wicket.markup.html.basic.Label;
>
>
> /**
>   * Tests the toString() method on the models in the
> org.apache.wicket.model package.
>   */
> public class VectorModelTest extends WicketTestCase
> {
> /**
>  * Used for models in testing.
>  */
> private static class InnerVectorPOJO extends Vector
> {
> public String   testValue = "vector";
> }
>
> /**
>  * Construct.
>  *
>  * @param name
>  */
> public VectorModelTest(String name)
> {
> super(name);
> }
>
> /**
>  * Tests the PropertyModel with vector.
>  */
> public void testPropertyModel()
> {
> PropertyModel vecModel = new PropertyModel(new 
> InnerVectorPOJO(),
> "testValue");
> String expected = "vector";
> assertEquals(expected, vecModel.getObject());
> }
> }
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user
>

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1) PropertyResolver and Lists 2) Page expiration in 1.3

2007-06-26 Thread Juha Alatalo
Juha Alatalo wrote:
> Johan Compagner wrote:
>> Yes you have :). private final static IGetAndSet getGetAndSetter(String
>> exp, Class clz) has changed quite a lot.
>>
>>  > Do you have a unit test that fails now that shouldn't that i can
>> add to
>>  > the PropertyResolverTest ?
>>
>> No I don't.
>>
>>

Anything happened in this case? It's kind of a show stopper for us. Test 
case is pasted in the end of the mail.

- Juha


package org.apache.wicket.model;

import java.util.Properties;
import java.util.Vector;

import org.apache.wicket.Component;
import org.apache.wicket.WicketTestCase;
import org.apache.wicket.markup.html.basic.Label;


/**
  * Tests the toString() method on the models in the 
org.apache.wicket.model package.
  */
public class VectorModelTest extends WicketTestCase
{
/**
 * Used for models in testing.
 */
private static class InnerVectorPOJO extends Vector
{
public String   testValue = "vector";
}

/**
 * Construct.
 *
 * @param name
 */
public VectorModelTest(String name)
{
super(name);
}

/**
 * Tests the PropertyModel with vector.
 */
public void testPropertyModel()
{
PropertyModel vecModel = new PropertyModel(new 
InnerVectorPOJO(), 
"testValue");
String expected = "vector";
assertEquals(expected, vecModel.getObject());
}
}

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1) PropertyResolver and Lists 2) Page expiration in 1.3

2007-06-18 Thread Juha Alatalo
Johan Compagner wrote:
> Yes you have :). private final static IGetAndSet getGetAndSetter(String
> exp, Class clz) has changed quite a lot.
> 
>  > Do you have a unit test that fails now that shouldn't that i can
> add to
>  > the PropertyResolverTest ?
> 
> No I don't.
> 
> 
> 
> is this exception now thrown then:
> 
> throw new WicketRuntimeException("The expression '" + exp
> + "' is neither an index nor is it a 
> method for the list "
> + clz);
> 
> ??
> 

WicketMessage: The expression 'automationEnabled' is neither an index 
nor is it a method for the list class 
syncrontech.common.gate.ModelSettingsColl

Root cause:

org.apache.wicket.WicketRuntimeException: The expression 
'automationEnabled' is neither an index nor is it a method for the list 
class syncrontech.common.gate.ModelSettingsColl
at 
org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:253)
at 
org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:198)
at 
org.apache.wicket.util.lang.PropertyResolver.getValue(PropertyResolver.java:85)


> 
> 
> 
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> 
> 
> 
> 
> ___
> Wicket-user mailing list
> Wicket-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wicket-user

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1) PropertyResolver and Lists 2) Page expiration in 1.3

2007-06-18 Thread Johan Compagner


Yes you have :). private final static IGetAndSet getGetAndSetter(String
exp, Class clz) has changed quite a lot.

> Do you have a unit test that fails now that shouldn't that i can add to
> the PropertyResolverTest ?

No I don't.




is this exception now thrown then:

throw new WicketRuntimeException("The expression '" + exp
   + "' is neither an index nor is it a
method for the list "
   + clz);

??
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1) PropertyResolver and Lists 2) Page expiration in 1.3

2007-06-18 Thread Al Maw
Juha Alatalo wrote:
> Eelco Hillenius wrote:
>>> Thanks. I had blocked cookies on my test site for some reason. Why
>>> cookies are needed in 1.3? In 1.2 that wasn't the case, was it?
>> It shouldn't be the case now either; links should always be rewritten
>> so that it includes the jsessionid if the cookie is not available (the
>> actual rewriting is done by the servlet container btw).
>>
>> I just tested the site I'm working off and turned cookies off and it
>> works fine. Can you track a little bit further where your problem
>> comes from?
>>
> 
> I can track it further a little bit later. First we are trying to get 
> things working somehow with 1.3. However this same problem occurs in 
> wicket examples.
> - disable cookies
> - http://www.wicketstuff.org/wicket13/
> - test any page where are links or buttons

Odd. On my local wicket-examples running under Jetty, things work fine 
(I get a ;jsessionid=[...]?wicket:interface=[...] link). But you're 
right, on wicketstuff.org, it doesn't seem to cope.

Al

-- 
Alastair Maw
Wicket-biased blog at http://herebebeasties.com

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1) PropertyResolver and Lists 2) Page expiration in 1.3

2007-06-17 Thread Juha Alatalo
Eelco Hillenius wrote:
>> Thanks. I had blocked cookies on my test site for some reason. Why
>> cookies are needed in 1.3? In 1.2 that wasn't the case, was it?
> 
> It shouldn't be the case now either; links should always be rewritten
> so that it includes the jsessionid if the cookie is not available (the
> actual rewriting is done by the servlet container btw).
> 
> I just tested the site I'm working off and turned cookies off and it
> works fine. Can you track a little bit further where your problem
> comes from?
> 

I can track it further a little bit later. First we are trying to get 
things working somehow with 1.3. However this same problem occurs in 
wicket examples.
- disable cookies
- http://www.wicketstuff.org/wicket13/
- test any page where are links or buttons

- Juha

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1) PropertyResolver and Lists 2) Page expiration in 1.3

2007-06-15 Thread Eelco Hillenius
> Thanks. I had blocked cookies on my test site for some reason. Why
> cookies are needed in 1.3? In 1.2 that wasn't the case, was it?

It shouldn't be the case now either; links should always be rewritten
so that it includes the jsessionid if the cookie is not available (the
actual rewriting is done by the servlet container btw).

I just tested the site I'm working off and turned cookies off and it
works fine. Can you track a little bit further where your problem
comes from?

Eelco

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1) PropertyResolver and Lists 2) Page expiration in 1.3

2007-06-15 Thread Juha Alatalo
Johan Compagner wrote:
> 1)
> If the model is List, PropertySolver doesn't try to find fields. We are
> using vectors containing public fields. In 1.2.6 this was ok.
> 
> 
> i dont know if we really changed the property resolver behavior like tis 
> for 1.3

Yes you have :). private final static IGetAndSet getGetAndSetter(String 
exp, Class clz) has changed quite a lot.

> Do you have a unit test that fails now that shouldn't that i can add to 
> the PropertyResolverTest ?

No I don't.

> is the Session.bind() method called for a request?
> That either doesn't happen or you are constantly getting a new http 
> session (you loose the cookie ?)
> 

Thanks. I had blocked cookies on my test site for some reason. Why 
cookies are needed in 1.3? In 1.2 that wasn't the case, was it?

- Juha


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Re: [Wicket-user] 1) PropertyResolver and Lists 2) Page expiration in 1.3

2007-06-15 Thread Johan Compagner


1)
If the model is List, PropertySolver doesn't try to find fields. We are
using vectors containing public fields. In 1.2.6 this was ok.



i dont know if we really changed the property resolver behavior like tis for
1.3
Do you have a unit test that fails now that shouldn't that i can add to the
PropertyResolverTest ?


2)

Pressing any button or link causes page expiration. It seems that
sessions are not stored anywhere. newSessionStore() of WebApplication is
called every time session is needed. We tested this with very basic
WebApplication and Page:
WebApplication:
- getResourceSettings().addResourceFolder(folder); was set
WebPage:
- contains one TextField, one AjaxButton and one ListView.

Any ideas what to do?



is the Session.bind() method called for a request?
That either doesn't happen or you are constantly getting a new http session
(you loose the cookie ?)

johan
-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user