I tried another way to set confirm/alert/error messages
        - in my layout/default.vm, I have a macro #actionMessage()
                <td align="left" valign="top">
                #actionMessage()
                $screen_placeholder
                </td>
        - The macro #actionMessage() uses a request pull tool to check
confirm/alert/error message set within action
#macro (actionMessage) 
        #if($myReqTool.ConfirmMessage)
                <p
class="confirmmsg"><strong>$myReqTool.ConfirmMessage</strong></p>  
        #end
 
        #if($myReqTool.AlertMessage)
                 <p class="alertmsg"><strong>$myReqTool</strong></p>  
        #end
#end

This is basically the way how turbine-3/scarab deals with
confirm/alert/error messasges (if I am correct),

But for reasons I don't know, the confirm/alert message is persistent to
different pages and won't go away.
Can somebody points out what I am missing? or share your way?

Thanks

richard


        
On Fri, 2004-05-21 at 11:58, Louis Moore wrote:
> There's probably a ton of different ways to do this,
> but I've been setting session parameters in my java
> classes, something like:
> 
> if (!inputOK)
> {
>  // alert
>  data.getUser().setTemp("warningmsg","Bad input!");
>  return;
> }
> 
> try
> {
>  // success
>  data.getUser().setTemp("successmsg","Successful");
> }
> catch
> {
>  // failure
>  data.getUser().setTemp("errormsg","Failed");
> }
> 
> Then I have a template Message.vm which checks for
> those parameters and prints the messages if they are
> there, then removes the parameters. This template is
> parsed inside my Default.vm layout so it's on every
> page. I'd also be interested in hearing how other
> people are doing this.
> 
> -Lou
> 
> 
> --- Pradeep Kumar <[EMAIL PROTECTED]> wrote:
> > Hi Richard,
> > 
> > You can use javascript for this. On vm page for the
> > click of any button
> > you can write a java script function which can be
> > used to set
> > comfirm/alert/error message .
> > If you have tried some otherway let us know.
> > Thanks,
> > Pradeep
> > 
> > >>> [EMAIL PROTECTED] 5/21/2004 8:44:44 AM >>>
> > Hi everyone,
> > 
> > In turbine-2.3, how do you set comfirm/alert/error
> > message ?
> > 
> > Thank you in advance!
> > 
> > richard
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED] 
> > For additional commands, e-mail:
> > [EMAIL PROTECTED] 
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > [EMAIL PROTECTED]
> > For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > 
> 
> 
> 
>       
>               
> __________________________________
> Do you Yahoo!?
> Yahoo! Domains  Claim yours for only $14.70/year
> http://smallbusiness.promotions.yahoo.com/offer
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to