beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Balasubramaniam Rajagopal" <raj.iye...@gmail.com>
Subject Problem in Executing Popup Sample
Date Mon, 10 Mar 2008 23:41:22 GMT
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.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message