Re: [T5] missing some listener to bind component/page events ?

2007-06-28 Thread Francois Armand

#Cyrille37# wrote:

Thank you François,

The problem is not on the component context, but on the component id.

Oups ^^

I think a listener concept is missing !

Another example :
(This code is invalid because of the duplicate component id)

   YES
   YES


   Object onActionFromWant2beRich( boolean yes )
   {
  ...
   }

Ok, now I better understand your concern. You would have a kind of group 
notion for action event ?

Somethink like that :
8<--
  context="true">YES
  context="false">YES

8<--
And the event handler "onActionFromFoo" match first link, 
"onActionFromBar" match second link, and "onActionFromWant2beRich" match 
both.


I don't think this kink of feature exists for now, but you can take 
advantage of event "bubbling" to achieve your need : just create a 
trivial component "Want2beRich" :

8<--
java:
public class Want2beRich {}
html:
http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
YES
NO

8<--
and use it on your parent component/page : , with the 
corresponding event handler "onActionFromWant2berich".


Well, it seems that the risk is to have a batch of component with this 
solution...

Nonetheless, I hope it will help you.


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



Re: [T5] missing some listener to bind component/page events ?

2007-06-28 Thread #Cyrille37#

Francois Armand a écrit :

#Cyrille37# wrote:

In another way to explain,
I would like to make "by hand" the same work than a t:actionLink in a 
t:loop


the code :

   ${guess}

create several links like :
   /do.guess/4
   /do.guess/6
   /do.guess/7

So, howto do the same "by hand" (without a loop) ???

You can use list in context. For example, if you have a
ListgetGuessContexte() {
   List list = new ArrayList();
   list.add("plop");
   list.add(new Integer(guess).toString());
   return list;
}
In your :
${guess}

You will have link : .../do./guess/plop/0, .../do.guess/plop/1 etc.

See 
http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html#org.apache.tapestry.corelib.components.actionlink

Thank you François,

The problem is not on the component context, but on the component id.
I think a listener concept is missing !

Another example :
(This code is invalid because of the duplicate component id)

   YES
   YES


   Object onActionFromWant2beRich( boolean yes )
   {
  ...
   }


Perhaps I've missed some essential concept ??

cheers
cyrille.

Well, if anybody as an idea about how to do this kind of think with 
submit button, I'm interested :)


Francois


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



Re: [T5] missing some listener to bind component/page events ?

2007-06-28 Thread Francois Armand

#Cyrille37# wrote:

In another way to explain,
I would like to make "by hand" the same work than a t:actionLink in a 
t:loop


the code :

   ${guess}

create several links like :
   /do.guess/4
   /do.guess/6
   /do.guess/7

So, howto do the same "by hand" (without a loop) ???

You can use list in context. For example, if you have a
ListgetGuessContexte() {
   List list = new ArrayList();
   list.add("plop");
   list.add(new Integer(guess).toString());
   return list;
}
In your :
${guess}

You will have link : .../do./guess/plop/0, .../do.guess/plop/1 etc.

See 
http://tapestry.apache.org/tapestry5/tapestry-core/component-parameters.html#org.apache.tapestry.corelib.components.actionlink


Well, if anybody as an idea about how to do this kind of think with 
submit button, I'm interested :)


Francois


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



Re: [T5] missing some listener to bind component/page events ?

2007-06-27 Thread #Cyrille37#

In another way to explain,
I would like to make "by hand" the same work than a t:actionLink in a t:loop

the code :

   ${guess}

create several links like :
   /do.guess/4
   /do.guess/6
   /do.guess/7

So, howto do the same "by hand" (without a loop) ???

cyrille

#Cyrille37# a écrit :

Hi (again and again ;-)

Is it possible to create event for a component ??
After read guide "Component Events" and done some tests I could not 
figure howto manage differents events for a component.


For exemple I would like to bind 2 links to the onActionA() method and 
2 other link to the onActionB() method. How it is possible ?

This following code does not work, but it is to explain me need :

bind A()
bind A()
bind B()
bind B()

I've understand that :
A link :
Ballot 01
The t:type is a component, so I must use 'actionLink' to send a event.
The t:id is the unique id of the component.

It miss something like a listener as with Tapestry4, isn't it ?

cyrille





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



[T5] missing some listener to bind component/page events ?

2007-06-27 Thread #Cyrille37#

Hi (again and again ;-)

Is it possible to create event for a component ??
After read guide "Component Events" and done some tests I could not 
figure howto manage differents events for a component.


For exemple I would like to bind 2 links to the onActionA() method and 2 
other link to the onActionB() method. How it is possible ?

This following code does not work, but it is to explain me need :

bind A()
bind A()
bind B()
bind B()

I've understand that :
A link :
Ballot 01
The t:type is a component, so I must use 'actionLink' to send a event.
The t:id is the unique id of the component.

It miss something like a listener as with Tapestry4, isn't it ?

cyrille

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