You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Amol Yadwadkar <ay...@webifyservices.com> on 2003/07/10 13:00:59 UTC

Thankx on Body On Load Alerts

Hi Len,

It worked very Fine!!!
Thankx
Best Regds,
Amol
----- Original Message -----
From: "Marilen Corciovei" <le...@nemesisit.rdsnet.ro>
To: "Amol Yadwadkar" <ay...@webifyservices.com>
Cc: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, July 10, 2003 4:08 PM
Subject: Re: Body On Load Alerts !!!!


> ognl:false otherwise tapestry will insert both the showMsg functions and
> call them twice but since they have the same name only the last one will
> be called.
>
> Len
>
>
> On Thu, 2003-07-10 at 12:29, Amol Yadwadkar wrote:
> > Hi Marilen ,
> >
> > I am using the following:-
> >
> >  <span jwcid="@Conditional" condition="false">
> > <span jwcid="@Script" script="/Scripts/First.script"/>
> >  </span>
> >
> >   <span jwcid="@Conditional" condition="false">
> > <span jwcid="@Script" script="/Scripts/Second.script"/>
> >  </span>
> >
> >
> > What i am having is two Script files under Script Folder and two files
have
> > two different Alerts Messages.
> >
> > I know this can be the Crude way of Applying Tapestry...................
> >
> > Now if  I keep both the conditions as "false" (Conditional Component)
still
> > I get the Second Alert message for two times on Page Load.
> >
> > Marilen , Can u pls send me ur Examples in tackling me in the above
Issue.It
> > will be the Most wanted Help from U.
> >
> > Pls Note:--When the Conditions are TRUE / FALSE I am not getting the
> > expected Alerts.
> >
> > Thankx.
> > Best Regds,
> > Amol
> >
> >
> >
> > ----- Original Message -----
> > From: "Amol Yadwadkar" <ay...@webifyservices.com>
> > To: "Tapestry users" <ta...@jakarta.apache.org>
> > Sent: Thursday, July 10, 2003 1:18 PM
> > Subject: Re: Body On Load Alerts !!!!
> >
> >
> > > Hey Marilen ,
> > >
> > > Sorry for the Trouble !!!
> > > It happened properlly with 1.1 Dtd
> > > Thankx a Lot!!!
> > > Amol
> > > ----- Original Message -----
> > > From: "Amol Yadwadkar" <ay...@webifyservices.com>
> > > To: "Tapestry users" <ta...@jakarta.apache.org>
> > > Sent: Thursday, July 10, 2003 1:07 PM
> > > Subject: Re: Body On Load Alerts !!!!
> > >
> > >
> > > > Hi Marilen ,
> > > >
> > > > Ur Solution is defenatelly worth to look at I have tried with ur
> > > > Suggestions.
> > > >
> > > > But I am getting Parsing Exceptions for Parsing the ".script" file
> > > >
> > > > I have used the following (as per ur GuideLines):-
> > > >
> > > > <?xml version="1.0"?>
> > > > <!DOCTYPE script PUBLIC
> > > >  "-//Howard Ship//Tapestry Script 1.1//EN"
> > > >  "http://tapestry.sf.net/dtd/Script_1_1.dtd">
> > > >
> > > > I have then tried with "http://tapestry.sf.net/dtd/Script_1_2.dtd"
but
> > no
> > > > Luck!!!
> > > >
> > > >
> > > > The Exceptions are as follows:-
> > > >
> > > >       org.apache.tapestry.ApplicationRuntimeException
> > > >       Unable to parse script context:/Scripts/First.script.
> > > >
> > > >       org.apache.tapestry.util.xml.DocumentParseException
> > > >       Unable to find resource context:/Scripts/First.script.
> > > >
> > > >
> > > >
> > > >
> > > > Can u suggest me the suitable DTD?
> > > > Thankx
> > > > Best Regds,
> > > > Amol
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Marilen Corciovei" <le...@nemesisit.rdsnet.ro>
> > > > To: "AmolY" <ay...@webifyservices.com>
> > > > Cc: <ta...@jakarta.apache.org>
> > > > Sent: Wednesday, July 09, 2003 9:35 PM
> > > > Subject: Re: Body On Load Alerts !!!!
> > > >
> > > >
> > > > > What you probably need is:
> > > > >
> > > > > case1:
> > > > >
> > > > > <span jwcid="cond">
> > > > > <span jwcid="errorScript"/>
> > > > > </span>
> > > > > <span jwcid="revcond">
> > > > > <span jwcid="okScript"/>
> > > > > </span>
> > > > >
> > > > > or case2:
> > > > >
> > > > > <span jwcid="script"/>
> > > > >
> > > > > and the script takes as parameter a message (error or not)
> > > > >
> > > > > <component id="script" type="Script">
> > > > >     <binding name="msg" expression="msg"/>
> > > > >     <static-binding name="script">/msg.script</static-binding>
> > > > > </component>
> > > > >
> > > > > <?xml version="1.0"?>
> > > > > <!DOCTYPE script PUBLIC
> > > > > "-//Howard Ship//Tapestry Script 1.1//EN"
> > > > > "http://tapestry.sf.net/dtd/Script_1_1.dtd">
> > > > >
> > > > > <script>
> > > > >
> > > > > <body>
> > > > > function showMsg() {
> > > > >     alert(${msg});
> > > > > }
> > > > > </body>
> > > > >
> > > > > <initialization>
> > > > >     showMsg();
> > > > > </initialization>
> > > > >
> > > > > </script>
> > > > >
> > > > >
> > ________________________________________________________________________
> > > > >
> > > > > Hope it helps,
> > > > > Len
> > > > >
> > > > >
> > > > > On Wed, 2003-07-09 at 14:17, AmolY wrote:
> > > > > > Hi All,
> > > > > >
> > > > > > The following is the code in Velecity Macros (Struts/Velocity)
for
> > > > displaying different Alerts on Body Load on response to the variable
> > > > ("$status" whether true/false)
> > > > > >
> > > > > > # if ($status=="false")
> > > > > >     <body onLoad="javascript:alert('Error')">
> > > > > > # else
> > > > > >     <body onLoad="javascript:alert('No Error')">
> > > > > > #end
> > > > > >
> > > > > > Similar is required to be implemented with Tapestry.
> > > > > >
> > > > > > I have tried with "Conditional" Component but was unsuccessful
to
> > > > receive the  expected results.
> > > > > >
> > > > > > Can any anyone throw light on this?
> > > > > > It will be a great help!!!!!
> > > > > >
> > > > > >
> > > > > > Thankx
> > > > > > Best Regds,
> > > > > > Amol
> > > > > --
> > > > > Marilen Corciovei <le...@nemesisit.rdsnet.ro>
> > > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
tapestry-user-help@jakarta.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> --
> Marilen Corciovei <le...@nemesisit.rdsnet.ro>
>


Re: Thankx on Body On Load Alerts

Posted by Marilen Corciovei <le...@nemesisit.rdsnet.ro>.
I told you before that you can use script parameters (there is an
example in the documentation).

Having the following 

<component id="script" type="Script">
    <binding name="msg" expression="msg"/>
    <static-binding name="script">/msg.script</static-binding>
</component>

the ${msg} from the .script file will be replaced with the result of the
getMsg() function. That way you will neee no more the conditional or the
2 scripts.

Len

On Thu, 2003-07-10 at 14:26, Amol Yadwadkar wrote:
> Hi Len,
> @Moment I am using two different Script Files for generating different
> Alerts on different Conditions (on Basis of Conditional Component).
> Can u Pls suggest me .......How can I replace two Script files By One Script
> file ?
> 
> Thankx Once Again!!!
> Best Regds,
> Amol
> 
> ----- Original Message -----
> From: "Amol Yadwadkar" <ay...@webifyservices.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Thursday, July 10, 2003 4:30 PM
> Subject: Thankx on Body On Load Alerts
> 
> 
> > Hi Len,
> >
> > It worked very Fine!!!
> > Thankx
> > Best Regds,
> > Amol
> > ----- Original Message -----
> > From: "Marilen Corciovei" <le...@nemesisit.rdsnet.ro>
> > To: "Amol Yadwadkar" <ay...@webifyservices.com>
> > Cc: "Tapestry users" <ta...@jakarta.apache.org>
> > Sent: Thursday, July 10, 2003 4:08 PM
> > Subject: Re: Body On Load Alerts !!!!
> >
> >
> > > ognl:false otherwise tapestry will insert both the showMsg functions and
> > > call them twice but since they have the same name only the last one will
> > > be called.
> > >
> > > Len
> > >
> > >
> > > On Thu, 2003-07-10 at 12:29, Amol Yadwadkar wrote:
> > > > Hi Marilen ,
> > > >
> > > > I am using the following:-
> > > >
> > > >  <span jwcid="@Conditional" condition="false">
> > > > <span jwcid="@Script" script="/Scripts/First.script"/>
> > > >  </span>
> > > >
> > > >   <span jwcid="@Conditional" condition="false">
> > > > <span jwcid="@Script" script="/Scripts/Second.script"/>
> > > >  </span>
> > > >
> > > >
> > > > What i am having is two Script files under Script Folder and two files
> > have
> > > > two different Alerts Messages.
> > > >
> > > > I know this can be the Crude way of Applying
> Tapestry...................
> > > >
> > > > Now if  I keep both the conditions as "false" (Conditional Component)
> > still
> > > > I get the Second Alert message for two times on Page Load.
> > > >
> > > > Marilen , Can u pls send me ur Examples in tackling me in the above
> > Issue.It
> > > > will be the Most wanted Help from U.
> > > >
> > > > Pls Note:--When the Conditions are TRUE / FALSE I am not getting the
> > > > expected Alerts.
> > > >
> > > > Thankx.
> > > > Best Regds,
> > > > Amol
> > > >
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Amol Yadwadkar" <ay...@webifyservices.com>
> > > > To: "Tapestry users" <ta...@jakarta.apache.org>
> > > > Sent: Thursday, July 10, 2003 1:18 PM
> > > > Subject: Re: Body On Load Alerts !!!!
> > > >
> > > >
> > > > > Hey Marilen ,
> > > > >
> > > > > Sorry for the Trouble !!!
> > > > > It happened properlly with 1.1 Dtd
> > > > > Thankx a Lot!!!
> > > > > Amol
> > > > > ----- Original Message -----
> > > > > From: "Amol Yadwadkar" <ay...@webifyservices.com>
> > > > > To: "Tapestry users" <ta...@jakarta.apache.org>
> > > > > Sent: Thursday, July 10, 2003 1:07 PM
> > > > > Subject: Re: Body On Load Alerts !!!!
> > > > >
> > > > >
> > > > > > Hi Marilen ,
> > > > > >
> > > > > > Ur Solution is defenatelly worth to look at I have tried with ur
> > > > > > Suggestions.
> > > > > >
> > > > > > But I am getting Parsing Exceptions for Parsing the ".script" file
> > > > > >
> > > > > > I have used the following (as per ur GuideLines):-
> > > > > >
> > > > > > <?xml version="1.0"?>
> > > > > > <!DOCTYPE script PUBLIC
> > > > > >  "-//Howard Ship//Tapestry Script 1.1//EN"
> > > > > >  "http://tapestry.sf.net/dtd/Script_1_1.dtd">
> > > > > >
> > > > > > I have then tried with "http://tapestry.sf.net/dtd/Script_1_2.dtd"
> > but
> > > > no
> > > > > > Luck!!!
> > > > > >
> > > > > >
> > > > > > The Exceptions are as follows:-
> > > > > >
> > > > > >       org.apache.tapestry.ApplicationRuntimeException
> > > > > >       Unable to parse script context:/Scripts/First.script.
> > > > > >
> > > > > >       org.apache.tapestry.util.xml.DocumentParseException
> > > > > >       Unable to find resource context:/Scripts/First.script.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Can u suggest me the suitable DTD?
> > > > > > Thankx
> > > > > > Best Regds,
> > > > > > Amol
> > > > > >
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > From: "Marilen Corciovei" <le...@nemesisit.rdsnet.ro>
> > > > > > To: "AmolY" <ay...@webifyservices.com>
> > > > > > Cc: <ta...@jakarta.apache.org>
> > > > > > Sent: Wednesday, July 09, 2003 9:35 PM
> > > > > > Subject: Re: Body On Load Alerts !!!!
> > > > > >
> > > > > >
> > > > > > > What you probably need is:
> > > > > > >
> > > > > > > case1:
> > > > > > >
> > > > > > > <span jwcid="cond">
> > > > > > > <span jwcid="errorScript"/>
> > > > > > > </span>
> > > > > > > <span jwcid="revcond">
> > > > > > > <span jwcid="okScript"/>
> > > > > > > </span>
> > > > > > >
> > > > > > > or case2:
> > > > > > >
> > > > > > > <span jwcid="script"/>
> > > > > > >
> > > > > > > and the script takes as parameter a message (error or not)
> > > > > > >
> > > > > > > <component id="script" type="Script">
> > > > > > >     <binding name="msg" expression="msg"/>
> > > > > > >     <static-binding name="script">/msg.script</static-binding>
> > > > > > > </component>
> > > > > > >
> > > > > > > <?xml version="1.0"?>
> > > > > > > <!DOCTYPE script PUBLIC
> > > > > > > "-//Howard Ship//Tapestry Script 1.1//EN"
> > > > > > > "http://tapestry.sf.net/dtd/Script_1_1.dtd">
> > > > > > >
> > > > > > > <script>
> > > > > > >
> > > > > > > <body>
> > > > > > > function showMsg() {
> > > > > > >     alert(${msg});
> > > > > > > }
> > > > > > > </body>
> > > > > > >
> > > > > > > <initialization>
> > > > > > >     showMsg();
> > > > > > > </initialization>
> > > > > > >
> > > > > > > </script>
> > > > > > >
> > > > > > >
> > > >
> ________________________________________________________________________
> > > > > > >
> > > > > > > Hope it helps,
> > > > > > > Len
> > > > > > >
> > > > > > >
> > > > > > > On Wed, 2003-07-09 at 14:17, AmolY wrote:
> > > > > > > > Hi All,
> > > > > > > >
> > > > > > > > The following is the code in Velecity Macros (Struts/Velocity)
> > for
> > > > > > displaying different Alerts on Body Load on response to the
> variable
> > > > > > ("$status" whether true/false)
> > > > > > > >
> > > > > > > > # if ($status=="false")
> > > > > > > >     <body onLoad="javascript:alert('Error')">
> > > > > > > > # else
> > > > > > > >     <body onLoad="javascript:alert('No Error')">
> > > > > > > > #end
> > > > > > > >
> > > > > > > > Similar is required to be implemented with Tapestry.
> > > > > > > >
> > > > > > > > I have tried with "Conditional" Component but was unsuccessful
> > to
> > > > > > receive the  expected results.
> > > > > > > >
> > > > > > > > Can any anyone throw light on this?
> > > > > > > > It will be a great help!!!!!
> > > > > > > >
> > > > > > > >
> > > > > > > > Thankx
> > > > > > > > Best Regds,
> > > > > > > > Amol
> > > > > > > --
> > > > > > > Marilen Corciovei <le...@nemesisit.rdsnet.ro>
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail:
> > tapestry-user-help@jakarta.apache.org
> > > > > >
> > > > >
> > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > > --
> > > Marilen Corciovei <le...@nemesisit.rdsnet.ro>
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
-- 
Marilen Corciovei <le...@nemesisit.rdsnet.ro>


RE: Thankx on Body On Load Alerts

Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
You can pass parameters into the script (informal parameters to the Script component become symbols
in the script specification).

You can use <if> and other script specification elements.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: Amol Yadwadkar [mailto:ayadwadkar@webifyservices.com] 
> Sent: Thursday, July 10, 2003 7:27 AM
> To: Tapestry users
> Subject: Thankx on Body On Load Alerts
> 
> 
> 
> Hi Len,
> @Moment I am using two different Script Files for generating 
> different Alerts on different Conditions (on Basis of 
> Conditional Component). Can u Pls suggest me .......How can I 
> replace two Script files By One Script file ?
> 
> Thankx Once Again!!!
> Best Regds,
> Amol
> 
> ----- Original Message -----
> From: "Amol Yadwadkar" <ay...@webifyservices.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Thursday, July 10, 2003 4:30 PM
> Subject: Thankx on Body On Load Alerts
> 
> 
> > Hi Len,
> >
> > It worked very Fine!!!
> > Thankx
> > Best Regds,
> > Amol
> > ----- Original Message -----
> > From: "Marilen Corciovei" <le...@nemesisit.rdsnet.ro>
> > To: "Amol Yadwadkar" <ay...@webifyservices.com>
> > Cc: "Tapestry users" <ta...@jakarta.apache.org>
> > Sent: Thursday, July 10, 2003 4:08 PM
> > Subject: Re: Body On Load Alerts !!!!
> >
> >
> > > ognl:false otherwise tapestry will insert both the 
> showMsg functions 
> > > and call them twice but since they have the same name 
> only the last 
> > > one will be called.
> > >
> > > Len
> > >
> > >
> > > On Thu, 2003-07-10 at 12:29, Amol Yadwadkar wrote:
> > > > Hi Marilen ,
> > > >
> > > > I am using the following:-
> > > >
> > > >  <span jwcid="@Conditional" condition="false">
> > > > <span jwcid="@Script" script="/Scripts/First.script"/>  </span>
> > > >
> > > >   <span jwcid="@Conditional" condition="false">
> > > > <span jwcid="@Script" script="/Scripts/Second.script"/>  </span>
> > > >
> > > >
> > > > What i am having is two Script files under Script 
> Folder and two files
> > have
> > > > two different Alerts Messages.
> > > >
> > > > I know this can be the Crude way of Applying
> Tapestry...................
> > > >
> > > > Now if  I keep both the conditions as "false" 
> (Conditional Component)
> > still
> > > > I get the Second Alert message for two times on Page Load.
> > > >
> > > > Marilen , Can u pls send me ur Examples in tackling me 
> in the above
> > Issue.It
> > > > will be the Most wanted Help from U.
> > > >
> > > > Pls Note:--When the Conditions are TRUE / FALSE I am 
> not getting the
> > > > expected Alerts.
> > > >
> > > > Thankx.
> > > > Best Regds,
> > > > Amol
> > > >
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Amol Yadwadkar" <ay...@webifyservices.com>
> > > > To: "Tapestry users" <ta...@jakarta.apache.org>
> > > > Sent: Thursday, July 10, 2003 1:18 PM
> > > > Subject: Re: Body On Load Alerts !!!!
> > > >
> > > >
> > > > > Hey Marilen ,
> > > > >
> > > > > Sorry for the Trouble !!!
> > > > > It happened properlly with 1.1 Dtd
> > > > > Thankx a Lot!!!
> > > > > Amol
> > > > > ----- Original Message -----
> > > > > From: "Amol Yadwadkar" <ay...@webifyservices.com>
> > > > > To: "Tapestry users" <ta...@jakarta.apache.org>
> > > > > Sent: Thursday, July 10, 2003 1:07 PM
> > > > > Subject: Re: Body On Load Alerts !!!!
> > > > >
> > > > >
> > > > > > Hi Marilen ,
> > > > > >
> > > > > > Ur Solution is defenatelly worth to look at I have 
> tried with ur
> > > > > > Suggestions.
> > > > > >
> > > > > > But I am getting Parsing Exceptions for Parsing the 
> ".script" file
> > > > > >
> > > > > > I have used the following (as per ur GuideLines):-
> > > > > >
> > > > > > <?xml version="1.0"?>
> > > > > > <!DOCTYPE script PUBLIC
> > > > > >  "-//Howard Ship//Tapestry Script 1.1//EN"
> > > > > >  "http://tapestry.sf.net/dtd/Script_1_1.dtd">
> > > > > >
> > > > > > I have then tried with 
> "http://tapestry.sf.net/dtd/Script_1_2.dtd"
> > but
> > > > no
> > > > > > Luck!!!
> > > > > >
> > > > > >
> > > > > > The Exceptions are as follows:-
> > > > > >
> > > > > >       org.apache.tapestry.ApplicationRuntimeException
> > > > > >       Unable to parse script context:/Scripts/First.script.
> > > > > >
> > > > > >       org.apache.tapestry.util.xml.DocumentParseException
> > > > > >       Unable to find resource context:/Scripts/First.script.
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > Can u suggest me the suitable DTD?
> > > > > > Thankx
> > > > > > Best Regds,
> > > > > > Amol
> > > > > >
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > From: "Marilen Corciovei" <le...@nemesisit.rdsnet.ro>
> > > > > > To: "AmolY" <ay...@webifyservices.com>
> > > > > > Cc: <ta...@jakarta.apache.org>
> > > > > > Sent: Wednesday, July 09, 2003 9:35 PM
> > > > > > Subject: Re: Body On Load Alerts !!!!
> > > > > >
> > > > > >
> > > > > > > What you probably need is:
> > > > > > >
> > > > > > > case1:
> > > > > > >
> > > > > > > <span jwcid="cond">
> > > > > > > <span jwcid="errorScript"/>
> > > > > > > </span>
> > > > > > > <span jwcid="revcond">
> > > > > > > <span jwcid="okScript"/>
> > > > > > > </span>
> > > > > > >
> > > > > > > or case2:
> > > > > > >
> > > > > > > <span jwcid="script"/>
> > > > > > >
> > > > > > > and the script takes as parameter a message (error or not)
> > > > > > >
> > > > > > > <component id="script" type="Script">
> > > > > > >     <binding name="msg" expression="msg"/>
> > > > > > >     <static-binding 
> name="script">/msg.script</static-binding>
> > > > > > > </component>
> > > > > > >
> > > > > > > <?xml version="1.0"?>
> > > > > > > <!DOCTYPE script PUBLIC
> > > > > > > "-//Howard Ship//Tapestry Script 1.1//EN"
> > > > > > > "http://tapestry.sf.net/dtd/Script_1_1.dtd">
> > > > > > >
> > > > > > > <script>
> > > > > > >
> > > > > > > <body>
> > > > > > > function showMsg() {
> > > > > > >     alert(${msg});
> > > > > > > }
> > > > > > > </body>
> > > > > > >
> > > > > > > <initialization>
> > > > > > >     showMsg();
> > > > > > > </initialization>
> > > > > > >
> > > > > > > </script>
> > > > > > >
> > > > > > >
> > > >
> ______________________________________________________________
> __________
> > > > > > >
> > > > > > > Hope it helps,
> > > > > > > Len
> > > > > > >
> > > > > > >
> > > > > > > On Wed, 2003-07-09 at 14:17, AmolY wrote:
> > > > > > > > Hi All,
> > > > > > > >
> > > > > > > > The following is the code in Velecity Macros 
> (Struts/Velocity)
> > for
> > > > > > displaying different Alerts on Body Load on response to the
> variable
> > > > > > ("$status" whether true/false)
> > > > > > > >
> > > > > > > > # if ($status=="false")
> > > > > > > >     <body onLoad="javascript:alert('Error')">
> > > > > > > > # else
> > > > > > > >     <body onLoad="javascript:alert('No Error')">
> > > > > > > > #end
> > > > > > > >
> > > > > > > > Similar is required to be implemented with Tapestry.
> > > > > > > >
> > > > > > > > I have tried with "Conditional" Component but 
> was unsuccessful
> > to
> > > > > > receive the  expected results.
> > > > > > > >
> > > > > > > > Can any anyone throw light on this?
> > > > > > > > It will be a great help!!!!!
> > > > > > > >
> > > > > > > >
> > > > > > > > Thankx
> > > > > > > > Best Regds,
> > > > > > > > Amol
> > > > > > > --
> > > > > > > Marilen Corciovei <le...@nemesisit.rdsnet.ro>
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > 
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail:
> > tapestry-user-help@jakarta.apache.org
> > > > > >
> > > > >
> > > > >
> > > >
> > 
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: 
> tapestry-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> > > > >
> > > >
> > > >
> > > > 
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: 
> tapestry-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: 
> tapestry-user-help@jakarta.apache.org
> > > --
> > > Marilen Corciovei <le...@nemesisit.rdsnet.ro>
> > >
> >
> >
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: 
> tapestry-user-help@jakarta.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 


Thankx on Body On Load Alerts

Posted by Amol Yadwadkar <ay...@webifyservices.com>.
Hi Len,
@Moment I am using two different Script Files for generating different
Alerts on different Conditions (on Basis of Conditional Component).
Can u Pls suggest me .......How can I replace two Script files By One Script
file ?

Thankx Once Again!!!
Best Regds,
Amol

----- Original Message -----
From: "Amol Yadwadkar" <ay...@webifyservices.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Thursday, July 10, 2003 4:30 PM
Subject: Thankx on Body On Load Alerts


> Hi Len,
>
> It worked very Fine!!!
> Thankx
> Best Regds,
> Amol
> ----- Original Message -----
> From: "Marilen Corciovei" <le...@nemesisit.rdsnet.ro>
> To: "Amol Yadwadkar" <ay...@webifyservices.com>
> Cc: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Thursday, July 10, 2003 4:08 PM
> Subject: Re: Body On Load Alerts !!!!
>
>
> > ognl:false otherwise tapestry will insert both the showMsg functions and
> > call them twice but since they have the same name only the last one will
> > be called.
> >
> > Len
> >
> >
> > On Thu, 2003-07-10 at 12:29, Amol Yadwadkar wrote:
> > > Hi Marilen ,
> > >
> > > I am using the following:-
> > >
> > >  <span jwcid="@Conditional" condition="false">
> > > <span jwcid="@Script" script="/Scripts/First.script"/>
> > >  </span>
> > >
> > >   <span jwcid="@Conditional" condition="false">
> > > <span jwcid="@Script" script="/Scripts/Second.script"/>
> > >  </span>
> > >
> > >
> > > What i am having is two Script files under Script Folder and two files
> have
> > > two different Alerts Messages.
> > >
> > > I know this can be the Crude way of Applying
Tapestry...................
> > >
> > > Now if  I keep both the conditions as "false" (Conditional Component)
> still
> > > I get the Second Alert message for two times on Page Load.
> > >
> > > Marilen , Can u pls send me ur Examples in tackling me in the above
> Issue.It
> > > will be the Most wanted Help from U.
> > >
> > > Pls Note:--When the Conditions are TRUE / FALSE I am not getting the
> > > expected Alerts.
> > >
> > > Thankx.
> > > Best Regds,
> > > Amol
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "Amol Yadwadkar" <ay...@webifyservices.com>
> > > To: "Tapestry users" <ta...@jakarta.apache.org>
> > > Sent: Thursday, July 10, 2003 1:18 PM
> > > Subject: Re: Body On Load Alerts !!!!
> > >
> > >
> > > > Hey Marilen ,
> > > >
> > > > Sorry for the Trouble !!!
> > > > It happened properlly with 1.1 Dtd
> > > > Thankx a Lot!!!
> > > > Amol
> > > > ----- Original Message -----
> > > > From: "Amol Yadwadkar" <ay...@webifyservices.com>
> > > > To: "Tapestry users" <ta...@jakarta.apache.org>
> > > > Sent: Thursday, July 10, 2003 1:07 PM
> > > > Subject: Re: Body On Load Alerts !!!!
> > > >
> > > >
> > > > > Hi Marilen ,
> > > > >
> > > > > Ur Solution is defenatelly worth to look at I have tried with ur
> > > > > Suggestions.
> > > > >
> > > > > But I am getting Parsing Exceptions for Parsing the ".script" file
> > > > >
> > > > > I have used the following (as per ur GuideLines):-
> > > > >
> > > > > <?xml version="1.0"?>
> > > > > <!DOCTYPE script PUBLIC
> > > > >  "-//Howard Ship//Tapestry Script 1.1//EN"
> > > > >  "http://tapestry.sf.net/dtd/Script_1_1.dtd">
> > > > >
> > > > > I have then tried with "http://tapestry.sf.net/dtd/Script_1_2.dtd"
> but
> > > no
> > > > > Luck!!!
> > > > >
> > > > >
> > > > > The Exceptions are as follows:-
> > > > >
> > > > >       org.apache.tapestry.ApplicationRuntimeException
> > > > >       Unable to parse script context:/Scripts/First.script.
> > > > >
> > > > >       org.apache.tapestry.util.xml.DocumentParseException
> > > > >       Unable to find resource context:/Scripts/First.script.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > Can u suggest me the suitable DTD?
> > > > > Thankx
> > > > > Best Regds,
> > > > > Amol
> > > > >
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Marilen Corciovei" <le...@nemesisit.rdsnet.ro>
> > > > > To: "AmolY" <ay...@webifyservices.com>
> > > > > Cc: <ta...@jakarta.apache.org>
> > > > > Sent: Wednesday, July 09, 2003 9:35 PM
> > > > > Subject: Re: Body On Load Alerts !!!!
> > > > >
> > > > >
> > > > > > What you probably need is:
> > > > > >
> > > > > > case1:
> > > > > >
> > > > > > <span jwcid="cond">
> > > > > > <span jwcid="errorScript"/>
> > > > > > </span>
> > > > > > <span jwcid="revcond">
> > > > > > <span jwcid="okScript"/>
> > > > > > </span>
> > > > > >
> > > > > > or case2:
> > > > > >
> > > > > > <span jwcid="script"/>
> > > > > >
> > > > > > and the script takes as parameter a message (error or not)
> > > > > >
> > > > > > <component id="script" type="Script">
> > > > > >     <binding name="msg" expression="msg"/>
> > > > > >     <static-binding name="script">/msg.script</static-binding>
> > > > > > </component>
> > > > > >
> > > > > > <?xml version="1.0"?>
> > > > > > <!DOCTYPE script PUBLIC
> > > > > > "-//Howard Ship//Tapestry Script 1.1//EN"
> > > > > > "http://tapestry.sf.net/dtd/Script_1_1.dtd">
> > > > > >
> > > > > > <script>
> > > > > >
> > > > > > <body>
> > > > > > function showMsg() {
> > > > > >     alert(${msg});
> > > > > > }
> > > > > > </body>
> > > > > >
> > > > > > <initialization>
> > > > > >     showMsg();
> > > > > > </initialization>
> > > > > >
> > > > > > </script>
> > > > > >
> > > > > >
> > >
________________________________________________________________________
> > > > > >
> > > > > > Hope it helps,
> > > > > > Len
> > > > > >
> > > > > >
> > > > > > On Wed, 2003-07-09 at 14:17, AmolY wrote:
> > > > > > > Hi All,
> > > > > > >
> > > > > > > The following is the code in Velecity Macros (Struts/Velocity)
> for
> > > > > displaying different Alerts on Body Load on response to the
variable
> > > > > ("$status" whether true/false)
> > > > > > >
> > > > > > > # if ($status=="false")
> > > > > > >     <body onLoad="javascript:alert('Error')">
> > > > > > > # else
> > > > > > >     <body onLoad="javascript:alert('No Error')">
> > > > > > > #end
> > > > > > >
> > > > > > > Similar is required to be implemented with Tapestry.
> > > > > > >
> > > > > > > I have tried with "Conditional" Component but was unsuccessful
> to
> > > > > receive the  expected results.
> > > > > > >
> > > > > > > Can any anyone throw light on this?
> > > > > > > It will be a great help!!!!!
> > > > > > >
> > > > > > >
> > > > > > > Thankx
> > > > > > > Best Regds,
> > > > > > > Amol
> > > > > > --
> > > > > > Marilen Corciovei <le...@nemesisit.rdsnet.ro>
> > > > > >
> > > > >
> > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
tapestry-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> > > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
tapestry-user-help@jakarta.apache.org
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> > --
> > Marilen Corciovei <le...@nemesisit.rdsnet.ro>
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>