Search This Blog

Friday, September 4, 2015

A question: Do you know how to display a column with totals on Data View control from Xpages Extension library?

Hi guys

I need some help.
Do you know how to display a column with totals on Data View control from Xpages Extension library? I can't find the way how to do it.

It is easy to do with a standard "View" control


However how to do the same with "Data View" control from Extension library? Is it even possible?



---------------------------------------------------------------
Updated on 11.09.2015







6 comments:

  1. https://northrenlotusblog.wordpress.com/2014/07/13/getting-total-value-from-view-column/

    Palmi lord

    ReplyDelete
  2. Thank you Palmi, but I don't think this is what I asked for.
    Your solution is based on repeat control.
    The challenge for me is to implement totals exactly with Data View control. I do know how to do this using other controls.

    ReplyDelete
  3. Hi Yuriy , am not aware of any other solution to get totals from a view in Xpages

    ReplyDelete
    Replies
    1. me neither and this is really sad because Data View control is really nice.
      it seems that I can't use it without totals

      Delete
  4. The total column is part of the category row. You can customize the contents of a dataView category row by using a "categoryRow" facet.

    From the tooltip for the dataView categoryColumn property:
    [...] Note that the category columns may also be defined in facet controls, using the facet names xp:key="categoryRow", xp:key="categoryRow1", xp:key="categoryRow2", etc.

    So the XPage source is like:

    xe:dataView
    xp:this.facets
    xp:panel xp:key="categoryRow"
    xp:text escape="true" id="computedField1" value="#{javascript:'category:'+viewEntry.getColumnValues()}"
    /xp:panel
    xp:panel xp:key="categoryRow1"
    xp:text escape="true" id="computedField2" value="#{javascript:'subcategory:'+viewEntry.getColumnValues()}"
    /xp:panel
    /xp:this.facets
    /xe:dataView

    ReplyDelete