You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Hans Braxmeier <ha...@uni-ulm.de> on 2007/04/24 12:02:32 UTC

Creating unique URLs

Hello,

The tapestry tutorial demonstrates how to implement
the Hi/Lo Game (Start and Guess Page). Is it possible
to set the URL dependent on the guessed number?
Let's say if I click 10 the Browser's URL should
be http://localhost:8080/guess/10, if I click 5 the
Browser's URL should be be http://localhost:8080/guess/5
(In Tapestry 4 we used ServiceEncoding)

Thanks for any help,
Hans

--

Abteilungen SAI
und Stochastik

Universität Ulm
Helmholtzstr. 18
Raum E22
0731/50-23575

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Creating unique URLs

Posted by TG <ta...@hotmail.com>.
Taha, it works! Thanks so much.

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Forum-tp2404216p4640804.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Creating unique URLs

Posted by Taha Hafeez <ta...@gmail.com>.
Hi

Put Confirm.java in your mixins packages. If your application package
is "com.company.product", then your mixins package will be
"com.company.product.mixins". Put the confirm.js in the same package
but in "src/main/resources" source folder.

So the structure will be

src/main/java/com/company/product/mixins/Confirm.java
src/main/resources/com/company/product/mixins/confirm.js

Next, you can use it with any component implementing ClientElement. In
the template you can use the "mixins" attribute

e.g.

<t:yourcomponent t:mixins='confirm'/>

Or, in java you can use it like this.

@Component(mixins = "confirm")
private YourComponent yourComponent;

regards
Taha


On Thu, Jul 28, 2011 at 5:28 AM, TG <ta...@hotmail.com> wrote:
> Come on guys, please help a fellow newbie tapestry here :) Taha provided me
> with those two links, one is confirm.js another is Confirm.java. How do I
> incorporate that in my Grid action hyperlink?
>
> TIA
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Forum-tp2404216p4640695.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Creating unique URLs

Posted by TG <ta...@hotmail.com>.
Come on guys, please help a fellow newbie tapestry here :) Taha provided me
with those two links, one is confirm.js another is Confirm.java. How do I
incorporate that in my Grid action hyperlink?

TIA

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Tapestry-Forum-tp2404216p4640695.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Creating unique URLs

Posted by Massimo Lusetti <ml...@gmail.com>.
On 4/24/07, Hans Braxmeier <ha...@uni-ulm.de> wrote:

>
> Thanks Massimo, it works...
>
> One more question: Is it possible to change
> "guess" although the html-file is named
> guess.html respectively the class-file
> guess.java?

I would say not but with a considerable amount of code patches.

-- 
Massimo
http://meridio.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Creating unique URLs

Posted by Hans Braxmeier <ha...@uni-ulm.de>.
Thanks Massimo, it works...

One more question: Is it possible to change
"guess" although the html-file is named
guess.html respectively the class-file
guess.java?

Hans

On Tue, 24 Apr 2007, Massimo Lusetti wrote:

> On 4/24/07, Hans Braxmeier <ha...@uni-ulm.de> wrote:
>
> > The tapestry tutorial demonstrates how to implement
> > the Hi/Lo Game (Start and Guess Page). Is it possible
> > to set the URL dependent on the guessed number?
> > Let's say if I click 10 the Browser's URL should
> > be http://localhost:8080/guess/10, if I click 5 the
> > Browser's URL should be be http://localhost:8080/guess/5
> > (In Tapestry 4 we used ServiceEncoding)
>
> With that kind of URL the 10 and 5 numbers are considered page context
> parameter so you can get at them with the onActivate/onPassivate
> paradigm.
>
>
> --
> Massimo
> http://meridio.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


--

Abteilungen SAI
und Stochastik

Universität Ulm
Helmholtzstr. 18
Raum E22
0731/50-23575

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Creating unique URLs

Posted by Massimo Lusetti <ml...@gmail.com>.
On 4/24/07, Hans Braxmeier <ha...@uni-ulm.de> wrote:

> The tapestry tutorial demonstrates how to implement
> the Hi/Lo Game (Start and Guess Page). Is it possible
> to set the URL dependent on the guessed number?
> Let's say if I click 10 the Browser's URL should
> be http://localhost:8080/guess/10, if I click 5 the
> Browser's URL should be be http://localhost:8080/guess/5
> (In Tapestry 4 we used ServiceEncoding)

With that kind of URL the 10 and 5 numbers are considered page context
parameter so you can get at them with the onActivate/onPassivate
paradigm.


-- 
Massimo
http://meridio.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org