Skip to main content
avillanueva
23-Emerald I
23-Emerald I
May 15, 2017
Question

Passing objects/values to MVC builders - Need good example

  • May 15, 2017
  • 1 reply
  • 1303 views

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.

1 reply

12-Amethyst
June 17, 2025

Hi @avillanueva , just curious if you were able to find a solution for implementing multiple MVC tables in the same JSP? If yes, how did you handle the ComponentBuilder?

avillanueva
23-Emerald I
23-Emerald I
June 17, 2025

Oldie. Must have since I have it running in production. I will look for my code later for examples.