You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by Balasubramaniam Rajagopal <ra...@gmail.com> on 2008/03/11 00:41:22 UTC

Problem in Executing Popup Sample

Hello group,

I was trying to execute a Popup sample with NetUI tags based on the example
given in the documentation. After submitting the form from the pop up window
the the control comes back to the main flow as expected. But the pop up
window is not closed  and hence the  control doesn't come back to original
page that created the popup. It seems that the 'return new Forward("_auto")
has not effect. I feel that I am definitely missing something  but could not
figure that out. Expecting some help from the experts..

JSP Code used to create the Pop up window.

<netui:button type="submit" value="Go to the Color Picker"
                        action="getColor" popup="true">

                        <netui:configurePopup
                            location="false"
                            width="170" height="150">
                            <netui:retrievePopupOutput dataSource="
outputFormBean.color"
                                tagIdRef="colorField" />
                        </netui:configurePopup>
 </netui:button>

The following is the (Significant)code for MainController

    @Jpf.Action()
    public Forward getColorSuccess(GetColorController.ColorForm colorForm) {

        System.out.println(" Inside getColorSuccess method
"+colorForm.getColor());

        return new Forward("_auto");

    }

    @Jpf.Action(forwards = { @Jpf.Forward(name = "success", path = "show.jsp")
}, validationErrorForward = @Jpf.Forward(name = "failure", navigateTo =
Jpf.NavigateTo.currentPage))
    public Forward submit(SubmitForm form) {
        Forward forward = new Forward("success");
        forward.addActionOutput("form", form);
        return forward;
    }

    @Jpf.FormBean()
    public static class SubmitForm implements Serializable {

        private String _name;

        private String _color;

        public String getName() {
            return _name;
        }

        public void setName(String value) {
            _name = value;
        }

        public String getColor() {
            return _color;
        }

        public void setColor(String color) {
            _color = color;
        }
    }

And the following is the code for the Nested Controller

 @Jpf.Action(
        useFormBean = "_returnFormBean",
        forwards = {
        @Jpf.Forward(
            name = "confirm",
            path = "confirm.jsp",
            actionOutputs = {
            @Jpf.ActionOutput(name = "chosenColor", type = String.class,
required = true)
                }
        )
            }
    )
    public Forward submitColor(ColorForm form) {
        Forward fwd = new Forward("confirm");
        fwd.addActionOutput("chosenColor", form.getColor());
        return fwd;
    }

    @Jpf.Action(
        forwards = {
        @Jpf.Forward(name = "success", returnAction = "getColorSuccess",
outputFormBeanType = ColorForm.class)
            }
    )
    public Forward done(ColorForm form) {
        System.out.println(" Inside Action Done ");
        return new Forward("success", _returnFormBean);
    }

    public static class ColorForm
        implements Serializable {
        private String _color;

        public String getColor() {
            return _color;
        }

        public void setColor(String value) {
            _color = value;
        }
    }

Your help is sincerely appreciated in this regard.

Thanks.

Re: Problem in Executing Popup Sample

Posted by Carlin Rogers <ca...@gmail.com>.
There are some automated tests that include a test very similar to the
sample. I was also able to get the sample running. What version of
WebLogic are you using and is the sample running in a portal
environment? When you view the source of the parent page, do you see
the following parameter in the request query for the button to the
popup?
_netui%3AreturnActionViewRenderer=org.apache.beehive.netui.tags.internal.ReturnActionViewRenderer

Also, do you have a Servlet Filter that is wrapping or modifying an
incoming request? If so, it could impact the way the request
processing works for the sample popup. For example...
- user hits the button to launch the nested popup flow,
  sending a reuqest with the _netui:AreturnActionViewRenderer parameter
  and the class name of the ViewRenderer.
- page flow request processor instantiates an instance of the ViewRenderer
  and stores it in the popup Page Flow Controller.
- user steps through the nested popup flow...
- user hits the final step in the nested popup flow, sending a request
(to action "done")
- page flow request processor gets the instance of the ViewRenderer from
  the popup Page Flow Controller and adds it as an attribute to the request.
- the request is forwarded on to the return action of the parent Page
Flow Controller

If you have a servlet filter that somehow alters the request such that
the ViewRenderer attribute is no longer available, you would then see the
message that "Auto-render forward _auto used, but no ViewRenderer was
registered."

Hope that helps,
Carlin

On Tue, Mar 11, 2008 at 5:06 AM, Balasubramaniam Rajagopal
<ra...@gmail.com> wrote:
> Hi,
>
>  Thanks for the reply.I have used NetUI button with proper tagId, as
>  mentioned. Also I am getting the following error in the weblogic console ( I
>  am using weblogic application server ) .
>
>  *ERROR  error, Auto-render forward _auto used, but no ViewRenderer was
>  registered
>  -- not doing any forward or redirect.
>  *
>  I looked up in the internet for this issue and found that it was a bug in
>  1.0 release and has been fixed in 1.0.1. I am using the latest version of
>  beehive , which is 1.0.2 . I am I using a wrong version of beehive NetUI ?
>  Has anybody able to get the popup sample running ?
>
>  Looking forward for some help.
>  *
>  *
>  On Tue, Mar 11, 2008 at 7:36 AM, Carlin Rogers <ca...@gmail.com>
>  wrote:
>
>
>
>  > Sounds like the framework JavaScript to update the parent page in the
>  > main flow and close the popup does not execute correctly. Does the
>  > color text box field of the parent page get populated when you close
>  > the popup? If not, do you have a NetUI text box with the tagId
>  > attribute set to the same value as the tagIdRef="colorField" attribute
>  > of your configurePopup? From the example, something like the
>  > following.
>  > <netui:textBox dataSource="actionForm.color" tagId="colorField"/>
>  >
>  > Look for any JavaScript errors that your browser detects. They may
>  > give you more detail about the issue.
>  >
>  > Kind regards,
>  > Carlin
>  >
>  > On Mon, Mar 10, 2008 at 4:41 PM, Balasubramaniam Rajagopal
>  > <ra...@gmail.com> wrote:
>  > > Hello group,
>  > >
>  > >  I was trying to execute a Popup sample with NetUI tags based on the
>  > example
>  > >  given in the documentation. After submitting the form from the pop up
>  > window
>  > >  the the control comes back to the main flow as expected. But the pop up
>  > >  window is not closed  and hence the  control doesn't come back to
>  > original
>  > >  page that created the popup. It seems that the 'return new
>  > Forward("_auto")
>  > >  has not effect. I feel that I am definitely missing something  but
>  > could not
>  > >  figure that out. Expecting some help from the experts..
>  > >
>  > >  JSP Code used to create the Pop up window.
>  > >
>  > >  <netui:button type="submit" value="Go to the Color Picker"
>  > >                         action="getColor" popup="true">
>  > >
>  > >                         <netui:configurePopup
>  > >                             location="false"
>  > >                             width="170" height="150">
>  > >                             <netui:retrievePopupOutput dataSource="
>  > >  outputFormBean.color"
>  > >                                 tagIdRef="colorField" />
>  > >                         </netui:configurePopup>
>  > >   </netui:button>
>  > >
>  > >  The following is the (Significant)code for MainController
>  > >
>  > >     @Jpf.Action()
>  > >     public Forward getColorSuccess(GetColorController.ColorFormcolorForm) {
>  > >
>  > >         System.out.println(" Inside getColorSuccess method
>  > >  "+colorForm.getColor());
>  > >
>  > >         return new Forward("_auto");
>  > >
>  > >     }
>  > >
>  > >     @Jpf.Action(forwards = { @Jpf.Forward(name = "success", path = "
>  > show.jsp")
>  > >  }, validationErrorForward = @Jpf.Forward(name = "failure", navigateTo =
>  > >  Jpf.NavigateTo.currentPage))
>  > >     public Forward submit(SubmitForm form) {
>  > >         Forward forward = new Forward("success");
>  > >         forward.addActionOutput("form", form);
>  > >         return forward;
>  > >     }
>  > >
>  > >     @Jpf.FormBean()
>  > >     public static class SubmitForm implements Serializable {
>  > >
>  > >         private String _name;
>  > >
>  > >         private String _color;
>  > >
>  > >         public String getName() {
>  > >             return _name;
>  > >         }
>  > >
>  > >         public void setName(String value) {
>  > >             _name = value;
>  > >         }
>  > >
>  > >         public String getColor() {
>  > >             return _color;
>  > >         }
>  > >
>  > >         public void setColor(String color) {
>  > >             _color = color;
>  > >         }
>  > >     }
>  > >
>  > >  And the following is the code for the Nested Controller
>  > >
>  > >   @Jpf.Action(
>  > >         useFormBean = "_returnFormBean",
>  > >         forwards = {
>  > >         @Jpf.Forward(
>  > >             name = "confirm",
>  > >             path = "confirm.jsp",
>  > >             actionOutputs = {
>  > >             @Jpf.ActionOutput(name = "chosenColor", type = String.class,
>  > >  required = true)
>  > >                 }
>  > >         )
>  > >             }
>  > >     )
>  > >     public Forward submitColor(ColorForm form) {
>  > >         Forward fwd = new Forward("confirm");
>  > >         fwd.addActionOutput("chosenColor", form.getColor());
>  > >         return fwd;
>  > >     }
>  > >
>  > >     @Jpf.Action(
>  > >         forwards = {
>  > >         @Jpf.Forward(name = "success", returnAction = "getColorSuccess",
>  > >  outputFormBeanType = ColorForm.class)
>  > >             }
>  > >     )
>  > >     public Forward done(ColorForm form) {
>  > >         System.out.println(" Inside Action Done ");
>  > >         return new Forward("success", _returnFormBean);
>  > >     }
>  > >
>  > >     public static class ColorForm
>  > >         implements Serializable {
>  > >         private String _color;
>  > >
>  > >         public String getColor() {
>  > >             return _color;
>  > >         }
>  > >
>  > >         public void setColor(String value) {
>  > >             _color = value;
>  > >         }
>  > >     }
>  > >
>  > >  Your help is sincerely appreciated in this regard.
>  > >
>  > >  Thanks.
>  > >
>  >
>

Re: Problem in Executing Popup Sample

Posted by Balasubramaniam Rajagopal <ra...@gmail.com>.
Hi,

Thanks for the reply.I have used NetUI button with proper tagId, as
mentioned. Also I am getting the following error in the weblogic console ( I
am using weblogic application server ) .

*ERROR  error, Auto-render forward _auto used, but no ViewRenderer was
registered
-- not doing any forward or redirect.
*
I looked up in the internet for this issue and found that it was a bug in
1.0 release and has been fixed in 1.0.1. I am using the latest version of
beehive , which is 1.0.2 . I am I using a wrong version of beehive NetUI ?
Has anybody able to get the popup sample running ?

Looking forward for some help.
*
*
On Tue, Mar 11, 2008 at 7:36 AM, Carlin Rogers <ca...@gmail.com>
wrote:

> Sounds like the framework JavaScript to update the parent page in the
> main flow and close the popup does not execute correctly. Does the
> color text box field of the parent page get populated when you close
> the popup? If not, do you have a NetUI text box with the tagId
> attribute set to the same value as the tagIdRef="colorField" attribute
> of your configurePopup? From the example, something like the
> following.
> <netui:textBox dataSource="actionForm.color" tagId="colorField"/>
>
> Look for any JavaScript errors that your browser detects. They may
> give you more detail about the issue.
>
> Kind regards,
> Carlin
>
> On Mon, Mar 10, 2008 at 4:41 PM, Balasubramaniam Rajagopal
> <ra...@gmail.com> wrote:
> > Hello group,
> >
> >  I was trying to execute a Popup sample with NetUI tags based on the
> example
> >  given in the documentation. After submitting the form from the pop up
> window
> >  the the control comes back to the main flow as expected. But the pop up
> >  window is not closed  and hence the  control doesn't come back to
> original
> >  page that created the popup. It seems that the 'return new
> Forward("_auto")
> >  has not effect. I feel that I am definitely missing something  but
> could not
> >  figure that out. Expecting some help from the experts..
> >
> >  JSP Code used to create the Pop up window.
> >
> >  <netui:button type="submit" value="Go to the Color Picker"
> >                         action="getColor" popup="true">
> >
> >                         <netui:configurePopup
> >                             location="false"
> >                             width="170" height="150">
> >                             <netui:retrievePopupOutput dataSource="
> >  outputFormBean.color"
> >                                 tagIdRef="colorField" />
> >                         </netui:configurePopup>
> >   </netui:button>
> >
> >  The following is the (Significant)code for MainController
> >
> >     @Jpf.Action()
> >     public Forward getColorSuccess(GetColorController.ColorFormcolorForm) {
> >
> >         System.out.println(" Inside getColorSuccess method
> >  "+colorForm.getColor());
> >
> >         return new Forward("_auto");
> >
> >     }
> >
> >     @Jpf.Action(forwards = { @Jpf.Forward(name = "success", path = "
> show.jsp")
> >  }, validationErrorForward = @Jpf.Forward(name = "failure", navigateTo =
> >  Jpf.NavigateTo.currentPage))
> >     public Forward submit(SubmitForm form) {
> >         Forward forward = new Forward("success");
> >         forward.addActionOutput("form", form);
> >         return forward;
> >     }
> >
> >     @Jpf.FormBean()
> >     public static class SubmitForm implements Serializable {
> >
> >         private String _name;
> >
> >         private String _color;
> >
> >         public String getName() {
> >             return _name;
> >         }
> >
> >         public void setName(String value) {
> >             _name = value;
> >         }
> >
> >         public String getColor() {
> >             return _color;
> >         }
> >
> >         public void setColor(String color) {
> >             _color = color;
> >         }
> >     }
> >
> >  And the following is the code for the Nested Controller
> >
> >   @Jpf.Action(
> >         useFormBean = "_returnFormBean",
> >         forwards = {
> >         @Jpf.Forward(
> >             name = "confirm",
> >             path = "confirm.jsp",
> >             actionOutputs = {
> >             @Jpf.ActionOutput(name = "chosenColor", type = String.class,
> >  required = true)
> >                 }
> >         )
> >             }
> >     )
> >     public Forward submitColor(ColorForm form) {
> >         Forward fwd = new Forward("confirm");
> >         fwd.addActionOutput("chosenColor", form.getColor());
> >         return fwd;
> >     }
> >
> >     @Jpf.Action(
> >         forwards = {
> >         @Jpf.Forward(name = "success", returnAction = "getColorSuccess",
> >  outputFormBeanType = ColorForm.class)
> >             }
> >     )
> >     public Forward done(ColorForm form) {
> >         System.out.println(" Inside Action Done ");
> >         return new Forward("success", _returnFormBean);
> >     }
> >
> >     public static class ColorForm
> >         implements Serializable {
> >         private String _color;
> >
> >         public String getColor() {
> >             return _color;
> >         }
> >
> >         public void setColor(String value) {
> >             _color = value;
> >         }
> >     }
> >
> >  Your help is sincerely appreciated in this regard.
> >
> >  Thanks.
> >
>

Re: Problem in Executing Popup Sample

Posted by Carlin Rogers <ca...@gmail.com>.
Sounds like the framework JavaScript to update the parent page in the
main flow and close the popup does not execute correctly. Does the
color text box field of the parent page get populated when you close
the popup? If not, do you have a NetUI text box with the tagId
attribute set to the same value as the tagIdRef="colorField" attribute
of your configurePopup? From the example, something like the
following.
<netui:textBox dataSource="actionForm.color" tagId="colorField"/>

Look for any JavaScript errors that your browser detects. They may
give you more detail about the issue.

Kind regards,
Carlin

On Mon, Mar 10, 2008 at 4:41 PM, Balasubramaniam Rajagopal
<ra...@gmail.com> wrote:
> Hello group,
>
>  I was trying to execute a Popup sample with NetUI tags based on the example
>  given in the documentation. After submitting the form from the pop up window
>  the the control comes back to the main flow as expected. But the pop up
>  window is not closed  and hence the  control doesn't come back to original
>  page that created the popup. It seems that the 'return new Forward("_auto")
>  has not effect. I feel that I am definitely missing something  but could not
>  figure that out. Expecting some help from the experts..
>
>  JSP Code used to create the Pop up window.
>
>  <netui:button type="submit" value="Go to the Color Picker"
>                         action="getColor" popup="true">
>
>                         <netui:configurePopup
>                             location="false"
>                             width="170" height="150">
>                             <netui:retrievePopupOutput dataSource="
>  outputFormBean.color"
>                                 tagIdRef="colorField" />
>                         </netui:configurePopup>
>   </netui:button>
>
>  The following is the (Significant)code for MainController
>
>     @Jpf.Action()
>     public Forward getColorSuccess(GetColorController.ColorForm colorForm) {
>
>         System.out.println(" Inside getColorSuccess method
>  "+colorForm.getColor());
>
>         return new Forward("_auto");
>
>     }
>
>     @Jpf.Action(forwards = { @Jpf.Forward(name = "success", path = "show.jsp")
>  }, validationErrorForward = @Jpf.Forward(name = "failure", navigateTo =
>  Jpf.NavigateTo.currentPage))
>     public Forward submit(SubmitForm form) {
>         Forward forward = new Forward("success");
>         forward.addActionOutput("form", form);
>         return forward;
>     }
>
>     @Jpf.FormBean()
>     public static class SubmitForm implements Serializable {
>
>         private String _name;
>
>         private String _color;
>
>         public String getName() {
>             return _name;
>         }
>
>         public void setName(String value) {
>             _name = value;
>         }
>
>         public String getColor() {
>             return _color;
>         }
>
>         public void setColor(String color) {
>             _color = color;
>         }
>     }
>
>  And the following is the code for the Nested Controller
>
>   @Jpf.Action(
>         useFormBean = "_returnFormBean",
>         forwards = {
>         @Jpf.Forward(
>             name = "confirm",
>             path = "confirm.jsp",
>             actionOutputs = {
>             @Jpf.ActionOutput(name = "chosenColor", type = String.class,
>  required = true)
>                 }
>         )
>             }
>     )
>     public Forward submitColor(ColorForm form) {
>         Forward fwd = new Forward("confirm");
>         fwd.addActionOutput("chosenColor", form.getColor());
>         return fwd;
>     }
>
>     @Jpf.Action(
>         forwards = {
>         @Jpf.Forward(name = "success", returnAction = "getColorSuccess",
>  outputFormBeanType = ColorForm.class)
>             }
>     )
>     public Forward done(ColorForm form) {
>         System.out.println(" Inside Action Done ");
>         return new Forward("success", _returnFormBean);
>     }
>
>     public static class ColorForm
>         implements Serializable {
>         private String _color;
>
>         public String getColor() {
>             return _color;
>         }
>
>         public void setColor(String value) {
>             _color = value;
>         }
>     }
>
>  Your help is sincerely appreciated in this regard.
>
>  Thanks.
>