Chad,
 
Thanks for the recommendation.  I took an alternate approach.  I implemented a 
shared flow that referenced the control and generated delegate methods for the 
operations I wanted exposed to the JSPs.  I then configured the JSPs parent 
pageflow to reference the shared flow.
 
>From the JSP, my code now looks like such:
<netui-data:callMethod object="${sharedFlow.vdmsSharedFlow}" 
method="getIgnitionModes" resultId="ignModeList"/>

<netui:select dataSource="actionForm.ignitionModeId" 
optionsDataSource="${ignModeList}" repeater="true">

<netui:selectOption value="${container.item.key}" 
repeatingType="option">${container.item.value}</netui:selectOption>

</netui:select>

Thanks,
Scott

 
________________________________

From: Chad Schoettger [mailto:[EMAIL PROTECTED]
Sent: Wed 1/17/2007 12:20 PM
To: Beehive Users
Subject: Re: Recommended Pattern for Control Call from Beehive JSP?



Hi Scott,

Here's a pattern I've used in the past to instantiate a custom control
from within a JSP.  The control will be executed in a Control
Container Context.

To instantiate:

<%
  com.mycustomer.control.ListCacheControlBean bean =
           
Controls.instantiate(com.mycustomer.control.ListCacheControlBean.class,
                     null,
                     ControlThreadContext.getContext(), "mybean");
%>

Where 'mybean' is the control id, optionally this parameter may be
null, in which case the control id will be generated by the controls
framework.

  - Chad








On 1/17/07, Scott Hammer <[EMAIL PROTECTED]> wrote:
> In the WLP 8.1.x version of the netui-data taglib, there were 
> <netui-data:declareControl> and <netui-data:callControl> tags for making a 
> control method call from a JSP.  The Beehive 1.0.x netui-data taglib has 
> neither tag; however, the documentation seems to hint that it is possible to 
> call a control using the <netui-data:callMethod> tag.  The API doc actually 
> refers to a "controlId" attribute that does not actually seem to be a part of 
> the tag interface.  See:
>
> http://beehive.apache.org/docs/1.0.2/netui/apidocs/taglib/beehive.apache.org/netui/tags-databinding-1.0/callMethod.html
>  
> <https://connect.bea.com/docs/1.0.2/netui/apidocs/taglib/beehive.apache.org/netui/tags-databinding-1.0/callMethod.html,DanaInfo=beehive.apache.org+>
>  
>
> Is it possible to make a call to a custom control (which in turn calls an EJB 
> control and the Portal Caching framework) from a JSP in a Beehive pageflow?  
> Will the control be executed in a control container so that the EJB control 
> actually works?
>
> If so, could someone provide some sample code for my use case?  From the JSP, 
> I would like to call the getOrganizations() method on a custom control called 
> com.mycustomer.control.ListCacheControl, returning the java.util.List result 
> in a pageContext variable called "orgs".  The result would then be used as 
> the optionsDataSource for a <netui:select> tag.
>
> My incorrect attempts:
> <netui-data:callMethod object="${pageFlow.listCacheControl}" resultId="orgs" 
> method="getOrganizations"></netui-data:callMethod> // ListCacheControl 
> exposed as a public pageFlow attribute - I don't like this
>
> <netui-data:callMethod object="com.mycustomer.control.ListCacheControl" 
> resultId="orgs" method="getOrganizations"></netui-data:callMethod>
>
> Thanks,
> Scott
> _______________________________________________________________________
> Notice:  This email message, together with any attachments, may contain
> information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
> entities,  that may be confidential,  proprietary,  copyrighted  and/or
> legally privileged, and is intended solely for the use of the individual
> or entity named in this message. If you are not the intended recipient,
> and have received this message in error, please immediately return this
> by email and then delete it.
>


_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

Reply via email to