Workplace Development Problems

Hi ,
I have some problems with developing workplace .I used HTMLBasedGUI/MFDemos sample as template for this development.
The first problem that I faced happened when I tried to see preview of my header page.I developed that page as a simple page and I used subclass of MFWorkplaceAdapter as model with that page.When I tried to preview my header page , it caused to disappearance of all layouts and activities links on CAI development IDE. As I understand preview function of layout manager doesn’t work healty with pages which uses subclass of MFWorkplaceAdapter as models.(Shouldn’t I use MFWorkplaceAdapter as standard Adapter base while developing workplace application ? )
The second problem is happened when I tried to preview my workplace page. Sometimes I see list of demo functions instead of my own functions in preview pane.But sometimes it works and shows my function lists and I always see the rigth function list when I check generated pages .
Are this problems bugs in IDE or just happened to me ? :frowning: .Did anyone else experienced this problems?

Can anyone help me please ?

Thanks in advance.

workplace.xml

<?xml version="1.0" encoding="UTF-8"?>
<mfpage separation="rows" sizing="70,*,35" border="15" bordercolor="#FFFFFF">
    <mfframeset target="top" separation="rows" sizing="*,*" border="0" bordercolor="background-color: #F7F3EF" frameborder="false" framespacing="0">
        <mfcisframe target="header" cisurl="/ADFManager/wheader.html" withborder="false" withownborder="false" marginheight="0" marginwidth="0">
        </mfcisframe>
        <mfwpactivefunctions resizable="false" withborder="false" scrolling="false" framestyle="border: 0px solid #000000" bordercolor="background-color: #F7F3EF" marginheight="0" marginwidth="0">
        </mfwpactivefunctions>
    </mfframeset>
    <mfframeset target="around" separation="cols" sizing="265,*,0" border="15" frameborder="true">
        <mfwpfunctions bootstrapclass="com.m2m.adfmng.workplace.MFDefaultBootstrapInfoProvider" serversidescrolling="false" activefunctionsvariant="stripsel" withownborder="true">
        </mfwpfunctions>
        <mfwpcontent resizable="true" withborder="false" scrolling="false" withownborder="true">
        </mfwpcontent>
        <mfcisframe target="CISHELP" cisurl="/ADFManager/onlinehelp.html" resizable="true" withborder="false" withownborder="true">
        </mfcisframe>
    </mfframeset>
    <mfcisframe target="footer" cisurl="/ADFManager/wfooter.html">
    </mfcisframe>
</mfpage>

wfooter.xml

<?xml version="1.0" encoding="UTF-8"?>
<page model="com.m2m.adfmng.workplace.ADPWorkplaceFooter">
    <pagebody vscroll="hidden" hscroll="hidden" horizdist="false" takefullheight="true">
        <itr takefullwidth="true" height="100%">
            <coltable0 width="120" takefullheight="true">
                <vdist height="1" backgroundstyle="background-color: #AFAFAF">
                </vdist>
                <itr itrstyle="background-color: #EFEFEF">
                    <hdist width="20">
                    </hdist>
                    <icon image="img/mffooterflash.gif" method="refresh" valign="top" title="Refresh View">
                    </icon>
                </itr>
            </coltable0>
        </itr>
    </pagebody>
</page>

[/code]

wheader.xml

<?xml version="1.0" encoding="UTF-8"?>
<page model="com.m2m.adfmng.workplace.ADPWorkplaceHeader">
    <pagebody vscroll="hidden" hscroll="hidden" horizdist="false" takefullheight="true">
        <itr takefullwidth="true" height="100%" align="left" itrstyle="background-color: #EFEFEF">
            <hdist>
            </hdist>
            <icon image="img/fav_closeall.gif" method="closeAllActivities" align="left" title="Close All Workplace Windows ">
            </icon>
            <icon image="img/fav_naviplus.gif" method="onNormalSize" align="left" title="Re-open left workplace navigation frame">
            </icon>
            <icon image="img/fav_naviminus.gif" method="on0Size" align="left" title="Close left workplace navigation frame">
            </icon>
        </itr>
    </pagebody>
</page>

MFDefaultBootstrapInfoProvider class

package com.m2m.adfmng.workplace;
 
import com.softwareag.cis.server.util.TREECollection;
import com.softwareag.cis.workplace.IMFWorkplaceBootstrapInfo;
import com.softwareag.cis.workplace.IMFWorkplaceBootstrapInfoProvider2;
import com.softwareag.cis.workplace.MFWorkplaceTopic;
import com.softwareag.cis.workplace.MFWorkplaceTreeNodeCISPage;
import com.softwareag.cis.workplace.MFWorkplaceTreeNodeFolder;

import static com.softwareag.cis.workplace.MFWorkplaceConstants.*;
import com.softwareag.cis.workplace.MFWorkplaceInfo;

public class MFDefaultBootstrapInfoProvider implements
		IMFWorkplaceBootstrapInfoProvider2 {

	public MFWorkplaceInfo getWorkplaceInfo(IMFWorkplaceBootstrapInfo envInfo) {
		MFWorkplaceTopic topic; 
		MFWorkplaceTreeNodeFolder topNode;
		TREECollection tc;
		MFWorkplaceInfo workplaceInfo = new MFWorkplaceInfo("/ADFManager/empty.html");
		// --------------------------------------------------------------------
		// Demo topic
		// --------------------------------------------------------------------
		topic = new MFWorkplaceTopic("Demos", workplaceInfo);
		tc = topic.getTree();
		topNode = new MFWorkplaceTreeNodeFolder("First Demo");
		topNode.setOpened(TREECollection.ST_OPENED);
		tc.addTopNode(topNode, false);
		MFWorkplaceTreeNodeCISPage helloWorldNode = new MFWorkplaceTreeNodeCISPage(	"welcome!", "/ADFManager/welcome.html", true, true);
		tc.addSubNode(helloWorldNode, topNode, true, false);
		return workplaceInfo;
	}

}

ADPWorkplaceHeader

package com.m2m.adfmng.workplace;
import com.softwareag.cis.workplace.MFWorkplaceAdapter;

public class ADPWorkplaceHeader
    extends MFWorkplaceAdapter
{
}

ADPWorkplaceFooter

package com.m2m.adfmng.workplace;
import com.softwareag.cis.workplace.MFWorkplaceAdapter;
public class ADPWorkplaceFooter
    extends MFWorkplaceAdapter
{
}

Hi,

subclassing MFWorkplaceAdapter etc. - this is not the “straight” way to build up workplaces… Have you had a look into the documentation Control Developer’s Guide? There is a chapter talking about integrating pages into the workplace - normally you have to provide a class serving as “info provider” for the workplace etc. etc.

Bjoern

…sorry, the documentation is: “Developer’s Guide”, the “Control Developer’s Guide” does not help you too much in this topic.

Bjoern

Hi again ,
I’ve already read that document and I couldn’t see anything wrong in my application. My problems about development IDE and it’s preview functionality. Actually everthing seems working (except function list) when I try to publish and see pages via servlet.
Can you simply try this :
Just prepare a simple page and use subclass of com.softwareag.cis.workplace.MFWorkplaceAdapter as model on this page and try to preview .
Usage of MFWorkplaceAdapter causes an error on display.Yes I know using Adapter class as base class impedes this problem but MFWorkplaceAdapter has some extra functionality to work with Workplace.So why I shouldn’t use this class as base Adapter?
The second problem is about MFWPFUNCTIONS .I set my own BootStrapInfo class but preview pane shows demo application’s function list instead of my own list.The situation also same at runtime.

 <mfwpfunctions bootstrapclass="com.m2m.adfmng.workplace.MFDefaultBootstrapInfoProvider" serversidescrolling="false" activefunctionsvariant="stripsel" withownborder="true">
</mfwpfunctions>

I don’t see the right function list if I don’t use “bootstrapClassName” parameter in url. Is this is normal case for ide & runtime ?

Thanks.

I realized that function frame problem is also related with usage of MFWorkplaceAdapter.When I use Adapter class instead of MFWorkplaceAdapter class everything works fine.

So … I have one final question ! :slight_smile:

Is MFWorkplaceAdapter designed for usage of CAI developers or just for internal use ? If it is open for usage how can I use it ?Javadoc doesn’t consist enough information.

Thanks…

MFWorkplaceAdapter is not designed for usage of CAI developers. I just saw that it is part of the JavaDoc documented classes - which it shouldn’t. Sorry for confusion on this - I just removed it from the list…

Thanks for the hint! Bjoern