cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Passing objects/values to MVC builders - Need good example

avillanueva
22-Sapphire I

Passing objects/values to MVC builders - Need good example

I am converting some old JCA tables to MVC but customization guide lacks sufficient examples to a certain area, using "addServiceArgument" in the getModel section. Here is my existing code:

<jca:getModel var="tableModel" descriptor="${tableDescriptor}"

               serviceName="customization.change.GoodrichECReportServiceImpl"

               methodName="getBOMDifferences">

    <jca:addServiceArgument value="${pair}" type="customization.change.PLPair"/>

</jca:getModel>

Now, I have created my custom Table builder class and defined my columns.  The code above would be replaced with buildComponentData(...) as shown on page 612 of customizer's guide.  However, PTC skirted the example. They were passing in a user and an Integer. In the MVC example, they did not show how an object could be retrieved from I assume, ComponentParams object.

In my case above, looping over the table in JSP, creating multiple tables.  The ID, labels and PLPair class changes for each one so all of that needs to be passed into the builder.  ComponentParams does list where you can set and get objects by name but no examples are given.  In addition, the MVC call only shows a simple call to render table.

0 REPLIES 0
Top Tags