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

Multiple tab groups

pedro_magueija
Active Contributor
0 Likes
718

Hi everyone,

Has anyone created or seen a multi tab form?

Something like the screenshot below:

I'm having trouble when loading the xml all folders get grouped. However when previewed from B1 Studio works fine.

Thanks in advance.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Accepted Solutions (1)

Accepted Solutions (1)

Johan_Hakkesteegt
Active Contributor
0 Likes

Hi Pedro,

I only know tabs from .NET, so just a couple of thoughts:

  • Tabs consist of a parent container and child tab pages. Is the xml structure correct, are pages assigned to the correct parent container ?
  • Tab pages have names and indexes. Is the xml structure / content correct, does each separate set of tab pages start at index 0 ?
  • Does B1 somehow infer parent container and/or page index from the tab page name ? I mean, you have two groups of tab pages, but the names are criss-cross divided ?

Regards,

Johan

pedro_magueija
Active Contributor
0 Likes

Hi Johan,

Thank you for your reply.

In B1, at least as far as I know, tabs are a bit different. They don't have the same concept as in .net, so basically they are a clickable control. When that happens the form PaneLevel should change to display the controls on the given PaneLevel.

In the xml, you can create groups:


<items>

  <action type="group">

  <item uid="tab1" />

  <item uid="tab2" />

  </action>

</items>


but if when I create two separate groups and load via LoadBatchActions they get automatically grouped in one single group. It effectively changes the xml (exporting it via form.GetAsXml).


I'm wondering if this is a bug, or if this is by design (hence why I asked if anyone seen an SAP B1 form with more then one tab group).


Thanks again for your answer.


Cheers.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Johan_Hakkesteegt
Active Contributor
0 Likes

Okay, I see the concept. How do you determine the identity of a group ?

In your example xml, you add a group with two members, but there is no specific identifier. Is B1 supposed to assign its own identifier ? Perhaps based on the order in which you add the actions ?

pedro_magueija
Active Contributor
0 Likes

Hi Johan,

I don't really know how B1 identifies the groups. I was assuming that if they where in different <items> tags they would be in different groups. But internally I can't really say how it's processed.

From other forms xml (e.g.: AR Invoice) I've seen this:


<items>

  <action type="group">

  <item uid="tab1" />

  <item uid="tab2" />

  </action>

</items>

<items>

  <action type="group">

  <item uid="tab2" />

  <item uid="tab3" />

  </action>

</items>

But when I tried to put that in my form it "merges" them all into one.

Thanks again for your help.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Johan_Hakkesteegt
Active Contributor
0 Likes

Hi Pedro,

By the look of that example, I would assume that B1 assigns identities to your items based on the order in which they appear in the xml.

However from your second example structure, I don't see how it is determined that a group is a parent, a sibling, or a child.

What would the xml look like for example for a tab group, with two tab pages, and a button on the first tab page ?

Regards,

Johan

pedro_magueija
Active Contributor
0 Likes

Hi Johan,

That gets even funnier:


<items>

  <action type="add">

  ...

  <item top="55" left="47" width="65" height="20" AffectsFormMode="1" description="" disp_desc="0" enabled="1" from_pane="0" to_pane="0" linkto="" right_just="0" type="4" visible="1" uid="Item_8" IsAutoGenerated="0">

  <specific caption="Button1" />

  </item>

  </action>

</items>

<ChooseFromListCollection>

  <action type="add">

  <ChooseFromList UniqueID="-1" ObjectType="-1" MultiSelection="0" IsSystem="1" />

  </action>

</ChooseFromListCollection>

<DataBrowser BrowseBy="" />

<Settings MatrixUID="" Enabled="0" EnableRowFormat="0" />

<items>

  <action type="group">

  <item uid="Item_3" />

  <item uid="Item_6" />

  <item uid="Item_7" />

  </action>

</items>

<items>

  <action type="group">

  <item uid="Item_1" />

  <item uid="Item_4" />

  <item uid="Item_5" />

  </action>

</items>

This is the actual xml of the test from, with two tab groups and a button "inside" the first tab group.

Thanks.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Johan_Hakkesteegt
Active Contributor
0 Likes

Okay, so I see that items are added in reverse order ? You add the button first, and the tab page it goes onto last ?

If so it seems to me that in the button the from_pane="0" to_pane="0" bit determines that the button should appear on the tab page with index 0 (i.e. the first one)

What I wonder about, is that a button is an item with a clear declaration (type="4" uid="Item_8"). Why do you not need to declare the tab page type ?

Is this an implicit thing, i.e. if you don't determine the type it becomes a panel / tab page ?

If that is so, can you explicitly determine a panel / tab page ?

pedro_magueija
Active Contributor
0 Likes

Hi Johan,

No, in this case me omitting the rest of the code was sending the wrong message.

You can find the full xml in attachment.

Thanks again.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Johan_Hakkesteegt
Active Contributor
0 Likes

What does the disp_desc="0" attribute do ?

pedro_magueija
Active Contributor
0 Likes

Hi Johan,

I got the solution from a colleague. Different groups must be bound to a different datasource.

Then you get two different tab groups.

Thanks a lot for the help Johan...

... and Anders.

Cheers.


Best regards,

Pedro Magueija


View Pedro Magueija's profile on LinkedIn

Johan_Hakkesteegt
Active Contributor
0 Likes

That was the next thing I was going to suggest 

Answers (0)