Monthly Archives: July 2012

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.

Class Not Found exception while deploying the application


If you are getting class not found exception for a particular library upon deploying the application then check If the ‘Deploy by default’ option is checked for the library in your application.

If the library is referred in the Weblogic-application.xml then make sure that the library has to be deployed to the server. This will be referred in you Weblogic-application.xml as

<library-ref>
<library-name>adf.oracle.domain</library-name>
</library-ref>

fusion middleware doc


link to get the hosted fusion middleware doc

http://docs.oracle.com/cd/E23104_01/download_readme.htm

af:autosuggestBehavior – intro


This component in adf is used to provide a declarative way of providing suggestions for adf input components
the three main attributes are
suggestItems – mapped to a bean which returns List of SelectItems.
maxSuggestedItems – number of suggestedItems. -1 will fetch everything from the server. if the number is limited then a more link is displayed to fetch remaining items from the server
smartList – this list is added to show intial result. then the entire result from the server is fetched if no operation is done by the user

problem: I have a destination inputText which takes city/state combination. I want to implement an autosuggestbehavior for the inputText. When I enter more than three character the suggestion box should appear which City/States.

1) create an af:inputText, the value of the inputText is mapped to a managedBean to store the value that is entered by the user

<af:inputText label="Destination" id="end"
contentStyle="width: 133px;margin-left:5px;"
value="#{mapBean.dest}"/>

//managedbean code
private String dest;
public void setDest(String dest) {
this.dest = dest;
}

public String getDest() {
return dest;
}

2) now add an af:autosuggestbehavior tag to the inputText. This takes two attribute values. suggestItems and maxSuggestItems. provide maxSuggestItems as ‘5’ to display 5 values. suggestItems is bounded to the managedbean with a method ‘destination’ which returns a List of SelectItems.

<af:inputText label="Destination" id="end"
value="#{mapBean.dest}">
<af:autoSuggestBehavior suggestItems="#{mapBean.destination}"
maxSuggestedItems="5"/>
</af:inputText>

//code
public List destination(FacesContext facesContext,
AutoSuggestUIHints autoSuggestUIHints) {
//create suggestion list
List<SelectItem> items = new ArrayList<SelectItem>();
// the list should activate after three character
if(autoSuggestUIHints.getSubmittedValue().length() >= 3){
//get the binding from the pagedef
DCIteratorBinding bindings = getIteratorBinding("CityStateIterator");

OperationBinding operation = null;
String value = autoSuggestUIHints.getSubmittedValue();

if(value.contains(",")){
//executing the operation binding that will execute a viewcrtieria from ViewImpl
operation = bindings.getBindingContainer().getOperationBinding("searchByCityState");
//bind variable for city and state
String city = value.substring(0, value.indexOf(","));
String state = value.substring(value.indexOf(","), value.length());
operation.getParamsMap().put("city", city);
operation.getParamsMap().put("state", state.replace(", ", ""));
//execute the view criteria
operation.execute();
}

if (operation.getResult() != null) {
RowSet result = (RowSet) operation.getResult(); // cast to the expected result type
//the result is stored in the list
items = populateSuggestionList(items, result);
}
}
//show suggestions
return items;
}
//populate the values in a List of SelectItems
private List<SelectItem> populateSuggestionList(List<SelectItem> items,
RowSet vo) {
//populate the suggestion items
RowSet rs = vo.getRowSet();
while (rs.hasNext()) {
Row rw = rs.next();
items.add(new SelectItem(rw.getAttribute("CITY").toString().trim() + ", " + rw.getAttribute("STATE").toString().trim(),
((String)rw.getAttribute("CITY")).trim() + ", " +
((String)rw.getAttribute("STATE")).trim()));
}

return items;
}

output:

to learn more you can refer these links
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/62-autosuggestbehavior-177811.pdf
http://www.baigzeeshan.com/2010/09/using-afautosuggestbehavior-in-oracle.html

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.

ADF for Android


official support of ADF for Android is from 11.1.1.7. This is discussed in this forum.
https://forums.oracle.com/forums/thread.jspa?threadID=2414335&tstart=0