I ‘m learning tapestry5 just beginning. Now I'm doing a example about
deleting some records.So  I have searched some tutorial.But I can't
understand all those tutorial. Now I click the SUBMIT button. It doesn't
popup the confirm delete dialog box. (I'm doing the example reference
tutorial).So, I don't know the reason that  It doesn't popup the confirm
box.
HELP ME PLEASE. THANKS VERY MUCH!

2012/6/7 Howard Lewis Ship [via Tapestry] <
ml-node+s1045711n5713672...@n5.nabble.com>

> What have you done so far to diagnose this problem?
>
> For example, if I were dealing with this (I often do) I start by
> checking that the page, and the JavaScript, rendered as I expected.
>
> I'd then check the browser console for errors.
>
> I'd also set breakpoints in my JS code to see if and when it is executed.
>
> When debugging, you always want to go from a position of certainty to
> another position of certainty. This requires you to gather facts as
> you go.
>
> On Tue, Jun 5, 2012 at 11:54 PM, yeehuqiu <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=5713672&i=0>>
> wrote:
>
> > with tapestry5.3. I have some codes
> > eg:
> > package com.ailk.mapp.tapestry.app.mixins;
> >
> > import org.apache.tapestry5.BindingConstants;
> > import org.apache.tapestry5.ClientElement;
> > import org.apache.tapestry5.annotations.AfterRender;
> > import org.apache.tapestry5.annotations.Import;
> > import org.apache.tapestry5.annotations.InjectContainer;
> > import org.apache.tapestry5.annotations.Parameter;
> > import org.apache.tapestry5.ioc.annotations.Inject;
> > import org.apache.tapestry5.services.javascript.JavaScriptSupport;
> >
> > @Import (library="confirm.js")
> > public class Confirm {
> >
> >        @Parameter(value = "Are you sure?", defaultPrefix =
> > BindingConstants.LITERAL)
> >        private String message;
> >        @Inject
> >        private JavaScriptSupport javaScriptSupport;
> >        @InjectContainer
> >        private ClientElement element;
> >        @AfterRender
> >        public void afterRender() {
> >
> >                System.out.println("--------confirm----------");
> >        javaScriptSupport.addScript("new Confirm('%s', '%s');",
> > element.getClientId(), message);
> >        }
> > }
> >
> > Confirm.java 's path is
> > /mapp/src/main/java/com/ailk/mapp/tapestry/app/mixins/Confirm.java
> > and confirm.js's code
> >
> > var Confirm = Class.create();
> > Confirm.prototype = {
> >        initialize: function(element, message) {
> >
> >                        alert("=====confirm====js====")
> >                this.message = message;
> >                Event.observe($(element), 'click',
> > this.doConfirm.bindAsEventListener(this));
> >        },
> >
> >        doConfirm: function(e) {
> >                if(! confirm(this.message))
> >                        e.stop();
> >        }
> > }
> >
> > confirm.js 's path is
> > /mapp/src/main/*resources*/com/ailk/mapp/tapestry/app/mixins/confirm.js
> >
> > when I user them in my page .but it doesn't work .
> > <input t:type="submit" value="delete" t:mixins="confirm" t:message="Are
> you
> > sure you want to delete this item?"   />.
> > where is my problem. why it doesn't work?
> > thanks in advance!
> >
> >
> > --
> > View this message in context:
> http://tapestry.1045711.n5.nabble.com/a-problem-about-tapestry5-s-minxins-tp5713655.html
> > Sent from the Tapestry - User mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=5713672&i=1>
> > For additional commands, e-mail: [hidden 
> > email]<http://user/SendEmail.jtp?type=node&node=5713672&i=2>
> >
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator of Apache Tapestry
>
> The source for Tapestry training, mentoring and support. Contact me to
> learn how I can get you up and productive in Tapestry fast!
>
> (971) 678-5210
> http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden 
> email]<http://user/SendEmail.jtp?type=node&node=5713672&i=3>
> For additional commands, e-mail: [hidden 
> email]<http://user/SendEmail.jtp?type=node&node=5713672&i=4>
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://tapestry.1045711.n5.nabble.com/a-problem-about-tapestry5-s-minxins-tp5713655p5713672.html
>  To unsubscribe from a problem about tapestry5's minxins, click 
> here<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5713655&code=eWVlaHVxaXVAZ21haWwuY29tfDU3MTM2NTV8LTE3NDYyMDg3NDg=>
> .
> NAML<http://tapestry.1045711.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>



-- 

thanks and regards!

=====================

MSN: yeehu...@gmail.com

=====================


--
View this message in context: 
http://tapestry.1045711.n5.nabble.com/a-problem-about-tapestry5-s-minxins-tp5713655p5713687.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

Reply via email to