This topic describes common tasks that you can perform with components. For more detailed
information, click the links in the right column.
To perform this task...
Follow these steps
Add a binding attribute to a JSF component
Right-click the component.
Choose Add Binding Attribute.
Add a component to a Visual Web JSF page
Ensure that the page is open in the
In the
select the type of component to add
by clicking the corresponding category.
Double-click the component or drag the component to the Visual Designer and drop it.
Add a category to the palette
If necessary, open the
by choosing Window > Palette.
Right-click any category and choose Create New Category.
In the New Palette Category dialog box, enter a name for the category.
Add a table
Add, use, change, rename, or delete code clips
Align components
In the
hold down the Shift key and select the components to align.
Right-click the last component selected and choose Align > alignment-command .
Bind default component property
Right-click the component you want to bind and choose Bind to Data .
In the Bind to Data dialog box, choose whether to bind to an object or bind to a data
provider.
Choose the target to which you want to bind the property.
Bind general component properties
Right-click the component you want to bind and choose Property Bindings .
In the Property Bindings dialog box, choose the property to which you want to bind
from the list on the left side.
Choose the target to which you want to bind the property from the list on the right
side.
Delete a component from a Visual Web JSF page
In the
or
select the component to delete.
Right-click the component and choose Delete.
Remove a component library
Edit component CSS styles (change appearance of a component on a page)
In the
click the component.
In the
Properties window , click the ellipsis button (...) next to the style
property.
The Style
Editor opens.
Choose categories from the list on the left side of the editor.
Set the styles for the categories that you want to apply to the component.
Review the changes to the component in the Visual Designer.
Click OK to apply all the settings to the component's style property.
Edit a style sheet
In the
under the project-name > Web Pages > resources node,
double-click stylesheet.css
(the default style sheet) or any other CSS
file in the directory.
In the CSS Editor , edit
the style sheet.
From the main menu, choose File > Save.
Handle component events
In the
click the Java button in the editor toolbar.
Add the Java code for your event handler to the methods.
As you type, the
Java Editor offers suggestions for code completion, including potential methods
and instance variables for objects you refer to.
You can also position the cursor on an item for which you need information and type
Ctrl-Shift-Space to view Javadoc documentation.
Import new components
Nest components
In the
drag the component on top of the component in which it should nest .
Preview pages
Remove a binding attribute from a JSF component
Right-click the component.
Choose Remove Binding Attribute.
Select a single component
In the
or in the
click the component.
Select multiple components
There are several techniques:
In the
or in the
click each component while holding down the Control key.
In the Navigator window, click the first item in the list, then hold down the shift
key and click the last item in the list. All components in between are selected.
In the Visual Designer, click and hold the mouse button down, then drag the mouse to
enclose fully all the items to select.
Set component properties
In the
or in the
select the component.
In the
Properties window , set the properties .
Set CSS styles
In the
click the component.
In the
Properties window , click the ellipsis button (...) next to style.
Choose a Style Editor category from the list on the left side of the editor.
Select style settings related to the category to the right of the list of categories.
When you have finished, click OK to apply the styles.
Set page layout
In the
click the page background so you can see the Page properties.
In the
Properties window , select the value for Page
Layout .
Set tab order
In the
or the
select the component.
In the
Properties window find the tabindex
property under the Accessibility
section and enter the tab index number.
Set the grid
Choose Tools > Options on Microsoft Windows or UNIX systems, or choose NetBeans
> Preferences on Macintosh systems.
Click Miscellaneous tabons button and then the Visual Web tab.
Enter the new Grid Height and Grid Width in the corresponding field. Use the
checkboxes to set whether to Show Grid or Snap to Grid. .
Snap components to the grid
In the
select the item.
Right-click and choose Snap To Grid .
Stack components
Use a style sheet
In the
click the page.
In the
Properties window , click the ellipsis button (...) next to Style Sheet .
Enter the file name and location.
View a page at different resolutions
View and zoom an image
In the
double-click an image to display it in the editor.
Use the toolbar that appears in the editor to enlarge or shrink the image.