beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlin Rogers" <carlin.rog...@gmail.com>
Subject Re: Problem in Executing Popup Sample
Date Tue, 11 Mar 2008 06:36:38 GMT
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
<raj.iyer77@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.
>

Mime
View raw message