T5:Submit component

2008-10-21 Thread James Sherwood
Hello,

 

I am playing around with T5 and I have a submit inside of a form component
like this:

 

TML:

input type=submit t:type=submit t:id=submitButton value=Submit/

 

Java:

@OnEvent(component = submitButton)

  void onSubmitButton() {

System.out.println(Submit button was pressed!);



  }

 

When I press the button, only the form runs not the submit. 

 

Any Ideas?

 

--James



Re: T5:Submit component

2008-10-21 Thread Thiago H. de Paula Figueiredo
Em Tue, 21 Oct 2008 14:38:41 -0300, James Sherwood  
[EMAIL PROTECTED] escreveu:


@OnEvent(component = submitButton)
   void onSubmitButton() {
 System.out.println(Submit button was pressed!);
   }
}

The Submit components fires the selected event, not the submit event.  
So your annotation must be @OnEvent(component=submitButton,  
value=selected) or your method name must be onSelectedButton. You don't  
need both at the same time.


--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
Consultor, desenvolvedor e instrutor em Java
http://www.arsmachina.com.br/thiago

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



Re: [T5] Submit component doesn't render the label?

2007-06-22 Thread Dan Adams
okay, i'll do that. Just thought it was a little weird that the
component accepted a formal parameter that is never used.

On Thu, 2007-06-21 at 07:35 -0700, Howard Lewis Ship wrote:
 I suppose it could; I've been trying to minimize what T5 does in this
 area, i.e., ou should bind the (informal) value parameter (which is
 what is used as the label).
 
 On 6/21/07, Dan Adams [EMAIL PROTECTED] wrote:
  I have the following:
 
  t:submit t:id=formSubmit class=button label=prop:buttonLabel /
 
  which results in:
 
  input class=button id=formSubmit name=formSubmit type=submit
 
  The component has this which looks like it never uses the label
  parameter:
 
  void beginRender(MarkupWriter writer)
  {
writer.element(input, type, submit, name, getElementName(),
  id, getClientId());
  }
 
 
  --
  Dan Adams
  Senior Software Engineer
  Interactive Factory
  617.235.5857
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
-- 
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857


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



Re: [T5] Submit component doesn't render the label?

2007-06-22 Thread Howard Lewis Ship

The label parameter is implicit in thethe Field interface, you could
also put a label on a Submit (not sure why).  It's possible that
Submit should not be a Field, but simply be Field-like.

On 6/22/07, Dan Adams [EMAIL PROTECTED] wrote:

okay, i'll do that. Just thought it was a little weird that the
component accepted a formal parameter that is never used.

On Thu, 2007-06-21 at 07:35 -0700, Howard Lewis Ship wrote:
 I suppose it could; I've been trying to minimize what T5 does in this
 area, i.e., ou should bind the (informal) value parameter (which is
 what is used as the label).

 On 6/21/07, Dan Adams [EMAIL PROTECTED] wrote:
  I have the following:
 
  t:submit t:id=formSubmit class=button label=prop:buttonLabel /
 
  which results in:
 
  input class=button id=formSubmit name=formSubmit type=submit
 
  The component has this which looks like it never uses the label
  parameter:
 
  void beginRender(MarkupWriter writer)
  {
writer.element(input, type, submit, name, getElementName(),
  id, getClientId());
  }
 
 
  --
  Dan Adams
  Senior Software Engineer
  Interactive Factory
  617.235.5857
 
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


--
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857


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





--
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

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



[T5] Submit component doesn't render the label?

2007-06-21 Thread Dan Adams
I have the following:

t:submit t:id=formSubmit class=button label=prop:buttonLabel /

which results in:

input class=button id=formSubmit name=formSubmit type=submit

The component has this which looks like it never uses the label
parameter:

void beginRender(MarkupWriter writer)
{
  writer.element(input, type, submit, name, getElementName(),
id, getClientId());
}


-- 
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857


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



Re: [T5] Submit component doesn't render the label?

2007-06-21 Thread Howard Lewis Ship

I suppose it could; I've been trying to minimize what T5 does in this
area, i.e., ou should bind the (informal) value parameter (which is
what is used as the label).

On 6/21/07, Dan Adams [EMAIL PROTECTED] wrote:

I have the following:

t:submit t:id=formSubmit class=button label=prop:buttonLabel /

which results in:

input class=button id=formSubmit name=formSubmit type=submit

The component has this which looks like it never uses the label
parameter:

void beginRender(MarkupWriter writer)
{
  writer.element(input, type, submit, name, getElementName(),
id, getClientId());
}


--
Dan Adams
Senior Software Engineer
Interactive Factory
617.235.5857


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





--
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

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