From jbosstools-commits at lists.jboss.org Wed Jan 26 22:54:06 2011 Content-Type: multipart/mixed; boundary="===============5719937802893759348==" MIME-Version: 1.0 From: jbosstools-commits at lists.jboss.org To: jbosstools-commits at lists.jboss.org Subject: [jbosstools-commits] JBoss Tools SVN: r28644 - trunk/jsf/docs/jsf_tools_ref_guide/en-US. Date: Wed, 26 Jan 2011 22:54:06 -0500 Message-ID: <201101270354.p0R3s6R3015228@svn01.web.mwc.hst.phx2.redhat.com> --===============5719937802893759348== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: mcaspers Date: 2011-01-26 22:54:06 -0500 (Wed, 26 Jan 2011) New Revision: 28644 Modified: trunk/jsf/docs/jsf_tools_ref_guide/en-US/managed_beans.xml Log: General Updates Modified: trunk/jsf/docs/jsf_tools_ref_guide/en-US/managed_beans.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/jsf/docs/jsf_tools_ref_guide/en-US/managed_beans.xml 2011-01-27 0= 3:41:34 UTC (rev 28643) +++ trunk/jsf/docs/jsf_tools_ref_guide/en-US/managed_beans.xml 2011-01-27 0= 3:54:06 UTC (rev 28644) @@ -1,208 +1,173 @@ - - - - JBoss Developer Studio - Eclipse - JSF Tools - Java - JBoss - - + + + + JBoss Developer Studio + Eclipse + JSF Tools + Java + JBoss + + = - Managed Beans + Managed Beans = - There is lots of power to work with managed beans. - - - Add and generate code for new managed beans - - - Generate code for attributes and getter/setter m= ethods - - - - - Add existing managed beans to JSF configuration file - - + JSF Tools provides a number of useful features when working with managed beans, such as: + + + Adding and generating code for new managed beans + + + Generating code for attributes and getter/setter methods + + + + + Adding existing managed beans to a JSF configuration file + + = - Thus, in this section we will guides you through all this possib= ilities. + This guide will look at each of these features in more detail. = -
+
= - Code Generation for Managed Beans + Code Generation for Managed Beans = - To start, create a new managed bean in JSF configuration fil= e editor, in the Tree - view. -
- Creation of New Managed Bean - - - - - -
- - Note: - When you define a new managed bean, make sure that - Generate Source Code - is checked as shown in the figure below. - -
- New Managed Bean - - - - - -
- After the - "Java" - class has been generated you can open it for addit= ional editing. There are - two ways to open the - "Java" - class: + To begin, create a new managed bean in JSF configuration file edit= or using the Tree view. +
+ Creation of New Managed Bean + + + + + +
+ + Note: + + When you define a new managed bean, make sure that Generate = Source Code option is checked as shown in the figure below. + + +
+ New Managed Bean + + + + + +
+ After the Java class has been generated you can open it for additi= onal editing. There are two ways to open a Java class: = - - - click on - Managed-Bean-Class - link in the editor - - - or - - - right click the - managed bean - and select - Open Source - - - + + + Click on the Managed-Bean-Class link in the= editor. + + + + + Right click the managed bean and select the Open Source option. + + + = -
- Opening of Created Managed Bean - - - - - -
+
+ Opening of Created Managed Bean + + + + + +
= - The generated Java source should look as follows: + The generated Java source should look as follows: = -
- Java Source Code - - - - - -
+
+ Java Source Code + + + + + +
= - You can also generate source code for properties, also inclu= des - "getter" - and - "setter" - methods. Right click on the bean and select - New > Property - . You will see Add Property di= alog. -
- Generation of Source Code for Properties - - - - - -
- When the form is open make sure that all the check boxes are= selected: - - - Add Java property - - - Generate Getter - - - Generate Setter - - - -
- "Add Property" Form - - - - - -
- Once the generation is complete, you can open the file and s= ee the added property with - - "get" - and - "set" - methods: -
- Generated Java Source Code for Property - - - - - -
- Thus, we've discussed everything which comes to creatin= g a new Managed Bean. - The next section will show you how to add an existing Bean int= o a JSF configuration - file. -
-
+ You can also generate source code for properties, also includes ge= tter and setter methods. Right click on the bean and select NewProperty= . You will then see the Add Property dialog. +
+ Generation of Source Code for Properties + + + + + +
+ When the form is open make sure that all the check boxes are selec= ted: + + + Add Java property + + + Generate Getter + + + Generate Setter + + + +
+ "Add Property" Form + + + + + +
+ + Once the generation is complete, you can open the file and see the newl= y added property with accompanying "get" and "set" meth= ods: + +
+ Generated Java Source Code for Property + + + + + +
+ + This covers the options available when creating a new Managed Bean. The= next section will show you how to add an existing Bean into a JSF configur= ation file. + +
+
= - Add Existing Java Beans to a JSF Configuration File - If you already have a Java bean you can easily add it to a <= property>JSF configuration - file. - You should start the same way you create a new managed bean.= Use the - Browse... - button to add your existing Java class. -
- New Managed Bean Form - - - - - -
- Once the class is set, its - Name - will be set as well. But you can easily substitute= it for the other one. - Notice that - Generate Source Code - option is not available as the - "Java" - class already exists. - After adding your class - Next - button will be activated. Pressing it you'll = get - Managed Properties - dialog where all corresponding properties are disp= layed. Check the necessary - ones to add them into your JSF Configuration File. + Add Existing Java Beans to a JSF Configuration File + If you already have a Java bean you can easily add it to a JSF configuration file. + You should start the same way you create a new managed bean. Use t= he Browse... button to add your existing Java class.= +
+ New Managed Bean Form + + + + + +
+ + Once the class is set, its Name will be set as wel= l. But you can easily substitute it for the other one. Notice that Generate Source Code option is not available as the Java class= already exists. = + + + After adding your class the Next button will be = activated. When you click it you will be presented with the Manag= ed Properties dialog where all corresponding properties are disp= layed. Checking the appropriate ones will add them into your JSF = Configuration File. + = -
- Selection of Bean's Properties. - - - - - -
+
+ Selection of Bean's Properties. + + + + + +
= - If you don't want to add any, just click - Finish. - Above-listed steps have demonstrated how you can specify an = existing Bean in the JSF - configuration file, i.e. - faces-config.xml. In the = next chapter - you'll know how to organize and register another kind of = artifacts. -
+ If you don't want to add any, just click the Finis= h button. + + The steps above have demonstrated how you can add an existing Bean to t= he JSF configuration file, i.e. faces-config.xml. The = next chapter will demonstrate how to organize and register other kinds of a= rtifacts. + +
--===============5719937802893759348==--