Showing posts with label JDeveloper 10g. Show all posts
Showing posts with label JDeveloper 10g. Show all posts

Monday, February 23, 2009

10G : How to get a comma-separated list of clients by doing a multi-select from an LOV dialog?

Steps to get a comma-separated list of clients by doing a multi-select from an LOV dialog:


Step-1: go to faces-config.xml


Step-2: Search Page: Add search.jspx and create the page where you have an input box and a command button


Step-3: LOV Dialog Page: Add lov.jspx and create a page
a. drag and drop the view from datacontrol palette to add an ADF table .

b. through the table facets->selection of af:table in the structure pane, add the af:tableSelectMany .

c. through the table facets->action of af:table in the structure pane, add a command button for the table .


Step-4: Using the ADF Dialog Framework: Inside the faces-config, add a jsf navigation case from the search page to the dialog, when the action is dialog:lov


Step-5: Inside the search.jspx, add
a. partialTriggers="commandButton1" property for the input text box (InputText1)
b. action="dialog:lov", partialSubmit="true", returnListener="#{backing_search.returned}", useWindow="true" properties for the commandButton (commandButton1)




Step-6: Inside the backing bean search.java, add the following code to enter the returned value into the text box:







action="#{backing_lov.submit_action}"


Step-7: Inside the lov.java (backing bean), enter the following code for the submit_action method

This code will require some missing imports to be added so it works correctly.


Step-8: Inside the lov.jspx, for the commandButton, add the action property

10G : How to deploy the ADF Application ?

Steps for Deployment the ADF Application(seperatly....Model & ViewController) on the server(OAS)::

Step-A: Create DataBase Connection(Optional for test):-

Step-1 : StepPut the CONNECTION_NAME
Step-2 : Put USER NAME & PASSWORD (Of that schema where DataBase exist)
Step-3 : Put Host Name(ex. neel.yahoo.com ), Port(1521), SID(webdb).
Step-4 : Test the Connection OK


Step-B: Create Application server:-

Update the Host_File(RUN- Drivers>etc>Hosts) (Add the IP ADDRESS of the server and address of the server in the last of the file) (ex. 67.170.188.135 neel.yahoo.com neel.eal neel)

Step-5 : Put the connection name(ex, VenusAppSvr)
Step-6 : Put USER NAME & PASSWORD(of the server)
Step-7 : Put Host Name(ex. neel.yahoo.com ), OPMN_Port(5003), oc4j_Instance_Name(ex, Home)
Step-8 : Test the connection OK



ViewController:-

Step-C: WAR file creation :--

Step-9 : Right click on ViewController.
Step-10: Select New from Context Menu.
Step-11: In NEW GALARY select, General>Deployment Profile> WAR File.
Step-12: Give the Name...ex.webAPp1
Step-13: Select Radio Button(Specify Project J2ee web context Root).
Step-14: put...web context root of app(ex, webroot1)
Step-15: Select Prfile Dependencies,
Step-16: Check all the options of ViewController.jpr. OK


Step-D: EAR file creation :--

Step-17: Right click on ViewController.
Step-18: Select New from Context Menu.
Step-19: In NEW GALARY select,
Step-20: General>Deployment Profile> EAR File.
Step-21: Give the Name...ex.Application1
Step-22: Go to Application asembly,
Step-23: check all the conents under ViewController.jpr OK


Step-E: Deploy:-

Step-24: Right Click on the EAR File and Deploy on the Application server.

Tuesday, February 3, 2009

10G : How To Create Search and Results on the Same Page

Step-1 : To create a page that has both a search form and results table on the same page, you follow the procedures for when they are on separate pages, except you must create a separate iterator for the results table.

Step-2 : To create a search form and results table on the same page:

Step-3 :From the Data Control Palette, drag a collection and from the context menu, select Forms > ADF Search Form.For example, if you want the query to execute over all service requests, you would drag the ServiceRequests collection.

Step-4 : Drag the same collection, but this time drop it as any type of table.

Step-5 : Open the associated page definition file.

Step-6 : In the Structure Pane, right-click on the Executables node and choose Insert inside
executables > invokeAction.

Step-7 : In the Insert invokeAction dialog, enter an ID for the action, such as AlwaysFind. From the Binds drop-down list, select Find. Do NOT click OK or close the dialog.

Step-8 : In the Insert invokeAction dialog, select the Advanced Properties tab.

Step-9 : For RefreshCondition, enter the following EL expression, which tells the application to invoke this action whenever the page is not in Find mode. Replace with the name of the iterator:${bindings..findMode == false}Note:The invokeAction must appear before the iterator, so that it is executed first.

Step-10 : In the Structure Pane, right-click on the Executables node and choose Insert inside executables > iterator.

Step-11 : Select the same collection used for the search form, and in the Iterator ID field enter a more meaningful name, such as ResultsIterator and click OK.

Step-12 : In the Structure Pane, expand the bindings node, right-click on the binding for the results table, and choose Properties.

Step-13 : In the Table Binding Editor dialog, make sure the correct collection is selected in the Data Collection column.

Step-14 : Select the newly created iterator from the Iterator drop-down list, ensure that all correct attributes are in the Display Attributes column, and click OK.

Step-15 : In the JSF page, delete the Find button.

Step-16 : Doing this only deletes the component from the JSF page। The binding still exists in the page definition file.