2 Replies Latest reply on Mar 24, 2011 12:44 AM by Todd Morrison

    Pages.xml parms binding event

    Todd Morrison Newbie

      In pages.xml I have

       <page view-id="/index.xhtml">
        <param name="myPropertyName" value="#{myComponent.myProperty}"/>

      On my component (Event scoped), I would like to initialize some items when the request parameter is bound to the property.

      This works fine on the setter, but does not work well when there are multiple parameters being passed.

      I cannot use the @Create method, because it is called before the binding.

      Is there a Seam Event that will let me hook into after the binding phase?

        • 1. Re: Pages.xml parms binding event
          Leo van den berg Master


          you have the:

          • org.jboss.seam.preSetVariable.yourVariable

          • org.jboss.seam.postSetVariable.yourVariable

          Evenst at your disposal.


          • 2. Re: Pages.xml parms binding event
            Todd Morrison Newbie

            I still can't find a good resolution for this.

            If I have a component that has 3 request parameters mapped through the pages.xml, I cannot find out how to know when the all of the parameters have bound for that view.

            I am using:

                    public void beforePhase(PhaseEvent event) {
                            if (event.getPhaseId() == PhaseId.RENDER_RESPONSE
                                            || event.getPhaseId() == PhaseId.APPLY_REQUEST_VALUES) {

            But, this is not restricted to a particular component. This fires all over the place, but luckily only once... after the ApplyRequestValues

            What I need is a way to isolate this event down to APPLYREQUESTVALUES on the currently observing component.