whoops,

usually i declare my components in the page class, but in this project i
wanted to write less code. I've checked the docs about expansions and
this topic is now clear to me, thank you Thiago for your answer and your
hint.

You was right, i don't get this error anymore, but it still don't work
properly:

.tml:
<t:jquery.jgrowl params="jgrowlparams" />

.java:
    public JSONObject getJgrowlParams()
    {
        JSONObject retour = new JSONObject();
        retour.put("position", "center");
        retour.put("header", "Error");
        retour.put("beforeClose", "function(e,m) {alert('About to close
this notification!');}");
        return retour;
    }

The alert does not appear when closing the message, but position and
header are working.

What am i doing wrong?

On https://github.com/stanlemon/jGrowl
he has no quotes in his json:

$.jGrowl("A message with a beforeOpen callback and a different opening
animation.", {
    beforeClose: function(e,m) {
        alert('About to close this notification!');
    },
    animateOpen: {
        height: 'show'
    }
});

but in my rendered output, i have the quotes:

"jGrowlAlertManager" : [
{
"dismissURL" : "/index.layout.jgrowl:dismiss",
"jgrowl" : {
"position" : "center",
"beforeClose" : "function(e,m) {alert('About to close this
notification!');}",
"header" : "Error"
}}]

Any suggestions are welcome.


Kind regards
David


Am 25.06.2013 23:19, schrieb Thiago H de Paula Figueiredo:
> On Tue, 25 Jun 2013 16:19:50 -0300, D.R. <d.re...@googlemail.com> wrote:
>
>> Hi @all,
>
> Hi!
>
>> i want to use jgrowl for the alertmanager, in my .tml i have:
>> <t:jquery.jgrowl params="${jgrowlparams}" />
>
> Never, never, NEVER ever use expansions when passing values to
> parameters. Try <t:jquery.jgrowl params="jgrowlparams" /> (without the
> ${}) and the problem will probably go away.
>


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

Reply via email to