So the best way of dealing with passing information in this case is to not use the activation context, but adding a query parameter with the radio button id to the EventLink URL using JavaScript.

On Wed, 30 Oct 2013 13:49:01 -0200, Asma Merchant <amerch...@renau.com> wrote:

How do you generate the radio buttons?

The buttons are already present on the page i.e. they are static.


//Code to generate radio buttons:

<t:radiogroup t:id="pulseMode">


<input t:type="radio" t:id="Off" href="#pulseChangeModal"
data-toggle="modal"  data-id="PulseMode.Off" />

<input t:type="radio" t:id="A" href="#pulseChangeModal" data-toggle="modal"
data-id="PulseMode.A" />

<input t:type="radio" t:id="B" href="#pulseChangeModal" data-toggle="modal"
data-id="PulseMode.B" />

.

.

.

</t:radiogroup>


//Modal Code:

<div id="pulseChangeModal" class="modal hide fade">

<div class="modal-header">

<button type="button" class="close" data-dismiss="modal"></button> </div>


       <div class="modal-body">   </div>

<div class="modal-footer">

         <a id="yesButton" t:type="web/eventlinkex"
t:event="changePulseMode" href="#" t:context="Pass clicked radio button's id
here" class="btn btn-primary" >${message:yes }</a>

         <a href="#" class="btn" data-dismiss="modal">${message:no }</a>

       </div>

</div>




From: Thiago H de Paula Figueiredo [via Apache Tapestry Mailing List
Archives] [mailto:ml-node+s1045711n5724385...@n5.nabble.com]
Sent: Tuesday, October 29, 2013 5:18 PM
To: am
Subject: Re: Pass Context Info to Bootstrap Modal


On Tue, 29 Oct 2013 19:55:20 -0200, Asma Merchant <[hidden email]>
wrote:

Hi Thiago,

Hi!


Thanks for your response.
"t:context="literal:whatever you want"

I still don't understand how to grab the id of radio button that was
clicked. Let me be more clear: There's a set of 11 radio buttons each
with a different id. All radio buttons call same confirm message. If
user clicks
yes then the value of the button that invoked the dialog should be
passed to
the event so appropriate action can be taken.


How do you generate the radio buttons?

"In this case, the button id  is very probably static, so you can pass

it
directly."

Yes, the button is static, but which button id to pass is dynamic.

I'm sorry, I meant radio id, not button id.



--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to