ActionLink Parameter

2007-04-25 Thread Hans Braxmeier

Hello,

Considering the Tutorial with
the Start and Guess page: On
the Start page is an ActionLink
(Start guessing) which initialises
the number to guess by calling the
onAction() Method which calls the
guess.setup() Method and passes
a random number...

Is it possible to pass different
parameters to the guess page which
depend on different ActionLinks?

E.g. if there are three ActionLinks:
Start guessing (1-10)
Start guessing (1-100)
Start guessing (word)
In the first and second case a number
should be passed, in the second case
a string...

Thanks for any help, Hans

--

Abteilungen SAI
und Stochastik

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

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



Re: Creating unique URLs

2007-04-24 Thread Hans Braxmeier

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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--

Abteilungen SAI
und Stochastik

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

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



Creating unique URLs

2007-04-24 Thread Hans Braxmeier

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Tapestry 5 and URL encoding

2007-04-23 Thread Hans Braxmeier

Hi Nick,

Thanks, that was exactly what I was looking for.

Hans

On Mon, 23 Apr 2007, Nick Westgate wrote:

>  @Inject
>  private RequestGlobals _globals;
>
> Then you can use _globals.getHTTPServletRequest().getRequestURL()
> and other methods from javax.servlet.http.HttpServletRequest.
>
> Cheers,
> Nick.
>
>
> Hans Braxmeier wrote:
> > Hello together,
> >
> > Today I installed T5 and it's a great
> > tool. Is there something like an URL
> > encoder implemented in Tapestry 5 and
> > how can the current URL be shown on a
> > page?
> >
> > Thanks for any help,
> >
> > Hans Braxmeier
> >
> > --
> >
> > Abteilungen SAI
> > und Stochastik
> >
> > Universität Ulm
> > Helmholtzstr. 18
> > Raum E22
> > 0731/50-23575
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--

Abteilungen SAI
und Stochastik

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

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



Tapestry 5 and URL encoding

2007-04-20 Thread Hans Braxmeier

Hello together,

Today I installed T5 and it's a great
tool. Is there something like an URL
encoder implemented in Tapestry 5 and
how can the current URL be shown on a
page?

Thanks for any help,

Hans Braxmeier

--

Abteilungen SAI
und Stochastik

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

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



Re: list box onchange

2007-04-01 Thread Hans Braxmeier

Thanks for the answers. Because these are my first steps I don't
know how to get the selected item value and how to open a new html
page. The following code shows my tries:

Here the html code to create the form and a link


  
select color

  

  



 
  
   
  
 


 Open page with color 
...


and the java class

import org.apache.tapestry.event.PageBeginRenderListener;

public abstract class Home extends BasePage implements
PageBeginRenderListener{

  private String[] colors = {"blue", "red", "green", "yellow",
"a", "b", "c"};

  public abstract int getCurrentColorIndex();
  public abstract String getCurrentColor();
  public abstract boolean[] getSelection();
  public abstract void setSelection(boolean[] selection);

  public String getColorString() {
  return "" +
  colors[getCurrentColorIndex()] +
  "";
  }

  public String[] getColors() {
return colors;
  }

  public void pageBeginRender(PageEvent event) {
if (getSelection() == null) {
  setSelection(new boolean[colors.length]);
}
  }
}


Thanks for any help
Hans

On Sun, 1 Apr 2007, Martino Piccinato wrote:

> I the problem is just opening a new page (simple javascript with no async
> interaction with server) you could just extend tapestry list component
> adding the desired javascript.
>
> On 4/1/07, Yiannis Mavroukakis <[EMAIL PROTECTED]> wrote:
> >
> > Hi Hans,
> >
> > IMHO this is a nice candidate for the @EventListener.
> > Check out http://tapestry.apache.org/tapestry4.1/ajax/eventlistener.htmlfor 
> > more details and examples.
> >
> >
> > -Original Message-
> > From:   Hans Braxmeier [mailto:[EMAIL PROTECTED]
> > Sent:   Sun 01/04/2007 11:26
> > To: users@tapestry.apache.org
> > Cc:
> > Subject:list box onchange
> >
> >
> > Hi,
> >
> > I'm very new to tapestry and doing the first steps.
> >
> > Does anybody know how to realize a list box, that opens onChange
> > a new html page? Everything works well with html and javascript,
> > but I could not get it work in tapestry.
> >
> > the html code:
> >
> >   
> >   
> > select name
> > John
> > Tom
> >   
> >   
> >
> > the js code:
> >
> > function getValues() {
> >   var name =
> > document.form.list.options[document.form.list.selectedIndex].value;
> >   if (name == "empty") window.location.href = "index.html";
> >   else window.location.href = name + ".html";
> > }
> >
> > Thanks for any help
> > Hans
> >
> >
> > --
> >
> > Abteilungen SAI
> > und Stochastik
> >
> > Universität Ulm
> > Helmholtzstr. 18
> > Raum E22
> > 0731/50-23575
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > 
> > This e-mail has been scanned for all known viruses.
> >
> >
> >
> >
> > Note:__
> > This message is for the named person's use only. It may contain
> > confidential, proprietary or legally privileged information. No
> > confidentiality or privilege is waived or lost by any mistransmission.
> > If you receive this message in error, please immediately delete it and
> > all copies of it from your system, destroy any hard copies of it and
> > notify the sender. You must not, directly or indirectly, use, disclose,
> > distribute, print, or copy any part of this message if you are not the
> > intended recipient. Jaguar Freight Services and any of its subsidiaries
> > each reserve the right to monitor all e-mail communications through its
> > networks.
> > Any views expressed in this message are those of the individual sender,
> > except where the message states otherwise and the sender is authorized
> > to state them to be the views of any such entity.
> > 
> > This e-mail has been scanned for all known viruses.
> >
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>


--

Abteilungen SAI
und Stochastik

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

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



list box onchange()

2007-04-01 Thread Hans Braxmeier


Hi,

I'm very new to tapestry and doing the first steps.

Does anybody know how to realize a list box, that opens onChange
a new html page? Everything works well with html and javascript,
but I could not get it work in tapestry.

the html code

  
  
select name
John
Tom
  
  

and js

function getValues() {
  var name =
document.form.list.options[document.form.list.selectedIndex].value;
  if (name == "empty") window.location.href = "index.html";
  else window.location.href = name + ".html";
}

Thanks for any help
Hans


--

Abteilungen SAI
und Stochastik

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

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



list box onchange

2007-04-01 Thread Hans Braxmeier

Hi,

I'm very new to tapestry and doing the first steps.

Does anybody know how to realize a list box, that opens onChange
a new html page? Everything works well with html and javascript,
but I could not get it work in tapestry.

the html code:

  
  
select name
John
Tom
  
  

the js code:

function getValues() {
  var name =
document.form.list.options[document.form.list.selectedIndex].value;
  if (name == "empty") window.location.href = "index.html";
  else window.location.href = name + ".html";
}

Thanks for any help
Hans


--

Abteilungen SAI
und Stochastik

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

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