Re: Bug in IndexedParamUrlCodingStrategy 1.3 Beta3

2007-09-14 Thread Chris Lintz

Actually I just realized what causes this but have no idea how to get past
it. The InviteAcceptacePage has a Panel within another Panel.  The nested
Panel contains a simple form submit button.  The IndexParamUrlStrategy's
appendParameters() function is called  with this Map parameters (from an
eclipse debug):

wicket:interface =
:4:moduleColumnPanel:moduleColumnFrag:loginPanel:loginBoxPanel:loginBox:lFrm::IFormSubmitListener::

Here is the appendParameters() function inside
IndexedParamUrlCodingStrategy:

protected void appendParameters(AppendingStringBuffer url, Map parameters)
{
int i;
for (i = 0; parameters.containsKey(String.valueOf(i)); i++)
{
String value = (String) 
parameters.get(String.valueOf(i));
if (!url.endsWith(/))
url.append(/);
url.append(urlEncode(value)).append(/);
}

String pageMap = (String) parameters.get(wicket:pageMapName);
if (pageMap != null)
{
i++;
pageMap = 
WebRequestCodingStrategy.encodePageMapName(pageMap);
if (!url.endsWith(/))
url.append(/);

url.append(wicket:pageMapName).append(/).append(urlEncode(pageMap)).append(/);
}
if (i != parameters.size())
throw new WicketRuntimeException(
Not all parameters were encoded. Make 
sure all parameter names are
integers in consecutive order starting with zero. Current parameter names
are: 
+ 
parameters.keySet().toString());
else
return;
}

The pagemap is null and the statement if (i != parameters.size()) evaluates
to true and generates the error.

Why does the panel with these Map parameters generate the error inside that
function? 



thanks for any help




Chris Lintz wrote:
 
 Hi all,
 So i think there is a bug in IndexedParamUrlCodingStrategy .  I have this
 simple mount in my extened WebApplication:
 
mount(new IndexedParamUrlCodingStrategy(/joinme,
 InviteAcceptancePage.class));
 
 
 In my InviteAcceptancePage class, i simply do this snippet of code:
 
 public InviteAcceptancePage(PageParameters params)
 {
String code = params.getString(0);
logger.debug(code:+code);
...
 
 }
 When i do this in my browser for example: 
 http://www.mydomain.com/joinme/5
 
 The following 5 parameter is logged just fine, but after the
 constructor returns I get the below exception:
 
 22:23:43,600 ERROR [RequestCycle] Not all parameters were encoded. Make
 sure all parameter names are integers in consecutive order starting with
 zero. Current parameter names are: [wicket:interface]
 org.apache.wicket.WicketRuntimeException: Not all parameters were encoded.
 Make sure all parameter names are integers in consecutive order
 
 
 
 Any ideas?
 
 thanks
 

-- 
View this message in context: 
http://www.nabble.com/Bug-in-IndexedParamUrlCodingStrategy-1.3-Beta3-tf4440109.html#a12669640
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: Bug in IndexedParamUrlCodingStrategy 1.3 Beta3

2007-09-14 Thread Chris Lintz

Yes I am using a stateless login form.  Wow.  Thanks for getting that
response out.  I was able to see exactly where it fails inside the
appendParameters() function of the IndexParamUrlCodingStrategy (see my
follow up post).  Now that you mention the stateless form, it seems it must
simply not know how to handle the Map parmeters sent in.  As well the
pagemap is null.


Sebastiaan van Erk wrote:
 
 I had the same problem; it was caused by a StatelessForm on the page. 
 When replacing StatelessForm with Form it went away. Are you using a 
 stateless form as well?
 
 BTW, I made a JIRA issue for this:
 https://issues.apache.org/jira/browse/WICKET-950
 
 Regards,
 Sebastiaan
 
 Chris Lintz wrote:
 Hi all,
 So i think there is a bug in IndexedParamUrlCodingStrategy .  I have this
 simple mount in my extened WebApplication:
 
mount(new IndexedParamUrlCodingStrategy(/joinme,
 InviteAcceptancePage.class));
 
 
 In my InviteAcceptancePage class, i simply do this snippet of code:
 
 public InviteAcceptancePage(PageParameters params)
 {
String code = params.getString(0);
logger.debug(code:+code);
...
 
 }
 When i do this in my browser for example: 
 http://www.mydomain.com/joinme/5
 
 The following 5 parameter is logged just fine, but after the
 constructor
 returns I get the below exception:
 
 22:23:43,600 ERROR [RequestCycle] Not all parameters were encoded. Make
 sure
 all parameter names are integers in consecutive order starting with zero.
 Current parameter names are: [wicket:interface]
 org.apache.wicket.WicketRuntimeException: Not all parameters were
 encoded.
 Make sure all parameter names are integers in consecutive order
 
 
 
 Any ideas?
 
 thanks
 
  
 

-- 
View this message in context: 
http://www.nabble.com/Bug-in-IndexedParamUrlCodingStrategy-1.3-Beta3-tf4440109.html#a12669643
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: Bug in IndexedParamUrlCodingStrategy 1.3 Beta3

2007-09-14 Thread Sebastiaan van Erk
I had the same problem; it was caused by a StatelessForm on the page. 
When replacing StatelessForm with Form it went away. Are you using a 
stateless form as well?


BTW, I made a JIRA issue for this:
https://issues.apache.org/jira/browse/WICKET-950

Regards,
Sebastiaan

Chris Lintz wrote:

Hi all,
So i think there is a bug in IndexedParamUrlCodingStrategy .  I have this
simple mount in my extened WebApplication:

   mount(new IndexedParamUrlCodingStrategy(/joinme,
InviteAcceptancePage.class));


In my InviteAcceptancePage class, i simply do this snippet of code:

public InviteAcceptancePage(PageParameters params)
{
   String code = params.getString(0);
   logger.debug(code:+code);
   ...

}
When i do this in my browser for example: 
http://www.mydomain.com/joinme/5


The following 5 parameter is logged just fine, but after the constructor
returns I get the below exception:

22:23:43,600 ERROR [RequestCycle] Not all parameters were encoded. Make sure
all parameter names are integers in consecutive order starting with zero.
Current parameter names are: [wicket:interface]
org.apache.wicket.WicketRuntimeException: Not all parameters were encoded.
Make sure all parameter names are integers in consecutive order



Any ideas?

thanks


smime.p7s
Description: S/MIME Cryptographic Signature


Re: Bug in IndexedParamUrlCodingStrategy 1.3 Beta3

2007-09-14 Thread Igor Vaynberg
thanks

-igor


On 9/14/07, Chris Lintz [EMAIL PROTECTED] wrote:


 I Have submitted the following Jira on this issue:
 http://issues.apache.org/jira/browse/WICKET-976


 Chris Lintz wrote:
 
  Actually I just realized what causes this but have no idea how to get
 past
  it. The InviteAcceptacePage has a Panel within another Panel.  The
 nested
  Panel contains a simple form submit button.  The IndexParamUrlStrategy's
  appendParameters() function is called  with this Map parameters (from an
  eclipse debug):
 
  wicket:interface =
 
 :4:moduleColumnPanel:moduleColumnFrag:loginPanel:loginBoxPanel:loginBox:lFrm::IFormSubmitListener::
 
  Here is the appendParameters() function inside
  IndexedParamUrlCodingStrategy:
 
  protected void appendParameters(AppendingStringBuffer url, Map
 parameters)
{
int i;
for (i = 0; parameters.containsKey(String.valueOf(i));
 i++)
{
String value = (String) parameters.get(
 String.valueOf(i));
if (!url.endsWith(/))
url.append(/);
url.append(urlEncode(value)).append(/);
}
 
String pageMap = (String) parameters.get
 (wicket:pageMapName);
if (pageMap != null)
{
i++;
pageMap =
 WebRequestCodingStrategy.encodePageMapName(pageMap);
if (!url.endsWith(/))
url.append(/);
 
  url.append
 (wicket:pageMapName).append(/).append(urlEncode(pageMap)).append(/);
}
if (i != parameters.size())
throw new WicketRuntimeException(
Not all parameters were encoded.
 Make sure all parameter names are
  integers in consecutive order starting with zero. Current parameter
 names
  are: 
+
 parameters.keySet().toString());
else
return;
}
 
  The pagemap is null and the statement if (i != parameters.size())
  evaluates to true and generates the error.
 
  Why does the panel with these Map parameters generate the error inside
  that function?
 
 
 
  thanks for any help
 
 
 
 
  Chris Lintz wrote:
 
  Hi all,
  So i think there is a bug in IndexedParamUrlCodingStrategy .  I have
 this
  simple mount in my extened WebApplication:
 
 mount(new IndexedParamUrlCodingStrategy(/joinme,
  InviteAcceptancePage.class));
 
 
  In my InviteAcceptancePage class, i simply do this snippet of code:
 
  public InviteAcceptancePage(PageParameters params)
  {
 String code = params.getString(0);
 logger.debug(code:+code);
 ...
 
  }
  When i do this in my browser for example:
  http://www.mydomain.com/joinme/5
 
  The following 5 parameter is logged just fine, but after the
  constructor returns I get the below exception:
 
  22:23:43,600 ERROR [RequestCycle] Not all parameters were encoded. Make
  sure all parameter names are integers in consecutive order starting
 with
  zero. Current parameter names are: [wicket:interface]
  org.apache.wicket.WicketRuntimeException: Not all parameters were
  encoded. Make sure all parameter names are integers in consecutive
 order
 
 
 
  Any ideas?
 
  thanks
 
 
 

 --
 View this message in context:
 http://www.nabble.com/Bug-in-IndexedParamUrlCodingStrategy-1.3-Beta3-tf4440109.html#a12678916
 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: Bug in IndexedParamUrlCodingStrategy 1.3 Beta3

2007-09-14 Thread Sebastiaan van Erk

Maybe WICKET-950 should be marked as a duplicate of this one then.

Regards,
Sebastiaan

Chris Lintz wrote:

I Have submitted the following Jira on this issue:
http://issues.apache.org/jira/browse/WICKET-976


Chris Lintz wrote:

Actually I just realized what causes this but have no idea how to get past
it. The InviteAcceptacePage has a Panel within another Panel.  The nested
Panel contains a simple form submit button.  The IndexParamUrlStrategy's
appendParameters() function is called  with this Map parameters (from an
eclipse debug):

wicket:interface =
:4:moduleColumnPanel:moduleColumnFrag:loginPanel:loginBoxPanel:loginBox:lFrm::IFormSubmitListener::

Here is the appendParameters() function inside
IndexedParamUrlCodingStrategy:

protected void appendParameters(AppendingStringBuffer url, Map parameters)
{
int i;
for (i = 0; parameters.containsKey(String.valueOf(i)); i++)
{
String value = (String) 
parameters.get(String.valueOf(i));
if (!url.endsWith(/))
url.append(/);
url.append(urlEncode(value)).append(/);
}

String pageMap = (String) parameters.get(wicket:pageMapName);
if (pageMap != null)
{
i++;
pageMap = 
WebRequestCodingStrategy.encodePageMapName(pageMap);
if (!url.endsWith(/))
url.append(/);

url.append(wicket:pageMapName).append(/).append(urlEncode(pageMap)).append(/);
}
if (i != parameters.size())
throw new WicketRuntimeException(
Not all parameters were encoded. Make 
sure all parameter names are
integers in consecutive order starting with zero. Current parameter names
are: 
+ 
parameters.keySet().toString());
else
return;
}

The pagemap is null and the statement if (i != parameters.size())
evaluates to true and generates the error.

Why does the panel with these Map parameters generate the error inside
that function? 




thanks for any help




Chris Lintz wrote:

Hi all,
So i think there is a bug in IndexedParamUrlCodingStrategy .  I have this
simple mount in my extened WebApplication:

   mount(new IndexedParamUrlCodingStrategy(/joinme,
InviteAcceptancePage.class));


In my InviteAcceptancePage class, i simply do this snippet of code:

public InviteAcceptancePage(PageParameters params)
{
   String code = params.getString(0);
   logger.debug(code:+code);
   ...

}
When i do this in my browser for example: 
http://www.mydomain.com/joinme/5


The following 5 parameter is logged just fine, but after the
constructor returns I get the below exception:

22:23:43,600 ERROR [RequestCycle] Not all parameters were encoded. Make
sure all parameter names are integers in consecutive order starting with
zero. Current parameter names are: [wicket:interface]
org.apache.wicket.WicketRuntimeException: Not all parameters were
encoded. Make sure all parameter names are integers in consecutive order



Any ideas?

thanks







smime.p7s
Description: S/MIME Cryptographic Signature


Re: Bug in IndexedParamUrlCodingStrategy 1.3 Beta3

2007-09-14 Thread Chris Lintz

yeah sorry i missed that last line in your post or I wouldnt have submitted. 
I guess better 2 Jira's for it than none :)

Sebastiaan van Erk wrote:
 
 Maybe WICKET-950 should be marked as a duplicate of this one then.
 
 Regards,
 Sebastiaan
 
 Chris Lintz wrote:
 I Have submitted the following Jira on this issue:
 http://issues.apache.org/jira/browse/WICKET-976
 
 
 Chris Lintz wrote:
 Actually I just realized what causes this but have no idea how to get
 past
 it. The InviteAcceptacePage has a Panel within another Panel.  The
 nested
 Panel contains a simple form submit button.  The IndexParamUrlStrategy's
 appendParameters() function is called  with this Map parameters (from an
 eclipse debug):

 wicket:interface =
 :4:moduleColumnPanel:moduleColumnFrag:loginPanel:loginBoxPanel:loginBox:lFrm::IFormSubmitListener::

 Here is the appendParameters() function inside
 IndexedParamUrlCodingStrategy:

 protected void appendParameters(AppendingStringBuffer url, Map
 parameters)
 {
 int i;
 for (i = 0; parameters.containsKey(String.valueOf(i)); i++)
 {
 String value = (String) 
 parameters.get(String.valueOf(i));
 if (!url.endsWith(/))
 url.append(/);
 url.append(urlEncode(value)).append(/);
 }

 String pageMap = (String) parameters.get(wicket:pageMapName);
 if (pageMap != null)
 {
 i++;
 pageMap = 
 WebRequestCodingStrategy.encodePageMapName(pageMap);
 if (!url.endsWith(/))
 url.append(/);
 
 url.append(wicket:pageMapName).append(/).append(urlEncode(pageMap)).append(/);
 }
 if (i != parameters.size())
 throw new WicketRuntimeException(
 Not all parameters were encoded. Make 
 sure all parameter names are
 integers in consecutive order starting with zero. Current parameter
 names
 are: 
 + 
 parameters.keySet().toString());
 else
 return;
 }

 The pagemap is null and the statement if (i != parameters.size())
 evaluates to true and generates the error.

 Why does the panel with these Map parameters generate the error inside
 that function? 



 thanks for any help




 Chris Lintz wrote:
 Hi all,
 So i think there is a bug in IndexedParamUrlCodingStrategy .  I have
 this
 simple mount in my extened WebApplication:

mount(new IndexedParamUrlCodingStrategy(/joinme,
 InviteAcceptancePage.class));


 In my InviteAcceptancePage class, i simply do this snippet of code:

 public InviteAcceptancePage(PageParameters params)
 {
String code = params.getString(0);
logger.debug(code:+code);
...

 }
 When i do this in my browser for example: 
 http://www.mydomain.com/joinme/5

 The following 5 parameter is logged just fine, but after the
 constructor returns I get the below exception:

 22:23:43,600 ERROR [RequestCycle] Not all parameters were encoded. Make
 sure all parameter names are integers in consecutive order starting
 with
 zero. Current parameter names are: [wicket:interface]
 org.apache.wicket.WicketRuntimeException: Not all parameters were
 encoded. Make sure all parameter names are integers in consecutive
 order



 Any ideas?

 thanks


 
 
  
 

-- 
View this message in context: 
http://www.nabble.com/Bug-in-IndexedParamUrlCodingStrategy-1.3-Beta3-tf4440109.html#a12680931
Sent from the Wicket - User mailing list archive at Nabble.com.


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