Skip to main content
10-Marble
July 17, 2023
Solved

How to add two groupconfigs in an AttributePanelConfig side by side?

  • July 17, 2023
  • 1 reply
  • 2551 views

 

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

 

 

Best answer by HelesicPetr

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

1 reply

HelesicPetr
22-Sapphire II
22-Sapphire II
July 18, 2023

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

10-Marble
July 18, 2023

 

Thanks for checking Petr

MN_10661566_1-1689683785612.png

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):

MN_10661566_2-1689684282560.png

 

HelesicPetr
22-Sapphire II
22-Sapphire II
July 18, 2023

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. 

HelesicPetr_0-1689685689508.png

 

PetrH