JBoss.orgCommunity Documentation
Web Projects is a special view that comes with JBoss Developer Studio.
If the Web Projects view's tab is not visible next to the Package Explorer tab, select → → → → from the menu bar.
With the Web Projects view you can:
Visualize the project better because the project artifacts for JSF and Seam projects are organized and displayed by function.
Select these kinds of items to drag and drop into JSP pages:
JSF managed bean attributes
JSF navigation rules outcomes
Property file values
Tag library files
Tags from tag libraries
JSP page links
Use context menus to develop the application (all create and edit functions are available)
Use icon shortcuts to create and import JSF projects
Expand and inspect tag library files
Section 5.2.2, “Adding Custom JSF Tags to the JBoss Tools Palette”
The Web Projects view organizes your project in a different way. The physical structure of course stays the same. The new organization combines common project artifacts together which makes it simpler to locate what you are looking for and develop.
The screen shot below shows a JSF project in Web Projects view.
The Web Projects view has a drag and drop option that can be used for property, managed bean attributes, navigation rules, tag library file declaration and JSP Pages.
Expand the Resources Bundles folder that holds all the Property files in your project. Select the file from which you want to add the property and then select the property.
We will be dragging and dropping a property file value inside the outputText tag for the value
attribute.
Select the property:
Drag the property and drop it between the quotes for the value attribute in the JSP file. Notice that JBoss Developer Studio added the correctly formatted expression for referring to the property value #{Message.header}
automatically.
You can actually place the tag anywhere in the page, not just inside an existing tag. In this case JBoss Developer Studio will place the complete tag <h:outputText value="#{Message.header}"/>
in the page.
Select a "managed bean" attribute and then drag and drop it onto the JSP page. We are going to place it inside the value
attribute of the inputText
tag.
Once again, JBoss Developer Studio adds the correct expression, #{user.name}
.
Select the navigation rule under
→ → :
Drag and drop it inside the commandButton
tag:
You could do the same if the navigation rule was defined inside an action method:
Here is how it would look after drag and drop:
Select a TLD file:
Then drag and drop it onto the JSP page to add a declaration at the top of the page:
It is also possible to develop your application right from the Web Projects view. Simply right-click any node in the tree and select an appropriate action from the context menu. For instance, this screen capture shows creating a new navigation rule.
You can easily expand any TLD
file in the project. Browse to the Tag Libraries folder. Right-click a TLD
file and select :
The TLD
file will now be expanded:
You can then select any tag and drag it onto a JSP page.
Read Section 5.2.2, “Adding Custom JSF Tags to the JBoss Tools Palette” to learn about this.