are you not missing istemporary() { return true; } in there...that
would be helpful i would imagine...
-igor
On 10/25/07, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> On 10/25/07, Swaroop Belur <[EMAIL PROTECTED]> wrote:
> > Do it like this:
> >
> > In js file
> >
> > function yourconfirmationjsfunction( urltogotoonok , urltogotooncancel) {
> >
> >
> > var retValue = confirm(" Are you sure ");
> > if(retValue == false){
> > window.location.href=urltogotooncancel;
> > }
> >
> > window.location.href=urltogotoonok ;
> > }
>
> You can even do it completely generic, e.g. like this:
>
> private static class AlertMessageContributor extends
> HeaderContributor {
>
> public AlertMessageContributor(final AlertMsg alertMsg) {
> super(new IHeaderContributor() {
>
> private static final long serialVersionUID =
> 1L;
>
> public void renderHead(IHeaderResponse
> response) {
>
> response.renderOnLoadJavascript("alert('"
> +
> alertMsg.getMessage() + "');");
> }
> });
> }
> }
>
>
> ...
>
> Page page = requestCycle.getResponsePage();
> if (page != null) {
> page.add(new AlertMessageContributor(alertMsg));
> }
>
>
> Eelco
>
> ---------------------------------------------------------------------
> 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]