Revision history [back]

click to hide/show revision 1
initial version

asked 2017-12-07 16:25:14 +0800

Radoslav86 gravatar image Radoslav86

Grid whith dynamic columns

Hi, I want to do something like a bus timetable. my idea is the following, I have a Map<integer, list<date="">> resutsByHour = new HashMap<>() with the Hour for the key and for value is date when the bus is arrived at the stop. i want to show it as a grid, but if i have for 6 o'clock 4 stops - 6:10,6:35,6:40,6:55 and for seven o'clock only 2 - 7:10,7:40 i what my columns to be 4.

<grid model="@load(vm.resutsByHour)" >
    <columns children="@load(vm.maxColumnList)">

        <template name="children" var="item">
            <column label="value"></column>
        </template>
    </columns>


    <template name="model" var="date">
        <row children="@load(date)">
            <template name = "children" var="date" >
                <label  value="value"></label>
            </template>
        </row>
    </template>
</grid>

this is my zul code i whant something like this img

Grid whith dynamic columns

Hi, I want to do something like a bus timetable. my idea is the following, I have a Map<integer, list<date="">> resutsByHour = new HashMap<>() with the Hour for the key and for value is date when the bus is arrived at the stop. i want to show it as a grid, but if i have for 6 o'clock 4 stops - 6:10,6:35,6:40,6:55 and for seven o'clock only 2 - 7:10,7:40 i what my columns to be 4.

<grid model="@load(vm.resutsByHour)" >
    <columns children="@load(vm.maxColumnList)">

        <template name="children" var="item">
            <column label="value"></column>
        </template>
    </columns>


    <template name="model" var="date">
        <row children="@load(date)">
            <template name = "children" var="date" >
                <label  value="value"></label>
            </template>
        </row>
    </template>
</grid>

this is my zul code i whant something like this img

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More