Web Projects View
Web Projects is a special view that comes with Exadel Studio. If the Web Projects view's tab is not visible next to the Package Explorer tab, select Window/Show View/Web Projects from the menu bar.
With the Web Projects view, you can:
- Visualize the project better because the project artifacts for JSF and Struts 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 and Struts projects
- Expand and inspect tag library files
- Select custom and third-party tag libraries to drag and drop onto the Exadel Palette
Project Organization
The Web Project 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 (myFaces) and a Struts project (struts) in Web Projects view.
Drag and Drop
For a Property
Expand the Resources Bundles folder that holds all the Property files in your project. Select the file from which you want do 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 Exadel Studio added the correctly formatted expression for referring to the property value: #{Message.inputname_header} automatically.
You can actually place the tag anywhere in the page, not just inside an existing tag. In this case, Exadel Studio will place the complete tag <h:outputText value="#{Message.inputname_header}"/> in the page.
For Managed Bean Attributes
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, Exadel Studio adds the correct expression, #{BeanName.attribute}.
Navigation Rules
Select the navigation rule under Configuration/faces-config.xml/Navigation Rule.
Drag and drop it inside the commandButton tag.
You could do the same if the navigation rule were defined inside an action method.
Here is how it would look after drag and drop.
For a Tag Library File Declaration
Select a TLD file.
Then drag and drop it onto the JSP page to add a declaration at the top of the page.
For JSP Pages
You can also drag and drop a JSP page path to a JSP page to create a forward as shown:
Developing the Application
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.
Expanding Tag Library Files
You can easily expand any TLD file in the project. Browse to the Tag Libraries folder. Right-click a TLD file and select Expand. The TLD file will now be expanded.
You can then select any tag and drag it onto to a JSP page.
Drag and Drop Tag Libraries on to Exadel Palette
Read Adding Tag Libraries to learn about this.
Create and Import JSF and Struts Projects
You can also create and import JSF and Struts project from Web Projects view by selecting the buttons below.
From left to right:
- Create New JSF Project
- Import JSF Project
- Create New Struts Project
- Import Struts Project