public class SomePage {
@Inject
private ComponentResources resources;
@Inject
private JavaScriptSupport javaScriptSupport;
void afterRender(){
//Create an event link
Link link = resources.createEventLink("update");
javaScriptSupport("yourUpdateFunc('%s')", link.toAbsoluteURI());
}
//Ha
>> This lead me to believe that
>> I could replace: return new MultiZoneUpdate("totalPriceZone",
>> totalPriceZone);
>
> Not correct. The second parameter should be a component or a block. Zone and
> MuitiZoneUpdate are meant to be used without custom written JavaScript.
>
>> With something like:
>
>> With something like:
>> return new JSONObject().put("totalPriceZone", getTotalPrice());
>>
> In this case a JSONObject is returned to the caller which can be any
> javascript and then the object can be
> used in any way. If you want to update the zone you have to do it yourself
Ok that makes se
On Thu, 13 Jan 2011 13:24:32 -0200, Mark Shead
wrote:
The documentation says that the event handler for an Ajax call can
return (among other things) a JSONObject.
Correct.
This lead me to believe that
I could replace: return new MultiZoneUpdate("totalPriceZone",
totalPriceZone);
Not c
On Thu, Jan 13, 2011 at 8:54 PM, Mark Shead wrote:
> The documentation says that the event handler for an Ajax call can
> return (among other things) a JSONObject. This lead me to believe that
> I could replace:
> return new MultiZoneUpdate("totalPriceZone", totalPriceZone);
>
> In this case the
The documentation says that the event handler for an Ajax call can
return (among other things) a JSONObject. This lead me to believe that
I could replace:
return new MultiZoneUpdate("totalPriceZone", totalPriceZone);
With something like:
return new JSONObject().put("totalPriceZone", getTotalPrice(