Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
We set two GroupConfigs in an AttributePanelConfig as below:
ComponentConfigFactory factory = getComponentConfigFactory();
AttributePanelConfig attrPanelConfig = factory.newAttributePanelConfig();
ResourceBundle bundle = ResourceBundle.getBundle(bundleBasename, locale);
// First group list layout
GroupConfig groupConfig = factory.newGroupConfig("documentFilterGroup", bundle.getString(createSendJobForTFE.FILTER_DOCUMENTS), 3);
...
attrPanelConfig.addComponent(groupConfig);
//Second group list layout
GroupConfig groupConfig2 = factory.newGroupConfig("documentFilterGroup", bundle.getString(createSendJobForTFE_SELECT_DOCUMENTS), 3);
..
attrPanelConfig.addComponent(groupConfig2);
Once these are set, the layouts are seen one below the another. How can I set the layouts (groupConfig and groupConfig2) side by side in the same line?
Thanks
Solved! Go to Solution.
Hi @MN_10661566
Yes, the GroupConfig is implemented by the JcaGroupConfig.
It depends what is really created in the factory.newGroupConfig method .
I tried it and it was the JcaGroupConfig in my case.
When I wanted to format the page I couldn't find a way how to do so in a java code directly in components so I moved what was needed to the jsp page.
for example, you can still create the components in your code. But the components are separated to several classes.
In the JSP you format your page as you need to a table and show the components what you need.
here is example with two components in a jsp
<table>
<tr>
<td scope="row" width="150" class="tableColumnHeaderfont" align="right" style="font-weight: bold;">
<jsp:include page="${mvc:getComponentURL('cz.aveng.Example.PanelGWT')}"/>
</td>
<td scope="row" width="300" class="tableColumnHeaderfont" align="left">
<jsp:include page="${mvc:getComponentURL('cz.aveng.Example.TableGWTBuilder')}"/>
</td>
</tr>
<table>
PetrH
Hi @MN_10661566
Can you send some screenshots or picture what you are trying achieve? It can be easier to understand what you want to do.
PetrH
Thanks for checking Petr
So we have two GroupConfig's here - one with the label "Select Partner Mapping" and the other with the label "Select Job Type"
both are added in an AttributePanelConfig as below:
GroupConfig groupConfig = factory.newGroupConfig(<Select partner mapping config>);...
attrPanelConfig.addComponent(groupConfig);
GroupConfig groupConfig2 = factory.newGroupConfig(<Select Job type config>);..
attrPanelConfig.addComponent(groupConfig2);
now the problem with this is that one gorupConfig object comes above the other in the layout. As in the screenshot the "select partner mapping" is above the "select job type" group.
We want them in the same line as their long width creates a lot of empty space.
something like this ,( i edit this in Paint):
Hi @MN_10661566
try to use this configuration
config.setIsGridLayout(true);
config.setIsMultiColumnGridLayout(true);
But I can't find any sets of the grid position.
I usually sort the panels in JSP pages.
PetrH
I believe the setIsGridLayout call is for JcaGroupConfig only .
So I tried using the
JcaGroupConfig groupConfigObject
instead of the previous GroupConfig groupConfigObject
But still couldn't get the layout to be in same line.
Maybe you are right I think I need to change the jsp file instead of the java file. Will give it a try.
Hi @MN_10661566
Yes, the GroupConfig is implemented by the JcaGroupConfig.
It depends what is really created in the factory.newGroupConfig method .
I tried it and it was the JcaGroupConfig in my case.
When I wanted to format the page I couldn't find a way how to do so in a java code directly in components so I moved what was needed to the jsp page.
for example, you can still create the components in your code. But the components are separated to several classes.
In the JSP you format your page as you need to a table and show the components what you need.
here is example with two components in a jsp
<table>
<tr>
<td scope="row" width="150" class="tableColumnHeaderfont" align="right" style="font-weight: bold;">
<jsp:include page="${mvc:getComponentURL('cz.aveng.Example.PanelGWT')}"/>
</td>
<td scope="row" width="300" class="tableColumnHeaderfont" align="left">
<jsp:include page="${mvc:getComponentURL('cz.aveng.Example.TableGWTBuilder')}"/>
</td>
</tr>
<table>
PetrH
Yes 🙂 this worked for me..Thanks very much Petr