0
votes

I have a custom control I use for view filtering and I'd like to set the viewPanel that it filters based on a property of the custom control but in order to do this I would need to partially refresh the viewPanel whatever the ID of that viewPanel is. I know I could put a facet in my custom control and put a panel around the facet and then just partially refresh that panel, but I was wondering if there is a way to do this without having to drop the viewPanel into a facet. Here is the button code:

<xp:button value="Filter" id="btnFilter">
<xp:eventHandler event="onclick" submit="true"
    refreshMode="partial" refreshId="viewPanel1">
    <xp:this.action><![CDATA[#{javascript:filterView();}]]></xp:this.action>
</xp:eventHandler>
</xp:button>

Thanks

2

2 Answers

4
votes

Oops, just realized I could do this by adding a computed element ID for the partial refresh set to the compositeData value. I missed that little triangle next to "Specify Element ID".

<xp:button value="Filter" id="btnFilter">                   <xp:eventHandler event="onclick" submit="true"
                    refreshMode="partial" refreshId="#{javascript:compositeData.viewPanel}">
                    <xp:this.action><![CDATA[#{javascript:filterView();}]]></xp:this.action>
                </xp:eventHandler>
        </xp:button>
0
votes

You could use the dynamic viewpanel of the extension library.