• Create a xe:dataView dynamicly

    By Frederic Dehedin 1 decade ago

    Hi

    I'm using the xe:dataView component in my application, which works great.. So i decided to have a View Custom Control and pass the parameters dynamically:

    • view name
    • category filter
    • columns to show

    Starting with dynamically showing the columns was also the start of my problems..

    My approach is:
    The information, which columns to show is in my configuration, which is loaded into a managed bean "DataView", which is in the view-scope. So by switching the view (with partial refresh) i want to load slightly different columns and i compute the "loaded" attribute of each column with a boolean property of my bean (dataView.isLoaded('$columnName').

    Obviously there is no "rendered" attribute, but a "loaded" attribute, but this attribute only takes "compute on page load" values.. so switching the view as now effect on the "loaded attribute".

    So i'm thinking about workarounds:

    - adjust my configuration, so i can set the summarycolumn, and list the extracolumns, which are created by a repeat.. I could not find i possibility to pass a List or Array to the extra columns..did i miss something?

    - Another cheap workaround would be to just set the style display:none.. Still i would prefer a "rendered" attribute..

    Any help, hints and tipps are appreciated..

    Frederic