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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

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

MN_10661566
10-Marble

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

 

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

 

 

ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

6 REPLIES 6

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

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

 

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

 

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

 

Announcements

Top Tags