Hi Thiago,

 

Thanks for all your help! I'd like to post a complete solution so if anyone
else gets stuck in the future then he doesn't have to struggle since there
are not enough tapestry examples:

//tml

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

 


                                <label t:type="label" class="radio inline"
for="modeOFF" >                                                        

                                <input t:type="radio" t:id="modeOff"
data-id="OFF" class="pulseMode" />

                                ${message:modeOff}

                                </label>                             

                                                                  

                                <label t:type="label" class="radio inline"
for="modeA" >


                                <input t:type="radio" t:id="modeA"
data-id="A" class="pulseMode"  />


                                ${message:modeA}

                                </label> 

 


                                .

                                .

                                .

            </t:radiogroup>

 

//JavaScript

jQuery(document).ready( function(){    

                var radioId;

                jQuery(document).on("click", ".pulseMode", function () {

                radioId = jQuery(this).data('id');


                jQuery('#pulseChangeModal').modal('show');

                });

                jQuery('#yesButton').click(function() {


                                jQuery(".modal-footer
#yesButton").attr("href",  window.changePulseMode +'?id=' + radioId);


});

});

 

//Java

public void afterRender() { 

                  String url =
componentResources.createEventLink("changePulseMode").toAbsoluteURI();

      javaScriptSupport.addScript("window.changePulseMode = '%s';", url);

   } 

 

//Note:

window.location = window.changePulseMode + '?id=' + radioId; 

&

jQuery.ajax({

                url:    window.changePulseMode + '?id=' + radioId ,

                async:  false

                });

Both throw: org.apache.tapestry5.runtime.ComponentEventException

Unable process query parameter 'id' as parameter #1 of event handler method
pl.sns.renau.client.pages.BrewSettingsPart.onChangePulseMode(java.lang.Strin
g): The value for query parameter 'id' was blank, but a non-blank value is
needed.

Reply via email to