Problem with activation a new user foler in a system form
peng cheng
Hi there,I'm a new Coresuite Customize user
I follow this exemple for creation of a new foler un a system form (form 320):
http://www.coresuite.ch/forum.html?&L=2&tx_mmforum_pi1[action]=list_post&tx_mmforum_pi1[tid]=940
It works pretty well, but when i click on it, it changes the panelevel, but the folder is not activated
The picture 01.jpg shows when I open the sap system form, the first foler is opened by default
The second picture 02.jpg shows when I click on my folder "test", it changes correctly panelevel, but the 1st folder is always acivate
Is there a solution for that?
Thanks in advence
Attachment
[url=http://www.coresystems.ch/wp-content/../wp-content/forum-image-uploads/pcheng/01.jpg]01.jpg[/url]
peng cheng
this is my code and the second picture:
SwissAddonFramework.UI.Components.Folder f2 = SwissAddonFramework.UI.Components.Folder.CreateNew("EISG_F001");
f2.Top=10;
f2.Width=140;
f2.Left=120;
f2.Height=14;
f2.Value = "test";
f2.AffectsFormMode = false;
f2.Pane=76;
// REGISTER TO FORMLOAD AND GROUPING
pVal.Form.AddItem(f2);
pVal.Form.Update();
f2.GroupWith("7");
// FOLDERCLICK
SwissAddonFramework.UI.EventHandling.ItemEvents.ClickEventHandler delFolder = null;
delFolder = delegate (SwissAddonFramework.UI.EventHandling.ItemEvents.Click ev)
{
ev.Form.PaneLevel = 76;
};
((SwissAddonFramework.UI.Components.Folder)pVal.Form.Items["EISG_F001"]).AddHandler_Click(SwissAddonFramework.UI.Components.ModeComponent.FormModes.ALL, delFolder);
return true;
Attachment
[url=http://www.coresystems.ch/wp-content/../wp-content/forum-image-uploads/pcheng/02.jpg]02.jpg[/url]
peng cheng
I tried another exmple, but i have the same issue
/*
This Code add a Folder to a System From (SalesOrder) with a Grid
*/
SwissAddonFramework.UI.Components.Folder f1 = SwissAddonFramework.UI.Components.Folder.CreateNew("Tab_SP1");
SwissAddonFramework.UI.Components.Folder f2 = SwissAddonFramework.UI.Components.Folder.CreateNew("Tab_SP2");
SwissAddonFramework.UI.Components.Folder f3 = SwissAddonFramework.UI.Components.Folder.CreateNew("Tab_SP3");
f1.Top=100;f1.Width=150;f1.Left=500;f1.Height=14;f1.Pane=8;
f1.Value = "Sous Projet 1";
f1.AffectsFormMode = false;
f2.Top=100;f2.Width=150;f2.Left=650;f2.Height=14;f2.Pane=9;
f2.Value = "Sous Projet 2";
f2.AffectsFormMode = false;
f3.Top=100;f3.Width=150;f3.Left=800;f3.Height=14;f3.Pane=10;
f3.Value = "Sous Projet 3";
f3.AffectsFormMode = false;
SwissAddonFramework.UI.Components.Grid grid = SwissAddonFramework.UI.Components.Grid.CreateNew("COR_Grd1");
grid.FromPane = 9;
grid.ToPane = 9;
grid.Top=150;
grid.Left=100;
grid.Width=100;
grid.Height=100;
//grid.SetSizeAndPosition(SwissAddonFramework.UI.Components.Matrix.GetFromUID(pVal.Form,"38"));
pVal.Form.AddItem(f1);
pVal.Form.AddItem(f2);
pVal.Form.AddItem(f3);
pVal.Form.AddItem(grid);
pVal.Form.Update();
f1.GroupWith("7");
f2.GroupWith("Tab_SP2");
f3.GroupWith("Tab_SP3");
/*
SwissAddonFramework.UI.EventHandling.ItemEvents.ClickEventHandler delFolder = null;
delFolder = delegate (SwissAddonFramework.UI.EventHandling.ItemEvents.Click ev)
{
ev.Form.PaneLevel = 8;
}
((SwissAddonFramework.UI.Components.Folder)pVal.Form.Items["Tab_SP1"]).AddHandler_Click(
SwissAddonFramework.UI.Components.ModeComponent.FormModes.ALL, delFolder);
*/
f1.AddHandler_Click(SwissAddonFramework.UI.Components.ModeComponent.FormModes.ALL, new SwissAddonFramework.UI.EventHandling.ItemEvents.ClickEventHandler(delegate(SwissAddonFramework.UI.EventHandling.ItemEvents.Click eventVal) {
eventVal.Form.PaneLevel=8;
}));
f2.AddHandler_Click(SwissAddonFramework.UI.Components.ModeComponent.FormModes.ALL, new SwissAddonFramework.UI.EventHandling.ItemEvents.ClickEventHandler(delegate(SwissAddonFramework.UI.EventHandling.ItemEvents.Click eventVal) {
eventVal.Form.PaneLevel=9;
}));
f3.AddHandler_Click(SwissAddonFramework.UI.Components.ModeComponent.FormModes.ALL, new SwissAddonFramework.UI.EventHandling.ItemEvents.ClickEventHandler(delegate(SwissAddonFramework.UI.EventHandling.ItemEvents.Click eventVal) {
eventVal.Form.PaneLevel=10;
}));
return true;
Thilo-Simon Studt
Same problem here.It seems only to happen if you´re using more than 2 folders.
Anyone got a clue?
Manuel Marhold
Hi there,you have to bind the folder to an userdatasource.
I don't know if the cs-framework does this itself, but in SAP-Std-SDK you have to do this manually.
Thilo-Simon Studt
Hi,i've tried it with userdatasource, same result :-(
I think this is a bug in CS, i'll try it later if it works with the SAP-Std-SDK.
Michael Egloff
Hi there,adding new tabs are restricted by the SDK of SAP, depending on the form you want to add them.
Opportunity: no additional tabs
Sales /Purchase documents: two additional tabs
Business partner master data: 5 additional tabs
other forms: not tested yet
However you can add more than these tabs but they don't work correctly (focus is not correct).
That's the reason why you can use the same code and get different results.
Thilo-Simon Studt
Hi,thanks for the good explanation, so we have to wait until SAP decides to give us some more tabs.
0
Please sign in to leave a comment.
Comments
0 comments