Reputation: 503
How to add short description for component property in ATG.
Ex: If we see loggingDebug property in a Nucleus componenet Short description will shown as True if debug log events should be generated
. How to create such description for my property in component>
Upvotes: 0
Views: 335
Reputation: 100
I think what you need is create the MyComponentBeanInfo.java. if you look inside the ATG_PATH\DAS\src\Java\atg\droplet, will see something like this: Component.java and your descriptor ComponentBeanInfo.java.
i have searched in oracle docs and i found this link:Oracle Docs: BeanInfo Example
inside in your componente will be:
paramDescriptors[0] = new ParamDescriptor("myProperty",
"this is my short description",
DynamoServlet.class,
false, true, outputDescriptors);
beanDescriptor = new BeanDescriptor(MyComponent.class);
beanDescriptor.setShortDescription("A custom servlet bean.");
beanDescriptor.setValue("paramDescriptors", paramDescriptors);
beanDescriptor.setValue("componentCategory", "Servlet Beans");
Upvotes: 0
Reputation: 13397
Simple Answer:
You cannot add a description for an individual property.
You can add a description for a component by specifying a $description
in the .properties
file
More Complex Answer:
For viewing in the dyn/admin
screens, each Nucleus component is associated with an Admin Servlet. It is the Admin Servlet of the component that renders the admin screen (not a JSP or JHTML page).
For a given component, the admin interface determines the admin servlet to use for rendering the screen by querying the component.
ATG packages a number of admin servlets with the platform. The default one is ServiceAdminServlet
and is associated with the GenericService
. So anything that extends from GenericService
- most of the components you write - gets an admin screen that is rendered by ServiceAdminServlet. There is a different one for the Repository class - which is why the admin screen for a repository component looks different to that for most other components.
You can implement your own admin interface for your components by implementing your own AdminServlet
class, and overwriting the getAdminService()
method (defined in the AdminableService
interface) on your component to return an instance of your custom admin servlet.
However, GenericService
already implements the interface, and provides a convenient extensible hook method createAdminServlet()
, and it is preferable to extend ServiceAdminServlet
than creating your own AdminServlet from scratch.
The ServiceAdminServlet
class defines a printAdmin(...)
method which you override to output the custom HTML needed.
Caveat:
In my original answer, I had missed out the More Complex section, because I think that it is far more effort for little gain. However, I have updated my answer to be more complete.
I have been working, very hands-on, with the ATG platform since 1998, and never once have I had reason to create my own admin interface.
Upvotes: 2