开发者

How to display icons next to a select1 control with xxforms:tree appearance

开发者 https://www.devze.com 2023-02-15 20:00 出处:网络
I display a list of items via an xforms:select1 co开发者_Python百科ntrol using the xxforms:tree appearance. They are displayed via a code block like:

I display a list of items via an xforms:select1 co开发者_Python百科ntrol using the xxforms:tree appearance. They are displayed via a code block like:

<xforms:select1 appearance="xxforms:tree" bind="retrievalControl-bind" id="retrievalControl-appSummary-control">
    <xforms:itemset nodeset="instance('dataInstance')/*">
        <xforms:label ref="fn:concat(./NAME,', ','ID: ',./ID)"/>
        <xforms:value ref="./ID"/>
    </xforms:itemset>
</xforms:select1>

I want to display two icons for each item on the same row as the item: one icon for deleting and one for editing that item, which would all invoke XPL with the item ID as the parameter.

The question, how do I render those icons - does itemset support nested trigger elements? If not, how do I go about achieving it (clicking on the item results in an action other than edit or delete, so cannot use that; can show delete/edit on the page shown when user clicks on the item, but want to save that one click if the user just wants to delete the item for example).


Don't forget that while you see a "tree" in your web browser, that widget is still a xforms:select1, that is a widget that allows you to select one item amongst many. The only thing users can do with the tree is select items. You can't, at least for now, have other actions attached to items in the tree. So using the tree, you can't attach two delete/edit icons to each item.

However you can create a UI that requires two clicks: first users select an item, and then click on a trigger outside the tree to perform the desired action (e.g. delete or edit).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号