• Add Keyword/Category is broken

    By Marius Loewe 1 decade ago

    It seems you made an abstraction to handle keywords and categories in the same pages but did not cleaned up correctly. The keyword version is the generic and the category version is obsolete!?



    The add button in the ViewKeyword.xsp should open the Keyword XPage. But the action

    <xp:openPage name="Keyword"></xp:openPage>

    does not work (on my client 8.5.1 fp5). It has to be name="/Keyword", name="Keyword.xsp" or at best name="/Keyword.xsp".



    After fixing this, there is still a problem. The Keyword XPage is statically linkt to Category documents.

        &lt;xp:dominoDocument var=&quot;document1&quot; computeWithForm=&quot;both&quot;<br/>
            formName=&quot;Category&quot; action=&quot;editDocument&quot;&gt;<br/>
        &lt;/xp:dominoDocument&gt;<br/>
    



    This is my fix:

        &lt;xp:dominoDocument var=&quot;document1&quot; computeWithForm=&quot;both&quot;<br/>
            action=&quot;editDocument&quot;&gt;<br/>
    

    <xp:this.formName><![CDATA[#{javascript:if(sessionScope.KeywordType === "Categories") {

    return &quot;Category&quot;;<br/>
    

    } else {

    return sessionScope.KeywordType;<br/>
    

    }}]]></xp:this.formName>

        &lt;/xp:dominoDocument&gt;<br/>
    



    But I don't think, that this is a good solution. Maybe you want to rename you Category form!?