VMware {code} Community
ChrisSmith2
Enthusiast
Enthusiast
Jump to solution

Correct return object to render a Status column in global list view?

What is the correct return object to render a status column in a VMWare-controlled global list view? I'd like to be able to show a status icon next to the status text for my objects.

I believe that this should be possible using the <columnRenderer>status</columnRenderer> property in the list definition, but I can't figure out what my back-end service should return. I've tried returning both a "com.vmware.vim25.ManagedEntityStatus" object directly and a String (using the toString() method on a "com.vmware.vim25.ManagedEntityStatus" object), but it always shows up as "Unknown" with a question-mark icon.

Is this the right type at all? Is there any documentation for showing non-text columns in global list views?

Reply
0 Kudos
1 Solution

Accepted Solutions
laurentsd
VMware Employee
VMware Employee
Jump to solution

Sorry, I missed your question last week. <columnRenderer> is not a public API (even if you see it in some internal plugins).  The only supported attributes for column extensibility are the ones in the chassisA and chassisB samples.  The only type of data is text so that the column data is compatible for both the Flex and HTML client.

  <extension id="com.vmware.samples.chassisb.list.sampleColumns">

      <!-- This extension point is created by objectViewTemplate above -->

      <extendedPoint>com.vmware.samples.chassisb.list.columns</extendedPoint>

      <object>

         <!-- XML representation of com.vmware.ui.lists.ColumnSetContainer -->

         <items>

            <!-- Chassis name column -->

            <com.vmware.ui.lists.ColumnContainer>

               <uid>com.vmware.samples.chassisb.column.name</uid>

               <dataInfo>

                  <com.vmware.ui.lists.ColumnDataSourceInfo>

                     <!-- Column header -->

                     <headerText>#{name}</headerText>

                     <!-- Object property whose text value will be displayed (array of 1 element) -->

                     <requestedProperties>

                        <String>name</String>

                     </requestedProperties>

                     <!-- Use sortProperty to allow column to be sorted with header click -->

                     <sortProperty>name</sortProperty>

                     <!-- Use exportProperty to allow column data to be exported -->

                     <exportProperty>name</exportProperty>

                  </com.vmware.ui.lists.ColumnDataSourceInfo>

               </dataInfo>

            </com.vmware.ui.lists.ColumnContainer>

View solution in original post

Reply
0 Kudos
5 Replies
ChrisSmith2
Enthusiast
Enthusiast
Jump to solution

It seems that returning a String with a value of "green", "red" etc. in lower-case gives the expected behaviour with <columnRenderer>status</columnRenderer>. I'm not sure why my earlier test using this failed, but it seems to be working now.

Reply
0 Kudos
ChrisSmith2
Enthusiast
Enthusiast
Jump to solution

Although the "columnRenderer" tag works in the HTML5 client, it seems to cause the Flash client to fail to show the list entirely (tested on both the 6.5.0 build and 6.5.0d).

So is there any way to show a "Status" column with an icon in a VMWare-controlled list of our custom object?

Reply
0 Kudos
ChrisSmith2
Enthusiast
Enthusiast
Jump to solution

Any feedback on this? Or is it not possible?

Reply
0 Kudos
laurentsd
VMware Employee
VMware Employee
Jump to solution

Sorry, I missed your question last week. <columnRenderer> is not a public API (even if you see it in some internal plugins).  The only supported attributes for column extensibility are the ones in the chassisA and chassisB samples.  The only type of data is text so that the column data is compatible for both the Flex and HTML client.

  <extension id="com.vmware.samples.chassisb.list.sampleColumns">

      <!-- This extension point is created by objectViewTemplate above -->

      <extendedPoint>com.vmware.samples.chassisb.list.columns</extendedPoint>

      <object>

         <!-- XML representation of com.vmware.ui.lists.ColumnSetContainer -->

         <items>

            <!-- Chassis name column -->

            <com.vmware.ui.lists.ColumnContainer>

               <uid>com.vmware.samples.chassisb.column.name</uid>

               <dataInfo>

                  <com.vmware.ui.lists.ColumnDataSourceInfo>

                     <!-- Column header -->

                     <headerText>#{name}</headerText>

                     <!-- Object property whose text value will be displayed (array of 1 element) -->

                     <requestedProperties>

                        <String>name</String>

                     </requestedProperties>

                     <!-- Use sortProperty to allow column to be sorted with header click -->

                     <sortProperty>name</sortProperty>

                     <!-- Use exportProperty to allow column data to be exported -->

                     <exportProperty>name</exportProperty>

                  </com.vmware.ui.lists.ColumnDataSourceInfo>

               </dataInfo>

            </com.vmware.ui.lists.ColumnContainer>

Reply
0 Kudos
ChrisSmith2
Enthusiast
Enthusiast
Jump to solution

Thanks for confirming; we'll stick to text-only for the VMWare-controlled lists. Status icons make issues much more apparent and improve usability - the less noticeable object badges at least help a little, but it would have been better if we could have used status icons as well and kept consistency with the VMWare objects.

I assume the same answer applies to column widths? I believe I tried using that property, but again it broke Flash.

Reply
0 Kudos