This blog will cover Oracle ADF, Weblogic, Oracle Application Server, Oracle Collaboration Suite etc....
Friday, April 20, 2012
Scrollbar
ScrollBar: For scrollbar we need to use/surround table or other components with PanelGrouplayout. Panelgrouplayout has property called layout under Apperence, set this value to scroll and you will see scrollbars.
Wednesday, April 18, 2012
PageFlowScope Variables Programmatically
AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
Map pageFlowScope = adfFacesContext.getPageFlowScope();
pageFlowScope.put("firstName","Tanveer");
pageFlowScope.get("firstName");
Map
pageFlowScope.put("firstName","Tanveer");
pageFlowScope.get("firstName");
Tuesday, April 17, 2012
Working With SelectOneChoice
One of the simpler way to work with selectone choice is as under.
1) In page definition(bindings) create an iterator from view object in executables.
2) In bindings section click on '+' and select table from list. Select the viewobject you want to deal with. Select the attributes you want to reference.
3) Now on you jsf/jsff page write below code for selectonechoice component.
4) No create Managed bean and create variable of type RichSelectOneChoice as: private RichSelectOneChoice deptName;
and generate accessors for it.
5) The selectonechoice in jsff is binded to this variable. Now you can create a button to test the value for this using below code on action
System.out.println(submType.getValue());
1) In page definition(bindings) create an iterator from view object in executables.
2) In bindings section click on '+' and select table from list. Select the viewobject you want to deal with. Select the attributes you want to reference.
3) Now on you jsf/jsff page write below code for selectonechoice component.
4) No create Managed bean and create variable of type RichSelectOneChoice as: private RichSelectOneChoice deptName;
and generate accessors for it.
5) The selectonechoice in jsff is binded to this variable. Now you can create a button to test the value for this using below code on action
System.out.println(submType.getValue());
Wednesday, March 28, 2012
Partial Trigger programmatically
In actionlister or your bean write below code
AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
adfFacesContext.addPartialTargets();
e.g. say we have two text fields it1 and it2. Set it1 autoSubmit to true and in valuechangelister give below code
AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
System.out.println("entered");
it2.setValue(it1.getValue());
adfFacesContext.addPartialTarget(it2);
AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
adfFacesContext.addPartialTargets(
e.g. say we have two text fields it1 and it2. Set it1 autoSubmit to true and in valuechangelister give below code
AdfFacesContext adfFacesContext = AdfFacesContext.getCurrentInstance();
System.out.println("entered");
it2.setValue(it1.getValue());
adfFacesContext.addPartialTarget(it2);
Tuesday, March 27, 2012
ViewObject Filtered Rows based on description / name /id
DCBindingContainer dcb = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
DCIteratorBinding iter = dcb.findIteratorBinding("EmployeeIterator");
ViewObject view = iter.getViewObject();
Row[] rr =view.getFilteredRows("lastName", "Bill");
for(int i=0;i < rr.length ; i++) {
System.out.println(rr[i].getAttribute("empid")+" "+rr[i].getAttribute("firstName")+ " "+rr[i].getAttribute("lastName") );
}
DCIteratorBinding iter = dcb.findIteratorBinding("EmployeeIterator");
ViewObject view = iter.getViewObject();
Row[] rr =view.getFilteredRows("lastName", "Bill");
for(int i=0;i < rr.length ; i++) {
System.out.println(rr[i].getAttribute("empid")+" "+rr[i].getAttribute("firstName")+ " "+rr[i].getAttribute("lastName") );
}
Monday, March 26, 2012
RowSetIterator Use
RowSetIterator is used to navigate through viewobject iterator. It also have useful operations defined in it like row.previous() etc which can be used to capture previous row.
RowSetIterator rs= viewobject.createRowSetIterator(null);
while(rs.hasNext()) {
Row row = rs.next();
if(row.getAttribute("Attr_Value").toString().equalsIgnoreCase(Comparison value.toString())){
Row prRow = rs.previous();
}}
RowSetIterator rs= viewobject.createRowSetIterator(null);
while(rs.hasNext()) {
Row row = rs.next();
if(row.getAttribute("Attr_Value").toString().equalsIgnoreCase(Comparison value.toString())){
Row prRow = rs.previous();
}}
Sunday, March 25, 2012
Iterator Row changed to change the values of respecting Attributes: Automatic PPR Initiated by the ADF Binding Layer
In Oracle JDeveloper 11g, the change event policy feature can be used to refresh UI components
automatically that are bound to an ADF binding when data has changed in the model layer. To
use this feature, you set the ChangeEventPolicy property of the ADF iterator binding and the
attribute bindings to ppr, which also is the default setting.
In pagebinding select Iterator | in properties- Advanced - Change Event Policy : select value "ppr". What will happen is the moment you select a record in table other respective attributes on UI which were pointing to individual attributes from this iterator will display the new values else not.
automatically that are bound to an ADF binding when data has changed in the model layer. To
use this feature, you set the ChangeEventPolicy property of the ADF iterator binding and the
attribute bindings to ppr, which also is the default setting.
In pagebinding select Iterator | in properties- Advanced - Change Event Policy : select value "ppr". What will happen is the moment you select a record in table other respective attributes on UI which were pointing to individual attributes from this iterator will display the new values else not.
Subscribe to:
Posts (Atom)