[
https://issues.apache.org/jira/browse/TAP5-521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679570#action_12679570
]
Inge Solvoll commented on TAP5-521:
-----------------------------------
Here's an example approach for modifying an event link:
function updateZone(elementConnectedToZone, url, param)
{
var zoneObject = Tapestry.findZoneManager(elementConnectedToZone);
if ( !zoneObject ) return;
if (!param) {
param = ' ';// param needs to be non-empty because it goes into the url as
a parameter either way
}
param = eqUrlEnc(param); // Equanda encoder, see equanda.js
// link was generated with the placeholder string 'XXX' in the context.
link = link.gsub('XXX', param);
zoneObject.updateFromURL(link);
}
> Support for adding parameters to event links with javascript
> ------------------------------------------------------------
>
> Key: TAP5-521
> URL: https://issues.apache.org/jira/browse/TAP5-521
> Project: Tapestry 5
> Issue Type: New Feature
> Components: tapestry-core
> Affects Versions: 5.0.18
> Reporter: Inge Solvoll
> Priority: Minor
>
> A Tapestry.js hook into the parameters of event and action links would be
> very useful in order to create more powerful client side controls. As of now,
> I'm using a function created by equanda that performs string transformations
> on a generated link. It works, but it would be so much cleaner and safer with
> a built-in function looking something like this:
> Tapestry.addEventLinkContextValue(link, value) {
> link = link + '/' + value;
> }
> This is of course a simplified example that probably wouldn't work... :)
> Here are some use cases to make it clearer why I want this feature:
> 1. A dropdown that updates a zone through its onchange event, pushing the
> selected value into the context of the trigger link.
> 2. A textfield that works like an autocompleter on a connected zone. Same
> pattern, the entered text is pushed into the context of the trigger link.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.