Tag Archives: howto

How To in Jdeveloper ADF Tutorials- reset the inputText component values


Sometimes the value of the inputText component is not refreshed and the value that was previously entered will still persist within the component. To overcome this issue. we have to use the resetValue() method to reset the component value and display the components intial state

What it does:

  • Get handle to the inputText component using the JSFUtils find component method with the inputText id passed as a parameter
  • set the submitted value of the inputText as null
  • reset’s the input component value
  • refresh the component
private void resetInputText(String id) { 
RichInputText input = (RichInputText)JSFUtils.findComponentInRoot(id); 
input.setSubmittedValue(null); 
input.resetValue(); 
AdfFacesContext.getCurrentInstance().addPartialTarget(input); 
}

Usage:

This method is used to reset the inputText component value’s in a popup, af:formlayout, af:table.

How To in Jdeveloper ADF Tutorials – get the selected table rows


This is a useful handy code to get the selected rows for the table.

What it does:

  • Get handle to the table using the JSFUtils find component method with the table id passed as a parameter
  • Get the selectedRowKeys for the table
  • Iterate through the rowkeys
  • Get the rowkey from the iterator
  • Add the rowkeys into a list
  • return the list to the caller

This method takes the table id as the parameter


private List getSelectedList(String tableName) {
RichTable rt = (RichTable)JSFUtils.findComponentInRoot(tableName);
RowKeySet keySet = rt.getSelectedRowKeys();
Iterator iter = keySet.iterator();
iter = keySet.iterator();
List list = new ArrayList();
while (iter.hasNext()) {
list.add(iter.next());
}
return list;
}

Usage:

This method is used to check if any rows are selected for the particular table. The method returns the rowkeys of the rows selected if there are any rows selected for the table

How to in Jdeveloper ADF Tutorials – Parameters for Jdeveloper ADF


Ever wonder what are this entries that gets added to the adf url in the addressbar like

afrWindowId=null&afrWindowMode=0&_adf.ctrl-state=qkx3a0o59

These are all the parameters for adf that to maintain the user session

_afrLoop – This is a unique identifier which is used to determine if the current window is new or not. This is used by ADF Faces Javascript. This entry is used as a token for the Loop Script

_afrWindowMode – This is a unique identifier which is used to determine if the current window is new or a dialog. This is used by ADF Faces intself to identify the mode

_afrWindowID – unique identifier assigned by the WindowIdProvider for ADF Faces to identify the current borwser window on the client and server For adf applications, ADF contoller supplies the WindowIdProvider

_adf.ctrl-state – This is the token provided by ADF controller to identify the current user state. This token is used to retrieve the user state within the task flow.

jsessionid – This is a cookie provided by the Weblogic Application server to uniquely identify the HTTP Session. This is passed as a token intially and stored in the cookie later

How to in Weblogic Tutorials – Weblogic Deploment exception


If you are getting the following exception while activating the server

then make sure that you do the following setting as well to go past.

How to in Jdeveloper ADF Tutorials – UCM connection from Jdeveloper


When you connect to ucm from jdeveloper if you face problem in connecting then its worth to check the ip filter of the ucm connection in em console.

How to in Jdeveloper ADF Tutorials- Add your own Tip


Have your own Tip in jdeveloper

if you want to add your own tip to Jdeveloper then follow

close Jdeveloper
1) go this location – ${MIDDLEWARE_HOME}\jdeveloper\jdev\doc\studio_doc\ohj\tip.jar


2) create a html file – tip_11_0460.html (just increase the number for eg : tip_11_0470.html)
3) create an image file in images folder if you want to refer this in your html tip – tip_11_0470.gif
4) have your html registered in – tip_map.smp

 <map>
 <mapID target="tip_11_0470_html" url="tip_11_0470.html"/>
 </map>

open Jdeveloper

How to in Jdeveloper ADF Tutorials- Get the taskflowBinding in the code



BindingContext bctx = BindingContext.getCurrent();

DCBindingContainer binding= (DCBindingContainer) bctx.getCurrentBindingsEntry();

DCTaskFlowBinding tf = (DCTaskFlowBinding) binding.findExecutableBinding("taskflow1");