I'm looking for a document with the possible metadata property names and config parameters for a component.
There are many documents on the internet with such definition. The question is how I know if the name of a property/parameter setting is a valid name.
metadata : {
name : "XXXXX",
version : "1.0",
includes : [],
dependencies : {
libs : ["sap.m", "sap.ui.layout"],
components : []
},
rootView : "XXXXX",
config : {
resourceName : "i18n",
resourceBundle : "XXXX",
serviceConfig : {
name : "main",
serviceUrl : "XXXXX",
}
}
There is a document available here which describes all possible metadata. Since there is no real assistance during design-time, you have to have a look in the API to check the possible values. If you want to extend it with your own properties/parameters, just make sure that the name is not too generic since the Component can be extended with each new version of UI5.
The approach of defining component metadata in the component itself has been superseded by an approach using a manifest file. You will find all available properties in the documentation .
The Component class extends the ManagedObject class and provides specific metadata for components. The UIComponent class provides additional metadata for the configuration of user interfaces or the navigation between views.
The metadata defined in component.js is common for faceless components and UI components. The following parameters are available:
abstract: Specifies if your component class is an abstract class that serves as a base for other components
version: Version of your component; this parameter belongs to the design-time metadata and is currently not used; it may be used in the future in the design-time repository
includes: Array of strings containing the paths to CSS and JavaScript resources for your component; will be added to the header of the HTML page and loaded by the browser. The resources will be resolved relative to the location of Component.js.
dependencies: Used to specify all external dependencies, such as libraries or components. Like the includes for resources that are added to the application’s HTML, the dependencies are loaded by SAPUI5 core before the component is initialized. Everything that is referenced here can be used in your component code right from the start. Specify here external dependences such as libraries or components, that will be loaded by SAPUI5 core in the initialization phase of your Component and can be used after it.
libs: Path to the libraries that should be loaded by SAPUI5 core to be used in your component
components: Full path to the components that should be loaded by SAPUI5 core to be used in your component
ui5version: Minimum version of SAP UI5 that the component requires; it helps to be ensure that the features of SAPUI5 runtime used in this component are available. As SAPUI5 currently does not enforce the use of the correct version, it is only used for information purposes.
properties: Defined for components in the same way as for a control or view
library: Specify the library the component belongs to
config: Static configuration; specify the name-value pairs that you need in the component
customizing: Customizing for components and views, see Extending SAPUI5 Applications
sap.ui.viewExtensions: Used for providing custom view content in a specified extension point in the standard application
sap.ui.viewModifications: Used for overriding control properties in the standard application
sap.ui.viewReplacements: Used for replacing a standard view with a custom view
sap.ui.controllerExtensions: Used for replacing a standard controller with a custom controller
for more Information go to the url:
https://sapui5.netweaver.ondemand.com/sdk/#docs/guide/0187ea5e2eff4166b0453b9dcc8fc64f.html
Well, from the code you could check if the property exist with the get(Property Name) method that all elementes have.
Otherwise all the properties ad hoc are in this url that Tim Gerlach shared for you before.
If it is a regular development approach, you should ideally look at the API of the component class.
If you are using metadata driven approach for development and you might generate the required code then you should fetch details from metadata information provided by the class or read it from .js file. ".js" will be helpful if you are not using SAPUI5 runtime.
Hope, this helps.
.........
Good Luck
Final answer has to be by looking through the source code as nothing else, even the API documentation, will be able to be 100% accurate against the consuming source.
As mentioned in the documentation, the definition of Component's metadata has largely moved to a separate file named manifest.json (aka. Application Descriptor).
With the introduction of the descriptor for applications, components, and libraries, we recommend to migrate the component metadata to the descriptor. [...] For more information, see Descriptor for Applications, Components, and Libraries.
Besides just looking at the list of available parameters in the doc, the closest "assistance" you could get is the Descriptor Editor from Web IDE.
The Descriptor Editor provides available choices, placeholder suggestions, and input validation.
Related
I have A.ecore in which I created classes and ORBAC.ecore in which there is rules and permissions classes
How can I make a reference so that a class from A.ecore can refer to class permission from ORBAC.ecore
Using the Ecore editor, open A.ecore
then right click, Load Resource...
you will have the possibility to load ORBAC.ecore (Browse Target Platform package, Registered Packages, File system or Workspace)
Once loaded, you'll be free to make references to classes defined in ORBAC.ecore.
Please note that the whay you load the additional resource may have some impacts when deploying your metamodels (and containing plugins). This is because Eclipse will use different URI scheme. (platform:/resource/..., platform:/plugin/..., registered nsUri, ...)
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>
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.
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");
As it is fairly simple to create frontend views into the content area using Joomla!'s component infrastructure and a menu item, I wonder if it is not possible to abuse a system plugin to achive the same goal. Reason: keep the code slim (A plugin can consist only of two files.)
Suppose having mydomain.com/myuri, the system plugin should catch myuri, than override the content by a special content using onAfterRender.
My approach is to set some class variable within the derived plugin class to true, if the URI was hit. How can this be done, and which onEvent should be used?
Is it possible to specify another path than the classpath for the properties files of Vaadin MVP plugin?
My main objective is to try to decouple these properties files at e.g. live deployment of the product being developed.
The plugin uses ResourceBundle.getBundle(baseName, locale) internally in the ResourceBundleUiMessageSource class. This means that it only looks at the class path and you cannot specify arbitrary locations externally.
However, all source code is included with the plugin, so you can extend it to use PropertyResourceBundle. See this question for more details.
I'm using ASP.Net MVC 4 RTM Web API. I have a controller action with a parameter that I'd like to populate via custom model binding. To achieve this, I created a class that derives from System.Web.Http.Controllers.HttpParameterBinding that sets the value of this parameter. I then created an attribute class that derives from System.Web.Http.ParameterBindingAttribute which I use to decorate the parameter on my controller action.
This is all working great, my HttpParameterBinding class is populating the action parameter correctly. The problem I have is that my custom parameter binding class has a dependency that I'd like resolved via my IoC container (Unity). Is there a way to override how Web API creates HttpParameterBinding instances so that I can build up my custom binding class dependency from Unity? I was able to do something similar for a filter attribute by creating a custom filter provider that uses Unity's BuildUp method to populate dependencies, however I'm not seeing anything similar for Web API's HttpParameterBindings.
In general: to use IoC / Unity in the Web API you need to set it up seperately.
Try downloading the nuget package Unity.WebApi and see if that helps!
Take a look at this article: Parameter Binding in WebAPI
It walks through a couple different options from Converters to Binders to BinderProviders. It sounds like you may be able to write a custom ModelBinderProvider which knows how to provide your dependency. If that isn't high enough in the chain you can look at replacing the default IActionValueBinder service. It's a DefaultActionValueBinder instance, which you can extend or simply re-implement.
I also highly recommend downloading the WebAPI source code, as it's been an incredible help for these issues as I've run into them. Here's the WebAPI source code. I recommend downloading it so you can open it in VS for easy navigation.
Feel free to check out FlitBit too (It's very modular, don't let the number of packages scare you off)! I'm working on a WebAPI package for supporting FlitBit, specifically FlitBit.IoC and FlitBit.Dto. I'll add an update if I work out my IoC issue, since it's very similar to yours.