You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "József Börcsök (JIRA)" <ji...@apache.org> on 2007/05/31 19:29:15 UTC

[jira] Created: (WICKET-605) Stataless form skips page parameters

Stataless form skips page parameters
------------------------------------

                 Key: WICKET-605
                 URL: https://issues.apache.org/jira/browse/WICKET-605
             Project: Wicket
          Issue Type: Bug
          Components: wicket
    Affects Versions: trunk
         Environment: linux, glassfish v2
            Reporter: József Börcsök


Page parameters are not included in stataless form action parameter.

I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by Johan Compagner <jc...@gmail.com>.
don't we pretty much already have that map?

RequestCycle.get().getRequest().getRequestParameters().getParameters()
that one is parsed in the first step. (but mutable)
but that one is going into the PAgeParameters
except that PP has a little bit more that is not done in the first step but
in the second one of the request cycle because bookmarkable mounts can
introduce any kind of parameters from the url.
and this is done in more then one place So the only thing i see to really do
it
right is to make sure that our base page has a PageParameters constructor
and users should call that super() so that we can set the real one in the
request cycle


johan




On 6/4/07, Eelco Hillenius <ee...@gmail.com> wrote:
>
> Sorry, but I don't agree. I think it's YAGNI. Metadata is a bit uglier
> to read (at least the code to access it), it's harder to trace in the
> debugger and just less obvious. I actually don't think it would be
> that out of place to put the (immutable instance of) request
> parameters as parsed in the first step of request cycle processing in
> the request.
>
> Eelco
>
> On 6/4/07, Martijn Dashorst <ma...@gmail.com> wrote:
> > On 6/4/07, Eelco Hillenius <ee...@gmail.com> wrote:
> > > > i am getting a bit tired of all those threadlocals that have to be
> > > > cleaned... I already discussed this with matej and i thing we should
> > > > give the RequestCycle metadata... then we can store any thing we
> want
> > > > and it is auto cleanup
> > >
> > > Agreed. RequestCycle currently doesn't have metadata though. What's
> > > the advantage of using meta data there instead of a normal property? I
> > > think none...
> >
> > I think the advantage of metadata is to have less tight coupling of
> > other parts to the request cycle. We are going to use the request
> > cycle as a Bag of stuff, which is needed during RC processing, but
> > don't have a direct relationship to the RC, other than that it is part
> > of the RC.
> >
> > Having a metadata facility in the RC will facilitate this, and not
> > make the RC 'bloated'.
> >
> > Just thinking out loud.
> >
> > Martijn
> >
> > --
> > Join the wicket community at irc.freenode.net: ##wicket
> > Wicket 1.2.6 contains a very important fix. Download Wicket now!
> > http://wicketframework.org
> >
>

Re: [jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by Eelco Hillenius <ee...@gmail.com>.
Sorry, but I don't agree. I think it's YAGNI. Metadata is a bit uglier
to read (at least the code to access it), it's harder to trace in the
debugger and just less obvious. I actually don't think it would be
that out of place to put the (immutable instance of) request
parameters as parsed in the first step of request cycle processing in
the request.

Eelco

On 6/4/07, Martijn Dashorst <ma...@gmail.com> wrote:
> On 6/4/07, Eelco Hillenius <ee...@gmail.com> wrote:
> > > i am getting a bit tired of all those threadlocals that have to be
> > > cleaned... I already discussed this with matej and i thing we should
> > > give the RequestCycle metadata... then we can store any thing we want
> > > and it is auto cleanup
> >
> > Agreed. RequestCycle currently doesn't have metadata though. What's
> > the advantage of using meta data there instead of a normal property? I
> > think none...
>
> I think the advantage of metadata is to have less tight coupling of
> other parts to the request cycle. We are going to use the request
> cycle as a Bag of stuff, which is needed during RC processing, but
> don't have a direct relationship to the RC, other than that it is part
> of the RC.
>
> Having a metadata facility in the RC will facilitate this, and not
> make the RC 'bloated'.
>
> Just thinking out loud.
>
> Martijn
>
> --
> Join the wicket community at irc.freenode.net: ##wicket
> Wicket 1.2.6 contains a very important fix. Download Wicket now!
> http://wicketframework.org
>

Re: [jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by Martijn Dashorst <ma...@gmail.com>.
On 6/4/07, Eelco Hillenius <ee...@gmail.com> wrote:
> > i am getting a bit tired of all those threadlocals that have to be
> > cleaned... I already discussed this with matej and i thing we should
> > give the RequestCycle metadata... then we can store any thing we want
> > and it is auto cleanup
>
> Agreed. RequestCycle currently doesn't have metadata though. What's
> the advantage of using meta data there instead of a normal property? I
> think none...

I think the advantage of metadata is to have less tight coupling of
other parts to the request cycle. We are going to use the request
cycle as a Bag of stuff, which is needed during RC processing, but
don't have a direct relationship to the RC, other than that it is part
of the RC.

Having a metadata facility in the RC will facilitate this, and not
make the RC 'bloated'.

Just thinking out loud.

Martijn

-- 
Join the wicket community at irc.freenode.net: ##wicket
Wicket 1.2.6 contains a very important fix. Download Wicket now!
http://wicketframework.org

Re: [jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by Eelco Hillenius <ee...@gmail.com>.
Ok, let's go for it then. Who's taking it up?

Eelco

On 6/5/07, Matej Knopp <ma...@gmail.com> wrote:
> I'm definitely +1 for metadata. The thread locals are clumsy and
> extremely dangerous.
>
> -Matej
>
> On 6/5/07, Johan Compagner <jc...@gmail.com> wrote:
> > >
> > > > But i also need it for other stuff that are specific to specific
> > > > implementations of certain things
> > > > for example the AccessStackStore doesn't need such a thread locale but
> > > SLC
> > > > does..
> > >
> > > Fair enough. So you would use such a 'bag' in request cycle to store
> > > stuff like dirtyObjects (session)? Aren't you afraid this will open up
> > > a new can of worms (users misusing this facility rather then providing
> > > their own request cycle implementation for instance)?
> >
> >
> >
> > Isn't that the problem we also should then have on Session or Component?
> > And i don't see it miss used a lot (at least all the examples i get from
> > people here on the lists/web)
> > also don't think that will happen a lot because most people (you and me
> > included!) like
> > to have a simple get/setter. But the problem is that we as the framework
> > just can't do that
> > for specific/default implementations of stuff. Then Requestcycle would
> > become polluted.
> >
> > The nice thing about metadata is (compare to a pure put/get like hashmap)
> > then they can be generified
> > so with java5 you don't have to cast
> >
>

Re: [jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by Matej Knopp <ma...@gmail.com>.
I'm definitely +1 for metadata. The thread locals are clumsy and
extremely dangerous.

-Matej

On 6/5/07, Johan Compagner <jc...@gmail.com> wrote:
> >
> > > But i also need it for other stuff that are specific to specific
> > > implementations of certain things
> > > for example the AccessStackStore doesn't need such a thread locale but
> > SLC
> > > does..
> >
> > Fair enough. So you would use such a 'bag' in request cycle to store
> > stuff like dirtyObjects (session)? Aren't you afraid this will open up
> > a new can of worms (users misusing this facility rather then providing
> > their own request cycle implementation for instance)?
>
>
>
> Isn't that the problem we also should then have on Session or Component?
> And i don't see it miss used a lot (at least all the examples i get from
> people here on the lists/web)
> also don't think that will happen a lot because most people (you and me
> included!) like
> to have a simple get/setter. But the problem is that we as the framework
> just can't do that
> for specific/default implementations of stuff. Then Requestcycle would
> become polluted.
>
> The nice thing about metadata is (compare to a pure put/get like hashmap)
> then they can be generified
> so with java5 you don't have to cast
>

Re: [jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by Johan Compagner <jc...@gmail.com>.
>
> > But i also need it for other stuff that are specific to specific
> > implementations of certain things
> > for example the AccessStackStore doesn't need such a thread locale but
> SLC
> > does..
>
> Fair enough. So you would use such a 'bag' in request cycle to store
> stuff like dirtyObjects (session)? Aren't you afraid this will open up
> a new can of worms (users misusing this facility rather then providing
> their own request cycle implementation for instance)?



Isn't that the problem we also should then have on Session or Component?
And i don't see it miss used a lot (at least all the examples i get from
people here on the lists/web)
also don't think that will happen a lot because most people (you and me
included!) like
to have a simple get/setter. But the problem is that we as the framework
just can't do that
for specific/default implementations of stuff. Then Requestcycle would
become polluted.

The nice thing about metadata is (compare to a pure put/get like hashmap)
then they can be generified
so with java5 you don't have to cast

Re: [jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by Eelco Hillenius <ee...@gmail.com>.
> But i also need it for other stuff that are specific to specific
> implementations of certain things
> for example the AccessStackStore doesn't need such a thread locale but SLC
> does..

Fair enough. So you would use such a 'bag' in request cycle to store
stuff like dirtyObjects (session)? Aren't you afraid this will open up
a new can of worms (users misusing this facility rather then providing
their own request cycle implementation for instance)?

Eelco

Re: [jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by Johan Compagner <jc...@gmail.com>.
the second level cache has now a thread local
Session has 2 thread locals

especially the first one of the SLC do you really want to have a property on
the RequestCycle for that?
then you get really strange coupling.

i am not talking about the PageParameters. That could maybe go into the
request cycle
because that is pretty much core (is it web only or not??)

But i also need it for other stuff that are specific to specific
implementations of certain things
for example the AccessStackStore doesn't need such a thread locale but SLC
does..

johan


On 6/4/07, Eelco Hillenius <ee...@gmail.com> wrote:
>
> > i am getting a bit tired of all those threadlocals that have to be
> > cleaned... I already discussed this with matej and i thing we should
> > give the RequestCycle metadata... then we can store any thing we want
> > and it is auto cleanup
>
> Agreed. RequestCycle currently doesn't have metadata though. What's
> the advantage of using meta data there instead of a normal property? I
> think none...
>
> Eelco
>

Re: [jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by Eelco Hillenius <ee...@gmail.com>.
> i am getting a bit tired of all those threadlocals that have to be
> cleaned... I already discussed this with matej and i thing we should
> give the RequestCycle metadata... then we can store any thing we want
> and it is auto cleanup

Agreed. RequestCycle currently doesn't have metadata though. What's
the advantage of using meta data there instead of a normal property? I
think none...

Eelco

Re: [jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by Johan Compagner <jc...@gmail.com>.
i am getting a bit tired of all those threadlocals that have to be
cleaned... I already discussed this with matej and i thing we should
give the RequestCycle metadata... then we can store any thing we want
and it is auto cleanup

On 6/4/07, Eelco Hillenius (JIRA) <ji...@apache.org> wrote:
>
>     [
> https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501258
> ]
>
> Eelco Hillenius commented on WICKET-605:
> ----------------------------------------
>
> The best hack I can currently imagine is to set the current PageParameters
> instance as a threadlocal somewhere (RequestCycle?) when the
> WebPage(PageParameters) constructor is called (btw, I see no reason why this
> constructor couldn't be moved to Page... we can do that regardless), and
> clean it up again in RequestCycle#detach.
>
> It would be yet another threadlocal unfortunately, but otoh it is valuable
> information to have accesible, which is hard to get to right now.
>
> WDYT?
>
> > Stataless form skips page parameters
> > ------------------------------------
> >
> >                 Key: WICKET-605
> >                 URL: https://issues.apache.org/jira/browse/WICKET-605
> >             Project: Wicket
> >          Issue Type: Bug
> >          Components: wicket
> >    Affects Versions: trunk
> >         Environment: linux, glassfish v2
> >            Reporter: József Börcsök
> >            Assignee: Eelco Hillenius
> >
> > Page parameters are not included in stataless form action parameter.
> > I think stateless form should override urlFor(RequestListenerInterface
> listener) method and append page parameters. (Submit works if I manually add
> them at runtime ie. with firebug plugin in browser.)
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>

[jira] Resolved: (WICKET-605) Stataless form skips page parameters

Posted by "Eelco Hillenius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eelco Hillenius resolved WICKET-605.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.3.0-beta2

I think I fixed it right like this. But I wouldn't mind a review, Johan :)

> Stataless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: trunk
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501855 ] 

Johan Compagner commented on WICKET-605:
----------------------------------------

i think it should work yes, because we only set the params in the Resolve step and i guess then only one is being made.


> Stataless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: trunk
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stateless form skips page parameters

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504121 ] 

Johan Compagner commented on WICKET-605:
----------------------------------------

but where do those args comming from??
as eelco said the args are only resolved in the first phase. And in that phase the PageParam object is only made i believe for a Bookmarkable call.

So the args that you have how do you create those?

So somehowe it is also generated for you for normal interface request? Then that is what we should try to avoid. Only with a bookmarkable request the PageParams should be hold on to in the request cycle.

But what should happen in your case?? Why are you adding the args? Isn't it supposed to add args?

> Stateless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-605) Stataless form skips page parameters

Posted by "Eelco Hillenius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eelco Hillenius reassigned WICKET-605:
--------------------------------------

    Assignee: Johan Compagner  (was: Eelco Hillenius)

You want to get this one Johan?

> Stataless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: trunk
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stateless form skips page parameters

Posted by "Alastair Maw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504054 ] 

Alastair Maw commented on WICKET-605:
-------------------------------------

Hmmm. Is it just me, or is this really unintuitive?
If I call a method Foo.setBar(Object bar) I expect it to set the field bar of the instance Foo to the given value.

I don't care if it's javadoc'ed or not, I just really don't like this code:

final void setPageParameters(PageParameters parameters)
{
    if (currentStep == RESOLVE_TARGET)
    {
         this.pageParameters = parameters;
    }
}

> Stateless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stateless form skips page parameters

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504017 ] 

Igor Vaynberg commented on WICKET-605:
--------------------------------------

this is what i do:
b.append(urlFor(ILinkListener.INTERFACE));
b.append("&").append(getJavascriptWidgetId()).append("='+args;\n");

so the callback is generated and then invoked when the user clicks the link

what happens is that every time the user clicks the link an extra javascriptwidgetid param gets stuck in the request parameters because requestcycle keeps reusing the original requests pageparameters

so first url looks like this: ?wicket:interface=::&calendar=+args
then after a click it looks like this: ?wicket:interface=::&calendar=20070612&calendar=+args
and after another: ?wicket:interface=::&calendar=20070612&calendar=20070612&calendar=+args
and so on

> Stateless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stateless form skips page parameters

Posted by "Eelco Hillenius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503966 ] 

Eelco Hillenius commented on WICKET-605:
----------------------------------------

I saw the usual heroic remarks (wtf!, retarded!) on the IRC log about the fact that PageParameters sets itself as the parameters object in the request cycle.

If you would actually follow that code a bit, you can see that it only sets itself when the request is still resolving; after that the parameter just won't be set so you can construct the page parameters object while handling events and rendering etc as much as you like. Solving it like this looked better to me than doing it the request cycle processing itself, as that would be exactly the kind of code-duplication introducing fix people have been complaining about lately. 

This is the idea, and I hope I didn't overlook something (mind you I did ask for a review). If anyone has a better solution, please contribute.

> Stateless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by "József Börcsök (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500494 ] 

József Börcsök commented on WICKET-605:
---------------------------------------

I have some stateless pages on my portal (contents loaded by id, ie. a news details, list forums, documents in a topic, ...) so these pages are available for guests too without the need of session. These pages have a login form so users can log in quickly and after it they get the same content. But the content is different with empty parameters.

If I submit a form on a parameterized page the page should not be changed after submit. Stateful components are not recreated on submit, they can hold models but stateless pages needs information for reconstruction. I think stateless links and stateless forms should include the parameters of the current page with a solution like calling getPageParameters().

> Stataless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: trunk
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Eelco Hillenius
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stateless form skips page parameters

Posted by "Eelco Hillenius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504053 ] 

Eelco Hillenius commented on WICKET-605:
----------------------------------------

Yes, which is what the current version has.

	/**
	 * Set this on request cycle. Request will decide whether to keep it as a
	 * reference or not.
	 */
	private void setOnRequestCycle()
	{
		RequestCycle cycle = RequestCycle.get();
		if (cycle != null)
		{
			cycle.setPageParameters(this);
		}
	}

> Stateless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-605) Stateless form skips page parameters

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg updated WICKET-605:
---------------------------------

    Comment: was deleted

> Stateless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (WICKET-605) Stataless form skips page parameters

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Igor Vaynberg reopened WICKET-605:
----------------------------------


we unrolled revision #544754

the problem introduced by this revision was that the requestcycle kept reusing old pageparameters in the urlfor call. this would lead to urls growing if parameters were added to them on client side

so for example the first time the url would be
?wicekt:interface=xxx&param=blah
next request
?wicekt:interface=xxx&param=blah&param=boppatyblah
next request
?wicekt:interface=xxx&param=blah&param=boppatyblah&param=tiredblah

we cannot just keep recycling request parameters

> Stataless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stateless form skips page parameters

Posted by "Alastair Maw (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504051 ] 

Alastair Maw commented on WICKET-605:
-------------------------------------

Eelco wrote:
>If you would actually follow that code a bit, you can see that it only sets itself when the request is still resolving

Can I note that if this is the case, some comments in the PageParameters constructor(s) to that effect might have been useful. ;-)

> Stateless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stateless form skips page parameters

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504014 ] 

Igor Vaynberg commented on WICKET-605:
--------------------------------------

this is what i do:


> Stateless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500465 ] 

Johan Compagner commented on WICKET-605:
----------------------------------------

this is pretty annoying this is the part of RequestCycle that does the trick:

	public final CharSequence urlFor(final Component component,
			final RequestListenerInterface listener)
	{
		// Get Page holding component and mark it as stateful.
		final Page page = component.getPage();
		final IRequestTarget target;
		if (listener != IRedirectListener.INTERFACE && component.isStateless()
				&& page.isBookmarkable())
		{
			target = new BookmarkableListenerInterfaceRequestTarget(page.getPageMapName(),
					page.getClass(), new PageParameters(), component, listener);
		}

as you can see we do here 'new PageParameters()' 
and thats why there aren't any in the url. 
But what should we put in there? How do we get  the right once?
can we just get the from the current request? I don't think so
the only reliable thing to ask for is the page. But then the page has to have a method like getPageParameters()
but we don't have anything like that at the moment so what is going to be returned ?


> Stataless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: trunk
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Eelco Hillenius
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by "József Börcsök (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501845 ] 

József Börcsök commented on WICKET-605:
---------------------------------------

I've tested it from current trunk and works fine :) With that patch page parameters are available in other components (like panels, menu) too so they don't need to be passed (in constructor).

> Stataless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: trunk
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stateless form skips page parameters

Posted by "Eelco Hillenius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503931 ] 

Eelco Hillenius commented on WICKET-605:
----------------------------------------

We didn't have to throw out the reference to the current request parameters though. This was helping more people/ cases and is unrelated to appending those request parameters.

> Stateless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-605) Stateless form skips page parameters

Posted by "Martijn Dashorst (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martijn Dashorst updated WICKET-605:
------------------------------------

    Fix Version/s:     (was: 1.3.0-beta2)
                   1.3.0-beta3

> Stateless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta3
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stateless form skips page parameters

Posted by "Eelco Hillenius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504064 ] 

Eelco Hillenius commented on WICKET-605:
----------------------------------------

Yeah, I don't like it much either, but I don't see a better alternative. The PageParameters objects having to know what 'the current step' is would be equally bad (or imo worse) and doing this stuff during request target resolving would result in code duplication in an area that already grew into messy code.

But like I said, if you have a better proposal, I'm all ears.

> Stateless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stateless form skips page parameters

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503997 ] 

Johan Compagner commented on WICKET-605:
----------------------------------------

igor: when did that happen exactly?
because in the first phase (where the page paramets could be created and set) we only do that for a bookmarkable page.
So are you saying that we should just remove them again in the response phase? So that all urls for are not using that PageParam object?
(so the params are only created before the listener interface call, and when we start to render they are gone again)?

because how else could they be reused ob places where we shouldn't have them??

> Stateless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by "Johan Compagner (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12500461 ] 

Johan Compagner commented on WICKET-605:
----------------------------------------

This should be automatically done
the bookmarkable part of the stateless form url should already contain the page parameters and then the wicket:interface param

because this shouldn't only work for the url of the form but for all stateless urls like stateless links!



> Stataless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: trunk
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Eelco Hillenius
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by "Eelco Hillenius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501258 ] 

Eelco Hillenius commented on WICKET-605:
----------------------------------------

The best hack I can currently imagine is to set the current PageParameters instance as a threadlocal somewhere (RequestCycle?) when the WebPage(PageParameters) constructor is called (btw, I see no reason why this constructor couldn't be moved to Page... we can do that regardless), and clean it up again in RequestCycle#detach.

It would be yet another threadlocal unfortunately, but otoh it is valuable information to have accesible, which is hard to get to right now.

WDYT?

> Stataless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: trunk
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Eelco Hillenius
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by "Eelco Hillenius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501772 ] 

Eelco Hillenius commented on WICKET-605:
----------------------------------------

See discussion here http://www.nabble.com/Re%3A--jira--Commented%3A-%28WICKET-605%29-Stataless-form-skips-page-parameters-tf3867201.html

> Stataless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: trunk
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Eelco Hillenius
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stateless form skips page parameters

Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12504125 ] 

Igor Vaynberg commented on WICKET-605:
--------------------------------------

@johan

the problem is this

on first request i do 
String temp=urlfor(interface);
String url=temp+"&foo=bar";
and it works just great

but now on second request to the same page when i do
String temp2=urlfor(interface) temp2!=temp. in fact temp2=url. this is the problem, i expect temp2=temp, but it remembers the pageparameters from previous requests and adds them to the urlfor calls.


> Stateless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WICKET-605) Stateless form skips page parameters

Posted by "Alastair Maw (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alastair Maw updated WICKET-605:
--------------------------------

    Summary: Stateless form skips page parameters  (was: Stataless form skips page parameters)

> Stateless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-beta1
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>             Fix For: 1.3.0-beta2
>
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WICKET-605) Stataless form skips page parameters

Posted by "Eelco Hillenius (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12501800 ] 

Eelco Hillenius commented on WICKET-605:
----------------------------------------

So, to pick some of the discussion from the thread, I think we currently agree that we could keep a reference to the pageparameters object in the request target (as a normal property) if the pageparameters object is passed to the constructor, and for the other things that are mentioned in the discussion, we can introduce meta data on the request cycle.

> Stataless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: trunk
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Johan Compagner
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (WICKET-605) Stataless form skips page parameters

Posted by "Eelco Hillenius (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eelco Hillenius reassigned WICKET-605:
--------------------------------------

    Assignee: Eelco Hillenius

> Stataless form skips page parameters
> ------------------------------------
>
>                 Key: WICKET-605
>                 URL: https://issues.apache.org/jira/browse/WICKET-605
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: trunk
>         Environment: linux, glassfish v2
>            Reporter: József Börcsök
>            Assignee: Eelco Hillenius
>
> Page parameters are not included in stataless form action parameter.
> I think stateless form should override urlFor(RequestListenerInterface listener) method and append page parameters. (Submit works if I manually add them at runtime ie. with firebug plugin in browser.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.