VMware {code} Community
rathi27akash
Enthusiast
Enthusiast

Doubts related to Custom objects and plugin.xml

Hi,

1. we are developing a plugin in which we have around 4 custom objects. we have defined their list,actions,summary and all is working fine. but adding more and more objects in one plugin.xml is making it heavy. Can we create seperate files where we define info corresponding to a custom object and call it in plugin.xml

2. let's say we have 2 custom objects. Object A and Object B. both are related to each other. so in A's related object tab i want to show list of object B, but i don't want to show all the columns (associated to object B) as i show when viewing list of all Object B. is their a way to achieve this.

 

Thanks in Adance,

Rathi.

Rathi.
0 Kudos
4 Replies
laurentsd
VMware Employee
VMware Employee

There can be only one plugin.xml file per UI plugin but you can break things down by either having multiple UI plugins, or by having your plugin.xml import other .xml files.

The latter is achieved with this kind of syntax:

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE doc [

   <!ENTITY plugin-part2 SYSTEM "plugin-part2.xml">

   <!ENTITY plugin-part3 SYSTEM "plugin-part3.xml">

]>

<plugin id="com.vmware.samples.myplugin" ...

...


   <!-- imported meta-data -->

   &plugin-part2;

   &plugin-part3;

</plugin>


For your second question I think it's possible but it's not documented or explicitly supported, sorry!

0 Kudos
rathi27akash
Enthusiast
Enthusiast

Thanks, laurentsdaurentsd. your reply answers my first question perfectly. That's what i was looking for. Thanks. 

Do you have any suggestion for second Question.

 

Regards,

Rathi.

Rathi.
0 Kudos
rathi27akash
Enthusiast
Enthusiast

Hi laurentsd, can you please help with the second question
Rathi.
0 Kudos
laurentsd
VMware Employee
VMware Employee

If I don't answer right away it usually means that I don't have time to look into it because of my day job, sorry!

If you can modify the chassisRackVSphere sample to show what you're trying to do (so that I can run your modified sample locally) I will have another look.

0 Kudos