You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Martin Grotzke <ma...@javakaffee.de> on 2007/05/22 02:51:13 UTC

T5: add request parameter to url

hello,

i'm just trying to implement a simple search form, that
displays some items after the search.

additionally, the url shall contain the request parameter then,
so that the url /myapp/search becomes /myapp/search/query/ipod
or /myapp/search/ipod if the user searched for ipod.

is there a solution for this in T5?

thanx && cheers,
martin



Re: T5: add request parameter to url

Posted by Martin Grotzke <ma...@javakaffee.de>.
Hi Howard,

i just found that I have to return a Link instance in the
submit method, that contains the desired parameters.

Now i realized that my stylesheet is no longer loaded
correctly, so I added this to my page class:

    @Inject
    @Path("context:css/screen.css")
    private Asset _stylesheetScreen;

and change the template to:

	<style type="text/css" media="screen">
		@import url(${stylesheetScreen});
	</style>

Unfortunately, the page designes provided this as

	<style type="text/css" media="screen">
			/*<![CDATA[*/
			<!--
		@import url("css/screen.css");
			-->
			/*]]>*/
	</style>

but this cannot be processed by T5, even

	<style type="text/css" media="screen">
			<!--
		@import url(${stylesheetScreen});
			-->
	</style>

is not processed, and I can also not include the
${stylesheetScreen} variable in quotation marks like this:
"${stylesheetScreen}"

Are there solutions (planned) for this?

Thanx && cheers,
Martin


On Mon, 2007-05-21 at 18:06 -0700, Howard Lewis Ship wrote:
> Yes, what you describe is called a "page activation context", additional
> data added to the URL after the page name is identified.  Please check the
> documentation.
> 
> 
> 
> On 5/21/07, Martin Grotzke <ma...@javakaffee.de> wrote:
> >
> > hello,
> >
> > i'm just trying to implement a simple search form, that
> > displays some items after the search.
> >
> > additionally, the url shall contain the request parameter then,
> > so that the url /myapp/search becomes /myapp/search/query/ipod
> > or /myapp/search/ipod if the user searched for ipod.
> >
> > is there a solution for this in T5?
> >
> > thanx && cheers,
> > martin
> >
> >
> >
> >
> 
> 
-- 
Martin Grotzke
http://www.javakaffee.de/blog/

Re: T5: add request parameter to url

Posted by Howard Lewis Ship <hl...@gmail.com>.
Yes, what you describe is called a "page activation context", additional
data added to the URL after the page name is identified.  Please check the
documentation.



On 5/21/07, Martin Grotzke <ma...@javakaffee.de> wrote:
>
> hello,
>
> i'm just trying to implement a simple search form, that
> displays some items after the search.
>
> additionally, the url shall contain the request parameter then,
> so that the url /myapp/search becomes /myapp/search/query/ipod
> or /myapp/search/ipod if the user searched for ipod.
>
> is there a solution for this in T5?
>
> thanx && cheers,
> martin
>
>
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com