# Dynamic page - file editor\_kaba.xml not found

**URL:** <https://techcommunity.softwareag.com/t/dynamic-page-file-editor-kaba-xml-not-found/57466>\
**Category:** Forum\
**Tags:** Former-Crossvision-Products, Application-Composer\
**Created:** [September 1, 2006, 4:41pm UTC](https://techcommunity.softwareag.com/t/dynamic-page-file-editor-kaba-xml-not-found/57466 "2006-09-01T16:41:00Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hjo](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@hjo](https://techcommunity.softwareag.com/u/hjo)\
**Post date:** [September 1, 2006, 4:41pm UTC](https://techcommunity.softwareag.com/t/dynamic-page-file-editor-kaba-xml-not-found/57466/1 "2006-09-01T16:41:00Z")

</div>

Hello,

I have a problem with generating a dynamic page as described in the manual in the section “Dynamic Page Layout - Programming Dynamic Pages”.

The file “editor\_kaba.xml” does not exist in the whole directory of cis…

Layout:

```auto

                Iterator iter = phases.iterator();
                Phase phase;
                m_ColumnProperties = new String[phases.size()];
                int pos = 0;

                while(iter.hasNext())
                {
                    phase = (Phase)iter.next();

                    xml.append("<coltable0 width=\"" + (100 / phases.size()) + "%\">");
                    xml.append(" <itr>");
                    xml.append(" <label name=\"" + phase.getDefinitionDescription() + "\" asplaintext=\"true\"/>");
                    xml.append(" </itr>");
                    xml.append(" <itr>");
                    xml.append(" <field valueprop=\"rating" + phase.getIdAsString() + "\" displayonly=\"true\"/>");
                    
                    if(phase.isCurrentPhase()
                        && isTodayCreated(phase)
                        && (m_Op == GUIConstants.NEW || m_Op == GUIConstants.EDIT))
                    {
                        xml.append(" <hdist width=\"10\"/>");
                        xml.append(" <button name=\"...\" method=\"doCalculateBI\" />");
                    }
                    
                    xml.append(" </itr>");
                    xml.append("</coltable0>");

                    m_ColumnProperties[pos] = "rating" + phase.getIdAsString();
                    pos++;
                }   
        
        IDynamicPageMgmt dpMgmt = m_sessionContext.getDynamicPageMgmt();
        dpMgmt.addDynamicPage(xml.toString(), "problemRating");
```

Exception:

```auto
java.lang.Error: Could not read resource path /cis/config/editor_kaba.xml
	at com.softwareag.cis.gui.generate.MixEditorXML.readCombinedXML()Ljava.lang.String;(Unknown Source)
	at com.softwareag.cis.gui.generate.HTMLGenerator.refreshXMLConfig()V(Unknown Source)
	at com.softwareag.cis.gui.generate.HTMLGenerator.generateHTML(Ljava.lang.String;)Ljava.lang.String;(Unknown Source)
	at com.softwareag.cis.server.InteractionSession.addDynamicPage(Ljava.lang.String;Ljava.lang.String;Ljava.lang.String;)V(Unknown Source)
	at com.softwareag.cis.server.InteractionSession.addDynamicPage(Ljava.lang.String;Ljava.lang.String;)V(Unknown Source)
```

Thanks for any advice in advance.

H. Johannes

---

<div class="post-metadata">

**Author:** ![Kai\_L](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@Kai\_L](https://techcommunity.softwareag.com/u/Kai_L)\
**Post date:** [September 4, 2006, 5:46pm UTC](https://techcommunity.softwareag.com/t/dynamic-page-file-editor-kaba-xml-not-found/57466/2 "2006-09-04T17:46:11Z")

</div>

Hello,  
you have to create the mentioned file “editor\_kaba.xml” by yourself.  
You have to follow the following steps for a very brief example of a button control element that can be used throughout your application for confirmation purposes:  
1.) Declare your own editor library in the file webapps\cis\cis\config\controllibraries.xml for the extension/namespace “kaba”.

```auto

<controllibraries>
	<library package="com.softwareag.cis.demolibrary"
	         prefix="demo">
	</library>
	<library package="com.pintexx.guiserver.controls"
	         prefix="pin">
	</library>
	<library package="com.myproject.handler"
	         prefix="kaba">
	</library>
</controllibraries>
```

2.) Write the editor\_kaba.xml file, e.g. :

```auto

<?xml version="1.0" encoding="UTF-8"?>
<!--
Dynamic extension of editor.xml file.
-->
<controllibrary>
  <editor>
  <tag name="kaba:okButton">
    <taginstance/>
    <protocolitem/>
  </tag>
  <tagsubnodeextension control="page" newsubnode="kaba:okButton"/>

  </editor>
</controllibrary>
```

3.) Write the corresponding handler class:

```auto

package com.myproject.handler;

import org.xml.sax.AttributeList;

import com.softwareag.cis.gui.generate.IMacroTagHandler;
import com.softwareag.cis.gui.protocol.ProtocolItem;

/**
 * Controlelement fuer OK-Button samt Methodenaufruf onOK()
 *
 */
public class OKBUTTONHandler implements IMacroTagHandler {

public void generateXMLForStartTag(String arg0, AttributeList attList, StringBuffer xml, ProtocolItem pi) {

    xml.append(" <button textid='common.ok' method='onOK' " +
                " image='image_ok.gif' width='100' height='20'> ");
    xml.append(" </button>");

    pi.suppressFurtherCodegenEntries();
	
}

	public void generateXMlForEndTag(String arg0, StringBuffer arg1) {
	}

}
```

4.) Use the new created controlelement in your layout.xml file (excerpt only)

```auto

...  
<itr align="left">
            <hdist width="100">
            </hdist>
            <kaba:okButton>
            </kaba:okButton>
            <hdist width="5">
            </hdist>
        </itr>
...
```

---

<div class="post-metadata">

**Author:** ![Kai\_L](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@Kai\_L](https://techcommunity.softwareag.com/u/Kai_L)\
**Post date:** [September 7, 2006, 3:57pm UTC](https://techcommunity.softwareag.com/t/dynamic-page-file-editor-kaba-xml-not-found/57466/3 "2006-09-07T15:57:06Z")

</div>

What I forgot to mention:  
It is wise to include in the XML layout file an appropriate namespace declaration for your new created control element kaba:okButton/.  
You might need it later.

```auto
<page model="com.myproject.myAdapter" xmlns:kaba="http://www.kaba.com/2006" >
```

---

<div class="post-metadata">

**Author:** ![hjo](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@hjo](https://techcommunity.softwareag.com/u/hjo)\
**Post date:** [September 18, 2006, 2:20pm UTC](https://techcommunity.softwareag.com/t/dynamic-page-file-editor-kaba-xml-not-found/57466/4 "2006-09-18T14:20:55Z")

</div>

Thanks for the answer, but I think there must be an easier way, too (like explained in the [online documentation](http://techcommunity.softwareag.com/ecosystem/documentation/crossvision/cit/devtopics/programmingdynamicpages.htm#programmingdynamicpages)).

For testing, I created the wanted editor\_kaba.xml (contains only the xml and an empty controllibrary tag).

Now, the page is displayed, but in the subpage-control occurs the following error:

> [@](#):
>
> Error: org.xml.sax.SAXParseException: Content is not allowed in prolog.

The log looks as following:

> [@](#):
>
> 20060918/094556/699 \>\>\>\>\>\>\>\>\>\> EXCEPTION OCCURED: \<\<\<\<\<\<\<\<\<\<  
> 20060918/094556/699 java.lang.Error: Could not read resource path /layouts//xmldata/default/com.abc.def.gui.adapter.ContactLocationEditAdapter.xml  
> 20060918/094556/699 \>\>\>\>\>\>\>\>\>\> Stacktrace \<\<\<\<\<\<\<\<\<\<  
> 20060918/094556/699 java.lang.Error: Could not read resource path /layouts//xmldata/default/com.abc.def.gui.adapter.ContactLocationEditAdapter.xml  
> at com.softwareag.cis.server.util.WebResourceReader.readTextFileIntoStrings(Ljavax.servlet.ServletContext;Ljava.lang.String;Z)[Ljava.lang.String;(Unknown Source)  
> at com.softwareag.cis.server.util.WebResourceReader.readTextFileIntoStrings(Ljava.lang.String;Z)[Ljava.lang.String;(Unknown Source)  
> at com.softwareag.cis.xmldata.filebased.XMLDataReference.init(Ljava.lang.String;Z)V(Unknown Source)  
> at com.softwareag.cis.xmldata.filebased.XMLDataManager.a(Lcom.softwareag.cis.server.IAdapter;Ljava.lang.String;Z)Lcom.softwareag.cis.xmldata.filebased.XMLDataReference;(Unknown Source)  
> at com.softwareag.cis.xmldata.filebased.XMLDataManager.findXMLData(Lcom.softwareag.cis.server.IAdapter;)Lcom.softwareag.cis.server.IDynamicAccess;(Unknown Source)  
> at com.softwareag.cis.server.InteractionModel.appendData(Ljava.lang.Object;Ljava.lang.String;Ljava.lang.String;Ljava.util.Hashtable;Ljava.util.ArrayList;)V(Unknown Source)  
> at com.softwareag.cis.server.InteractionModel.a(ZLcom.softwareag.cis.server.InteractionModel$SetDataResult;Ljava.lang.String;)Ljava.lang.String;(Unknown Source)  
> at com.softwareag.cis.server.InteractionModel.getDataAsXML(ZLcom.softwareag.cis.server.InteractionModel$SetDataResult;Ljava.lang.String;)Ljava.lang.String;(Unknown Source)  
> …

I thought that the examples in the online documentation would work… If this is not the case, I obviously must try the solution with the IMacroTagHandler…

---

<div class="post-metadata">

**Author:** ![Kai\_L](https://avatars.discourse-cdn.com/v4/letter/k/f6c823/32.png) [@Kai\_L](https://techcommunity.softwareag.com/u/Kai_L)\
**Post date:** [September 18, 2006, 4:52pm UTC](https://techcommunity.softwareag.com/t/dynamic-page-file-editor-kaba-xml-not-found/57466/5 "2006-09-18T16:52:39Z")

</div>

Hello,  
are you sure that the following is a valid path to your file ContactLocationEditAdapter.xml?

```auto

/layouts//xmldata/default/com.abc.def.gui.adapter.ContactLocationEditAdapter.xml
```

I doubt it.

---

<div class="post-metadata">

**Author:** ![hjo](https://avatars.discourse-cdn.com/v4/letter/h/e0b2c6/32.png) [@hjo](https://techcommunity.softwareag.com/u/hjo)\
**Post date:** [September 18, 2006, 5:19pm UTC](https://techcommunity.softwareag.com/t/dynamic-page-file-editor-kaba-xml-not-found/57466/6 "2006-09-18T17:19:27Z")

</div>

I don’t think so, too…

But I don’t know how the path is generated by CIS. The adapter which contains the subpage is named ContactLocationEditAdapter. I can’t explain why CIS accesses to the file ContactLocationEditAdapter.xml…

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:38pm UTC](https://techcommunity.softwareag.com/t/dynamic-page-file-editor-kaba-xml-not-found/57466/7 "2021-04-02T14:38:39Z")

</div>


