VMware {code} Community
dloverin
Contributor
Contributor
Jump to solution

Are propertyConditions for actions supported in the HTML client?

When using the propertyConditions in the html client my actions are not be shown in the menu as expected. These actions allow the actions to be shown in the Flex client.

I verified our property provider is being called and is returning values that should enable the action to be shown in the menu. 

If I remove the propertyCondition and only use objectType to restrict the action then the action shows in the menu. Here is the metadata I'm using on both the action.sets and the solutionsMenus:

        <metadata>

            <objectType>VirtualMachine</objectType>

            <propertyConditions>

                <com.vmware.data.query.CompositeConstraint>

                    <nestedConstraints>

                        <com.vmware.data.query.PropertyConstraint>

                            <propertyName>sample:isMyVm</propertyName>

                            <comparator>EQUALS</comparator>

                            <comparableValue>

                                <String>true</String>

                            </comparableValue>

                        </com.vmware.data.query.PropertyConstraint>

                        <com.vmware.data.query.PropertyConstraint>

                            <propertyName>sample:isTemplate</propertyName>

                            <comparator>EQUALS</comparator>

                            <comparableValue>

                                <String>false</String>

                            </comparableValue>

                        </com.vmware.data.query.PropertyConstraint>

                    </nestedConstraints>

                    <conjoiner>AND</conjoiner>

                </com.vmware.data.query.CompositeConstraint>

            </propertyConditions>

        </metadata>

 

Any thoughts or ideas on how to trouble shoot?

 

Thanks,

 

-Darrell

0 Kudos
1 Solution

Accepted Solutions
irahov
VMware Employee
VMware Employee
Jump to solution

Most probably the property provider for 'sample:isTemplate' returns boolean while the comparableValue is for String. If that's the case please change:

   <comparableValue>
         <String>false</String>
   </comparableValue>

to

   <comparableValue>
         <Boolean>false</Boolean>
   </comparableValue>

It works in flex because flex uses "toString()" to compare objects.

View solution in original post

0 Kudos
3 Replies
dloverin
Contributor
Contributor
Jump to solution

Does anyone have propertyConditions metadata working in the 6.5 HTML Client? The same property conditions that work in the Flex client are not working in the HTML client. By not working I mean the menu item associated with the propertyConditions is never shown. It seems the HTML client is calling the Java middleware to evaluate the propertyConditions but the menu item is never shown.

-Darrell

0 Kudos
irahov
VMware Employee
VMware Employee
Jump to solution

Most probably the property provider for 'sample:isTemplate' returns boolean while the comparableValue is for String. If that's the case please change:

   <comparableValue>
         <String>false</String>
   </comparableValue>

to

   <comparableValue>
         <Boolean>false</Boolean>
   </comparableValue>

It works in flex because flex uses "toString()" to compare objects.
0 Kudos
CathyBr
Enthusiast
Enthusiast
Jump to solution

Hi,

I have also had problems with property conditions. This condition has been working for the whole time (since 5.5 on the flex client)

<propertyConditions>

<com.vmware.data.query.CompositeConstraint>

  <nestedConstraints>

   <com.vmware.data.query.PropertyConstraint>

    <propertyName>hardware.systemInfo.vendor</propertyName>

    <comparator>EQUALS_ANY_OF</comparator>

    <comparableValue>

     <String>acme,acme1,acme2</String>

    </comparableValue>

   </com.vmware.data.query.PropertyConstraint>

  </nestedConstraints>

</com.vmware.data.query.CompositeConstraint>

</propertyConditions>

Is perhaps the <String> tag wrong, because I have actually an arry here?

thanks for the info

Cathy

0 Kudos