in address.js remove the last call to loadAddresse. i.e. just have

Tapestry.Initializer.loadAddresse = function loadAddresse(jsonObject){
...
}

it is probably that last surplus : loadAddresse(jsonObject); that
caused the JS error ('cos there is no global function called
loadAddresse) which then disabled JavaScript for the rest of the page
load.

Steve.




On 20 June 2012 15:56, baptiste <baptiste.toll...@atos.net> wrote:
> It doesn't work for me.
>
> In java :
>   @IncludeJavaScriptLibrary({ "context:static/javascript/address.js" })
>
>   @Environmental
>    private RenderSupport renderSupport;
>
>    @BeginRender
>    void addJsLibs() {
>        log.debug("BEGIN addJsLibs");
>        JSONObject jsonObject = new JSONObject();
>        jsonObject.put("m1", messages.get("new_delivery_address"));
>        jsonObject.put("m2", messages.get("js.error.address.empty"));
>        jsonObject.put("m3", messages.get("js.error.receiving.person.empty"));
>        jsonObject.put("m4", messages.get("js.error.street.empty"));
>        jsonObject.put("m5", messages.get("js.error.house.empty"));
>        jsonObject.put("m6", messages.get("js.error.postcode.empty"));
>        jsonObject.put("m7", messages.get("js.error.postcode.wrong"));
>        jsonObject.put("m8", messages.get("js.error.city.empty"));
>        jsonObject.put("m9", 
> messages.get("js.error.special.chars.not_accepted"));
>        jsonObject.put("m10", messages.get("js.error.floor.empty"));
>        jsonObject.put("m11", messages.get("js.error.floor.wrong"));
>        jsonObject.put("m12", messages.get("js.error.elevator.empty"));
>        renderSupport.addInit("loadAddresse", jsonObject);
>        log.debug("END addJsLibs");
>    }
>
> in address.js:
> Tapestry.Initializer.loadAddresse = function loadAddresse(jsonObject){
> ...
> }
> loadAddresse(jsonObject);
>
> In browser console:
> loadAddresse is not defined
> and method in loadAddresse can never be called
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Difference-between-renderSupport-addScript-and-JSON-addInit-function-JSON-Object-tp5105620p5713987.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>

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

Reply via email to