Question

I have set up a tagcloud from the extension library in Xpages. But what I cannot get to work is when the user clicks on a cloud tag entry, they go to the categorized view but it doesn't position to that category or subset to only that category.

I checked the Xpages Extension Library demo and can't figure out how it is supposed to work.

Any help would be greatly appreciated.

Bryan

Était-ce utile?

La solution

You can show all entries from view for a clicked tag:

(1) Create a categorized view in which the tags you want to show are in first categorized column. Add in following columns the values you want to show for a tag.

(2) Put in dominoViewCloudData this view name, the XPage which has to be called when a tag is selected and the parameter name for url where the selected tag will be provided

    <xe:dominoViewCloudData
        ...
        viewName="yourViewName"
        linkTargetPage="/TagViewEntryList.xsp"
        linkRequestParam="tag">
    </xe:dominoViewCloudData>

(3) Create the target XPage with a view control and set the categoryFilter to selected tag. You can read the tag from url with param['tag']. If your tag can contain space characters then you have to replace the "+" from url back to space with replace()

    <xp:viewPanel
        ...
        <xp:this.data>
            <xp:dominoView
                var="view1"
                viewName="yourViewName">
                    <xp:this.categoryFilter><![CDATA[#{javascript:
                        var tag = param['tag']; 
                        if(tag) { 
                            return tag.replace("+", " ");
                        } return null}]]>
                    </xp:this.categoryFilter>
            </xp:dominoView>
        </xp:this.data>
        <xp:viewColumn
            ...
        </xp:viewColumn>
    </xp:viewPanel>
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top