You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by degressor <pa...@yahoo.com> on 2011/05/25 23:58:50 UTC

Actionlink + action

Hi, I would like to have many actionlinks with different contextes, like:


<t:actionlink t:action="linkAnfrage_list"
context="literal:pdf">pdf</t:actionlink>      				
<t:actionlink t:action="linkAnfrage_list"
context="literal:csv">csv</t:actionlink>
<t:actionlink t:action="linkAnfrage_list"
context="literal:html">xml</t:actionlink>      				
<t:actionlink t:action="linkAnfrage_list"
context="literal:xml">xml</t:actionlink>

I get the error: 

Exception assembling root component of page Report: Exception assembling
embedded component 'linkAnfrage_list' (of type
org.apache.tapestry5.corelib.components.ActionLink, within Report):
Component Report already contains a child component with id
'linkAnfrage_list'. Embedded component ids must be unique (excluding case,
which is ignored).


The links should lead to the same action, but with differen parameters. The
problem is, I generate this links per  some generator and put them to
tapestry. So it is not easy to use t:loop here. 

Is there any way to get many links to the same action, with different
parametes in tapestry?
      				

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Actionlink-action-tp4426703p4426703.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: Actionlink + action

Posted by Josh Canfield <jo...@gmail.com>.
The example works fine in Tapestry 5.2.5. The action doesn't have a
relationship to the id so it's strange that you'd get this error. I
can't say that this was true in previous versions, although it seems
unlikely.

On Wed, May 25, 2011 at 2:58 PM, degressor <pa...@yahoo.com> wrote:
> Hi, I would like to have many actionlinks with different contextes, like:
>
>
> <t:actionlink t:action="linkAnfrage_list"
> context="literal:pdf">pdf</t:actionlink>
> <t:actionlink t:action="linkAnfrage_list"
> context="literal:csv">csv</t:actionlink>
> <t:actionlink t:action="linkAnfrage_list"
> context="literal:html">xml</t:actionlink>
> <t:actionlink t:action="linkAnfrage_list"
> context="literal:xml">xml</t:actionlink>
>
> I get the error:
>
> Exception assembling root component of page Report: Exception assembling
> embedded component 'linkAnfrage_list' (of type
> org.apache.tapestry5.corelib.components.ActionLink, within Report):
> Component Report already contains a child component with id
> 'linkAnfrage_list'. Embedded component ids must be unique (excluding case,
> which is ignored).
>
>
> The links should lead to the same action, but with differen parameters. The
> problem is, I generate this links per  some generator and put them to
> tapestry. So it is not easy to use t:loop here.
>
> Is there any way to get many links to the same action, with different
> parametes in tapestry?
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Actionlink-action-tp4426703p4426703.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: Actionlink + action

Posted by degressor <pa...@yahoo.com>.
Thank you for you quick replay!
Sorry, I don't understand the examples on the link you posted.

Maybe you can post an example? 

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Actionlink-action-tp4426703p4426765.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: Actionlink + action

Posted by Rich M <ri...@moremagic.com>.
You should use an eventlink instead.

In that case you can provide an explicit event name that all the links 
can map to, while not having overlapping component Ids.

http://tapestry.apache.org/current/tapestry-core/ref/org/apache/tapestry5/corelib/components/EventLink.html

On 05/25/2011 05:58 PM, degressor wrote:
> Hi, I would like to have many actionlinks with different contextes, like:
>
>
> <t:actionlink t:action="linkAnfrage_list"
> context="literal:pdf">pdf</t:actionlink>       				
> <t:actionlink t:action="linkAnfrage_list"
> context="literal:csv">csv</t:actionlink>
> <t:actionlink t:action="linkAnfrage_list"
> context="literal:html">xml</t:actionlink>       				
> <t:actionlink t:action="linkAnfrage_list"
> context="literal:xml">xml</t:actionlink>
>
> I get the error:
>
> Exception assembling root component of page Report: Exception assembling
> embedded component 'linkAnfrage_list' (of type
> org.apache.tapestry5.corelib.components.ActionLink, within Report):
> Component Report already contains a child component with id
> 'linkAnfrage_list'. Embedded component ids must be unique (excluding case,
> which is ignored).
>
>
> The links should lead to the same action, but with differen parameters. The
> problem is, I generate this links per  some generator and put them to
> tapestry. So it is not easy to use t:loop here.
>
> Is there any way to get many links to the same action, with different
> parametes in tapestry?
>        				
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Actionlink-action-tp4426703p4426703.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: Actionlink + action

Posted by degressor <pa...@yahoo.com>.
Thank you very much, ael! I works!

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Actionlink-action-tp4426703p4427908.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: Actionlink + action

Posted by ael <al...@dash.com.ph>.
Kindly check 
http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/navigation/eventlinks
http://jumpstart.doublenegative.com.au:8080/jumpstart/examples/navigation/eventlinks 

TML

    # Say Hi Dude 
    # Say Hi DudA 
    # Say Hi DudB 


CLASS

        // Use "flash" persistence to keep the message only until it's been
displayed once.
	@Persist(PersistenceConstants.FLASH)
	private String _hiMessage;

	void onSayHi(String name) {
		_hiMessage = "Hi, " + name + ".";
	}

	public String getHiMessage() {
		return _hiMessage;
	}


--
View this message in context: http://tapestry.1045711.n5.nabble.com/Actionlink-action-tp4426703p4427096.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