JSResponsiveLayoutContainer
Properties Summarized
CSS position is a replacement for anchoring system making it more intuitive to place a component.
Methods Summarized
Returns a JSResponsiveLayoutContainer that has the given name of this container.
Returns all JSResponsiveLayoutContainer objects of this container
Returns a JSWebComponent that has the given name that is a child of this form, layout container or responsive layout container.
Create a new responsive layout container.
Creates a new JSWebComponent (spec based component) object on the RESPONSIVE container(form , layout container or responsive layout container).
Properties Detailed
cssClasses
The css classes to be output for html tag.
Type String A space-separated string of CSS classes applied to the layout container.
Sample
layoutContainer.cssClasses = 'myContainer';
cssPosition
CSS position is a replacement for anchoring system making it more intuitive to place a component. CSS position should be set on form, an absolute position form can either work with anchoring or with css position. This is only working in NGClient.
Type CSSPosition The CSS position of the component.
Sample
var label = form.newLabel('Label', -1);
label.cssPosition.r("10").b("10").w("20%").h("30px")
Methods Detailed
getAttribute(name)
Parameters
String name the attributes name
Returns: String The value of the specified attribute, or null if the attribute is not set.
Sample
layoutContainer.getAttribute('class');
getComment()
Returns the comment of this component.
Returns: String the comment associated with this component.
Sample
var comment = solutionModel.getForm("my_form").getButton("my_button").getComment();
application.output(comment);
getResponsiveLayoutContainer(name)
Returns a JSResponsiveLayoutContainer that has the given name of this container.
Parameters
String name the specified name of the container
Returns: JSResponsiveLayoutContainer a JSResponsiveLayoutContainer object
Sample
var container = myForm.getResponsiveLayoutContainer("row1");
application.output(container.name);
getResponsiveLayoutContainers(returnInheritedElements)
Returns all JSResponsiveLayoutContainer objects of this container
Parameters
Boolean returnInheritedElements true to also return the elements from parent form
Returns: Array all JSResponsiveLayoutContainer objects of this container
Sample
var frm = solutionModel.getForm("myForm");
var containers = frm.getResponsiveLayoutContainers();
for (var c in containers)
{
var fname = containers[c].name;
application.output(fname);
}
getUUID()
Returns the UUID of this component.
Returns: UUID the UUID of this component.
Sample
var button_uuid = solutionModel.getForm("my_form").getButton("my_button").getUUID();
application.output(button_uuid.toString());
getWebComponent(name)
Returns a JSWebComponent that has the given name that is a child of this form, layout container or responsive layout container. Use findWebComponent() to find a webcomponent through the hierarchy
Parameters
String name the specified name of the web component
Returns: JSComponent a JSWebComponent object
Sample
var btn = container.getWebComponent("mycomponent");
application.output(mybean.typeName);
getWebComponents(returnInheritedElements)
Returns all JSWebComponents of this form/container. If this method is called on a form, then it will return all web components on that form. If the form is responsive, it will return the web components from all the containers.
Parameters
Boolean returnInheritedElements true to also return the elements from parent form
Returns: Array the list of all JSWebComponents on this forms
Sample
var webComponents = myForm.getWebComponents(false);
for (var i in webComponents)
{
if (webComponents[i].name != null)
application.output(webComponents[i].name);
}
newResponsiveLayoutContainer(position)
Create a new responsive layout container. The position is used to determine the generated order in html markup.
Parameters
Number position the position of responsive layout container object in its parent container
Returns: JSResponsiveLayoutContainer the new responsive layout container
Sample
var container = container.newResponsiveLayoutContainer(1);
newWebComponent(name, type, position)
Creates a new JSWebComponent (spec based component) object on the RESPONSIVE container(form , layout container or responsive layout container).
Parameters
String name the specified name of the JSWebComponent object
String type the webcomponent name as it appears in the spec
Number position the position of JSWebComponent object in its parent container
Returns: JSComponent a JSWebComponent object
Sample
var form = solutionModel.newForm('newForm1', 'db:/server1/table1', null, true, 800, 600);
var container = myForm.getLayoutContainer("row1")
var bean = container.newWebComponent('bean','mypackage-testcomponent',1);
putAttribute(key, value)
Parameters
Returns: void
Sample
layoutContainer.putAttribute('class','container fluid');
remove()
Remove a layout container (with all its children) from hierarchy.
Returns: void
Sample
layoutContainer.remove();
removeWebComponent(name)
Removes a JSWebComponent that has the specified name. Returns true if removal was successful, false otherwise.
Parameters
String name the specified name of the JSWebComponent to be removed
Returns: Boolean true if the JSWebComponent has been removed; false otherwise
Sample
var form = solutionModel.getForm('myform');
form.removeWebComponent('mybean')
Last updated
Was this helpful?