webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Wiring between portlet and portlet include

    Posted Thu April 19, 2007 04:04 PM

    I am trying to do wiring between a portlet and a portlet include in this first portlet (using portlet include control).

    Once I click ok, the server seems to perfom an infinite loop and crash (Stack ooverflow)

    2007-04-19 15:11:45 EDT (Framework : WARN) [RID:3] - [POP.003.0160] Failed to resolve wiring for property “invokeFromTab”
    java.lang.StackOverflowError
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)

    My question is, can Ido wiring between a portlet and a included portlet?

    Thanks
    Bert


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods


  • 2.  RE: Wiring between portlet and portlet include

    Posted Thu April 19, 2007 05:03 PM

    I’m not sure I completely understand the structure of your page.

    Is it: ‘Portlet A’ uses the Portlet Include control to render ‘Portlet B’. And then ‘Portlet B’ is attempting to use portlet wiring to get a value out of ‘Portlet A’?


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods


  • 3.  RE: Wiring between portlet and portlet include

    Posted Fri April 20, 2007 07:34 AM

    Exactly…

    This give me a Stackoverflow.
    But when I try to use Wiring between Portlet B and another one (Portlet C) everything works.

    Thanks
    Bert


    #webMethods
    #webMethods-BPMS
    #MWS-CAF-Task-Engine


  • 4.  RE: Wiring between portlet and portlet include

    Posted Fri April 20, 2007 07:50 AM

    To add to my last message,

    When I remove from Portlet A the include portlet B, the wiring works OK.
    As soon I enable the portelt include, system goes to a non-stopping loop. Then Stack overflow.

    Bert


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS


  • 5.  RE: Wiring between portlet and portlet include

    Posted Fri April 20, 2007 09:52 AM

    Unfortunately, wiring will not work for that particular scenario. This is because during the resolution of the wiring, the wiring source portlet is rendered. This is done to handle the case where the wiring source is changed during the rendering of the source portlet. In your scenario, that causes a loop.

    Here are a couple of alternatives:

    1. Disconnect the wiring and instead pass the property value to inner portlet with a portlet parameter instead.
      For example:
      In MwS 6.5.x JSP page use something like this:
      <portlet:portlet uri=‘portletA_alias’>
      <util:param name=‘aProp1’ value=‘<%=portletB.getBProp1()%>’></util:param>
      </portlet:portlet>

      Or for a MwS 7.x view, use ‘Control Parameter’ (from the logic category) as a child of the ‘Portlet Include’ control to pass a name/value to the included portlet. The ‘Control Parameter’ name property would be the name of the portlet preference you wish to override and you can use a binding expression for the ‘Control Parameter’ value to lookup the source value from ‘Portlet A’.

    2. Create an intermediary portlet that holds the wired data and have both of the other portlets wired to it instead.
      For example:
      Portlet C is the wiring source (exposes prop1 for wiring)
      Portlet A and Portlet B are on the page
      Portlet A aProp1 wired to Portlet C prop1
      Porlet B bProp1 also wired to Portlet C prop1


    #webMethods
    #webMethods-BPMS
    #MWS-CAF-Task-Engine


  • 6.  RE: Wiring between portlet and portlet include

    Posted Fri April 20, 2007 10:22 AM

    Ok thanks for the info.
    I will try to implement approach 1b ( MwS 7.x)

    But how do I retreive in my Portlet B the ‘Control Parameter’ ?


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods


  • 7.  RE: Wiring between portlet and portlet include

    Posted Fri April 20, 2007 10:50 AM

    The ‘Control Parameter’ behaves very similar to wiring. The ‘value’ of the control parameter replaces the preference value (whose name == parameter name) of the target portlet.

    If you are rendering a ‘Portlet Include’ for ‘Portlet B’ that has a ‘Control Parameter’ with the following properties:
    Name: bProp1
    Value: #{activePageBean.portletA.aProp1}

    then the value of the bProp1 property of ‘Portlet B’ would be assigned the value of the resolved value expression (in this case expression resolves to the value of the aProp1 property of ‘Portlet A’).


    #webMethods-BPMS
    #MWS-CAF-Task-Engine
    #webMethods


  • 8.  RE: Wiring between portlet and portlet include

    Posted Wed July 18, 2007 06:03 PM

    Hi,

    I’m trying to use the “portlet inlcude” as indicated in that Post to send data from a portlet to another one but it doesn’t work.
    I have two portlets: portlet A and portlet B. Portlet B is an include in portlet A(by using the control “Portlet Include”).
    I use a “Control parameter” in the “Portlet include” of portlet A with the following properties:
    Name: Parameter1
    Value: i set some value from a document

    In portlet B, i create a Property under Preferences map with the same name that i used for the Control parameter(Parameter1)
    Name: Parameter1


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS