ADFUtils and AM

Hi,
I have a small query here. Say I have an AM VolumeAM which has a method Boolean callCore(String s) which is exposed as a client.
Now if we want to call this function from a backing bean, then we need to bind this method to the pagedef of the respective jsff page. However, I do not want to bind the function to the pagedef
The class ADFUtils has a functin getApplicationModuleForDataControl(String) which can give me a oracle.jbo.ApplicationModule object if we call it the following way:
ApplicationModule volAM = ADFUtils.getApplicationModuleForDataControl("VolumeAMDataControl");
Unfortunately volAM is of type ApplicationModule and not of type VolumeAMImpl.
Hence I cannot cast VolumeAMImpl volumeAMImpl = (VolumeAMImpl)volAM;
But I still want to call the method Boolean callCore(String s) which is in VolumeAMImpl.java
Is there a way using which we can do this without having to bind callCore() to the pagedef?

The way to go is definitely to bind the method to the pagedef and use the operation binding to call the method.
It's not a best practice to get the application module in a bean, do some work on the application module, as the binding layer doesn't know about it and will not reflect the changes.
If you realy want to use the am method directly you have to cast the application module to your impl class as you don't have access to the method otherwise.
If you don't want to create an operation binding in the pagedef and don't want to cast the am then you are bust.
Timo

Similar Messages

  • Is it ok to mix some non static methods in ADFUtil and JSFUtils?

    Hi
    I am new to ADF 11g. I would like someone comfirm me whether it's ok to include some non static method into ADFUtil and JSFUtil class? how this would effect the performance, and connection pool instance (too many)etc..?
    thank you very much in advance.

    This doesn't make sense as you would break any existing code using these classes. you should leaf these classes alone and use a new utility class of your own to handle your non static stuff.
    Timo

  • ADFUtils and JSFUtil do not compile

    Hi, I try to leverage these two files in my project, so I copied these two from storefront sample and rename its package name and add them into my application. I use 11.1.1.5
    However, when I deploy my app to weblogic, the compiler throws a series of compilation errores, such as:
    package javax.faces.application does not exist
    package javax.faces.component does not exist
    package javax.faces.context does not exist
    package FacesMessage does not exist
    cannot find class FacesContext
    cannot find UIComponent.
    etc.
    Obviously I missed somethings in my app. What else I should do in order to use these utility files?
    Thanks,

    In the Project Properties > 'Libraries and Classpath', What are the libraries that are currently added?
    Thanks,
    Navaneeth

  • ADFUtils JSFUtils in Jdev 11.1.2.3 on RedHat5.8

    Hello:
    I created a common code workspace as a Custom Application and added ADF Business Components. Now I want to add the ADFUtils and JSFUtils to this common code workspace.
    I copied ADFUtils and JSFUtils from the FOD Demo app and attempted to add these classes to my workspace. So I create the class and paste the source code.
    In ADFUtils, I get an import not found on:
    import javax.faces.model.SelectItem
    In JSFUtils, I get an import not found on :
    import javax.faces.application.Application;
    import javax.faces.application.FacesMessage;
    import javax.faces.component.UIComponent.
    import javax.faces.component.UIViewPort;
    import javax.faces.context.ExternalContext;
    import javax.faces.context.FacesContext;
    What am I doing wrong?
    Thanks for the help.

    You need to add the JFS 2.0 library to your project. This lib contains the needed classes.
    Timo

  • ADFUtils + JSFUtils ... how come they're not in the base JDev release?

    Hi JDev gang
    A question came up from a client the other day, is how come ADFUtils and JSFUtils that appear in many of the Oracle JDev demos aren't included in the base JDev release? They seem like such obvious things to include in a base ADF Faces/RC project and for Oracle to expand upon, yet we currently have to "steal" the code for our own projects and include them.
    What are others' thoughts on this? Do you find these 2 classes indispensable for ADF Faces/RC development?
    Cheers,
    CM.

    Ah, the ugly can of Java annotation worms. Sure you want to open it? ;)
    Personally I'd love to see annotations introduced to masively reduce the complexity of Java JSF beans, and also the Java ADF BC side.
    One of the bits I see students really struggle with when teaching JDev is the unnecessary exposed Java methods in the ADF BC classes, such as the EntityImpl getAttrInvokeAccessor, setAttrInvokeAccessor, createPrimaryKey. Beginner non Java students really can only think about objects like POJOs, they struggle when they see lots of framework code added. As such hiding the detail using annotations should in theory make this eaiser.
    Regards the backing beans and injecting the binding container, iterator etc. I note between JDev 10.1.3 when it first came out, we were injecting bindings via the faces-config.xml file. This worked badly because new users struggled with getting the config file entries exactly to match the backing bean properties and accessor names.
    Then ADFUtils + JSFUtils came along which meant no injection was required, but now people are struggling with what to cast the result to (using something like JSFUtils.resolveExpression). As they don't inherently know the binding classes, what to cast to becomes a problem. The IDE doesn't help with this at all either.
    As such with the annotation approach, this would be better as the annotation would take care of returning the correct binding classes. This would take us to the next level. Also as the IDE would inherently know which binding class, then users would be better off in understanding the binding layer classes and which methods to call thanks to the code completion facilities. Of course it means someway of associating a backing bean with a particular page such that the BB knows which binding container to get, which iterators to include etc, and if the binding names are changed in the page def, the BB would automatically change its names (I figure you'd have to do this for beginners, otherwise they'd get confused).
    However, I think there is still a need for ADFUtils and JSFUtils even with annotations because there will be times where you want to do something that isn't provided by the annotations.
    Cheers,
    CM.

  • Change rows property of ADF Table

    I am trying to set the rows property of an af:table object based on the value of a drop down box (af:selectOneChoice)
    http://img.photobucket.com/albums/v294/jammiedodgers/BrianS/Accounts-1.jpg
    I have tried this a number of ways but can't get the table to pick up the change unless I do a browser page refresh. I have the autoSubmit property of the drop down box set to true. It is bound to the rows property of my backing bean (which is also bound to the table rows property)
    af:table var="row"
    value="#{accountBacking.model}"
    rows="#{accountBacking.rows}"
    first="#{accountBacking.first}"
    banding="row"
    styleClass="table.sample"
    binding="#{accountBacking.table}"
    >
    <f:facet name="actions">
    <af:selectOneChoice id="rowChoice"
    label="Rows Per Page: "
    autoSubmit="true"
    value="#{accountBacking.rows}"
    valueChangeListener="#{accountBacking.rowChange}">
    <f:selectItem itemLabel="5" itemValue="5"/>
    <f:selectItem itemLabel="10" itemValue="10"/>
    <f:selectItem itemLabel="20" itemValue="20"/>
    <f:selectItem itemLabel="50" itemValue="50"/>
    </af:selectOneChoice>
    </f:facet
    Here is the code from by backing bean. (accountBacking)
    package com.stlouiscity.budget.jsf.beans;
    import com.stlouiscity.budget.database.beans.AccountBean;
    import com.stlouiscity.budget.database.dao.AccountDAO;
    import com.stlouiscity.budget.database.dao.DAOFactory;
    import com.stlouiscity.budget.jsf.delegates.AccountService;
    import java.util.List;
    import javax.faces.application.Application;
    import javax.faces.application.ViewHandler;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ValueChangeEvent;
    import javax.faces.model.DataModel;
    import javax.faces.model.ListDataModel;
    import oracle.adf.view.faces.context.AdfFacesContext;
    import oracle.adf.view.faces.model.SortableModel;
    import oracle.adf.view.faces.component.core.data.CoreTable;
    import oracle.adf.view.faces.event.ReturnEvent;
    public class AccountBacking implements java.io.Serializable{
    private AccountService acctService;
    private AccountBean account;
    private CoreTable table;
    private SortableModel model;
    private Integer first;
    private Integer rows;
    /** Creates a new instance of AccountBacking */
    public AccountBacking() { 
    acctService = new AccountService();
    AdfFacesContext afCtx = AdfFacesContext.getCurrentInstance();
    setFirst((Integer)afCtx.getProcessScope().get("first"));
    setRows((Integer)afCtx.getProcessScope().get("rows"));
    //afCtx.getProcessScope().clear();
    public CoreTable getTable() {
    return table;
    public void setTable(CoreTable table) {
    this.table = table;
    public SortableModel getModel() {
    if (model == null)
    refreshAction();
    return model;
    public void setModel(SortableModel model) {
    this.model = model;
    public AccountBean getAccount() {
    return this.account;
    public void setAccount(AccountBean account) {
    this.account = account;
    public void setRowData() {
    try {
    this.account = (AccountBean) this.table.getRowData();
    } catch (NullPointerException npe) {
    this.account = new AccountBean();
    public String editAccountAction() {
    setRowData();
    AdfFacesContext afCtx = AdfFacesContext.getCurrentInstance();
    if (getAccount() == null) {
    setAccount(new AccountBean());
    afCtx.getProcessScope().put("account",getAccount());
    afCtx.getProcessScope().put("first",this.table.getFirst());
    afCtx.getProcessScope().put("rows",this.table.getRows());
    return "EditAccount";
    public String deleteAccount() {
    setRowData();
    acctService.deleteAccount(this.getAccount());
    refreshAction();
    return null;
    public String refreshAction() {
    List list = acctService.getAccounts();
    ListDataModel listModel = new ListDataModel(list);
    model = new SortableModel(listModel);
    table.setValue(getModel());
    table.setRows(getRows());
    table.setFirst(getFirst());
    return null;
    public void rowChange(ValueChangeEvent event) {
    refreshAction();
    public Integer getFirst() {
    return first;
    public void setFirst(Integer first) {
    if (first != null) {
    this.first = first;
    } else {
    this.first = 0;
    AdfFacesContext afCtx = AdfFacesContext.getCurrentInstance();
    afCtx.getProcessScope().put("first",this.first);
    public Integer getRows() {
    return rows;
    public void setRows(Integer rows) {
    if (rows != null) {
    this.rows = rows;
    } else {
    this.rows = 10;
    AdfFacesContext afCtx = AdfFacesContext.getCurrentInstance();
    afCtx.getProcessScope().put("rows",this.rows);
    I am attempting to pass the rows and first property of the table into the process scope and then look them back up during the constructor. The backing bean is request scoped. I do no want to use a session scoped bean because I don't want to have to deal with thread safety.

    One thing...I use a technique mentioned in other threads to refresh the page that changes the view root to the page it is currently at. I call this after I return from a dialog: page to enact any change that the dialog page did that the current page should see. One problem here: the af:table does not seem to refresh (sometimes?), even when I put this partial target assignment in the return action listener of the button that enacted the dialog:...but I found a solution! In the life cycle I look for that view root to come up, tap into the backing bean of the current page to get the table UIComponent, and do this partial target assignment. Here is the lifecycle prepareModel code...
    String lCurrentView = fctx.getViewRoot().getViewId();
    if (PartialPageUtils.isPartialRequest(fctx)) {
    // Create an elsif for each form which has a popup you want to refresh from.
    if (lCurrentView.equals("/WPForm.jspx")) {
    CoreTable AccessoriesTable = (CoreTable)EL.get("#{WPForm.accessoriesTable}");
    AdfFacesContext.getCurrentInstance().addPartialTarget(AccessoriesTable);
    AdfFacesContext.getCurrentInstance().partialUpdateNotify(AccessoriesTable);
    super.prepareModel(ctx);
    Note: EL is a helper class that Steve M. (I think) wrote, which gets and sets ValueBindings. A similar functionality can be found in his ADFUtils and JSFUtils classes in the SRDemo app for ADFBC, downloadable from TechNet.oracle.com ...or the JDev help menu updates section.

  • Accessing view object class (impl) method from bean (or vice versa)

    Halo everyone, I am using JDeveloper 11.1.2.1.0
    I have a UsersViewImpl class with a method which refresh the user table like below.
    public void resetEmployeeSearch() {
    removeApplyViewCriteriaName("viewCriteria");
    executeQuery();
    and I have a UserBean class with a method which reset the search fields values like below.
    public void resetInput(ActionEvent actionEvent) {
    ........RichInputText = input ...
    input.setValue("");
    AdfFacesContext.getCurrentInstance().addPartialTarget(searchForm);
    I would like to implement it in such a way that, once I press a button, both methods will be called.
    I have tried to call from bean method using UsersViewImpl vs = new UsersViewImpl ..... which is wrong and wont work.
    I have read about doing something like ViewObject vo = am.findViewObject("DeptView1") but I duno how to use it because I cant have a proper example.
    Any suggestion on accessing view object class (impl) method from bean (or vice versa)?
    Or is there any way to combine both method in the same class ?
    Thank you :(

    User, if you get class not found exceptions you need to tell us which classes you can't find. The JSFUtils and ADFUtils classes needing some other libraries which should already be part of your Fusion Web Application template (which your adf application should be based on). If you did not use this application template, you may have to add some libraries yourself.
    What is the diff of using the ADFUtils and OperationBinding way?
    The ADFUtils can get you access to the application module which you then use to call exposed methods on. The disadvantage of doing this is that you have to implement your own exception framework which then handles exceptions thrown by the application module. An other thing is that if you e.g. alter a VO which you use on the page this changes are not seen on the page until you refresh the page. The binding layer does not know about these changes so the iterators (which are used on the page to show the data) are not refreshed and so you don't see the changes.
    In general you should avoid using the application modul in a managed bean method and always use the binding layer (OperationBinding) to call methods. This ensures that exceptions are all handled the same way and that changes to the data model are reflected in the GUI.
    Timo

  • Create dynamic table at runtime and bind it with ViewObject

    Hi everyone.
    I have the following task.
    I need to create a multiple ViewObjects at runtime (using different constructed sql queries) and then bind ViewObjects with created (also in runtime) tables.
    Tables are to be created on PanelTabbed component. Each tab contains one table.
    So the problem - is there a way to perform this task?
    A portion of code:
    ApplicationModule am = ADFUtils.getApplicationModule("AppModule");
    ViewObjectImpl vo = null;
    if (am.findViewObject("SQLVo") != null)
    am.findViewObject("SQLVo").remove();
    System.out.println("object removed!");
    vo = am.createViewObjectFromQueryStmt("vo", "select ...");
    RichTable newTable = new RichTable();
    newTable.setVar("row");
    newTable.setVarStatus("rowStat");
    RichShowDetailItem newDetItem = new RichShowDetailItem();
    newDetItem.setText("New Detail");
    newTable.setInlineStyle("width:100%;height:180px");
    newTable.setRowSelection("single");
    DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    String iterBindingName = vo.getName() + "Iterator";
    JUIteratorBinding iterBinding =
    (JUIteratorBinding)dcBindings.findIteratorBinding(iterBindingName);
    if (iterBinding != null) {
    dcBindings.removeIteratorBinding(iterBindingName);
    BindingContext bcc = (BindingContext)JSFUtils.resolveExpression("#{data}");
    iterBinding =
    new JUIteratorBinding(bcc.findDataControl("AppModuleDataControl"), vo);
    String ctrlBindingName = vo.getName() + "Binding";
    FacesCtrlHierBinding clonedHierBinding =
    (FacesCtrlHierBinding)dcBindings.findCtrlBinding(ctrlBindingName);
    if (clonedHierBinding != null) {
    dcBindings.removeControlBinding(ctrlBindingName);
    =======================================
    Please, look here!
    What's the best practices to create a new FacesCtrlHierBinding?
    What a parameter _nodeBindings (type JUCtrlHierTypeBinding[]) should be?
    =======================================
    clonedHierBinding =
    new FacesCtrlHierBinding(null,
    iterBinding,
    new String[]{
    "BUILDING_ID"
    // "BUILD_NAME",
    // "FUNCTIONALITY_NAME",
    // "CITY_NAME",
    // "STREET_NAME",
    // "FLOORS"
    _nodeBindings
    dcBindings.addControlBinding(ctrlBindingName, clonedHierBinding);
    newTable.setValue(clonedHierBinding.getCollectionModel());
    for (int g=0; g < vo.getAttributeCount(); g++){
    RichColumn col = new RichColumn();
    col.setId("c" + Integer.toString(g));
    col.setHeaderText(vo.getAttributeDef(g).getProperty(AttributeHints.ATTRIBUTE_LABEL).toString());
    ValueExpression valExp =
    facesContext.getApplication().getExpressionFactory().createValueExpression(facesContext.getELContext(),
    "#{row." + vo.getAttributeDef(g).getName() + "}",String.class);
    RichOutputText text = new RichOutputText();
    text.setId(vo.getAttributeDef(g).getName() + "txt");
    text.setValueExpression("value", valExp);
    col.getChildren().add(text);
    newTable.getChildren().add(col);
    newDetItem.getChildren().add(newTable);
    myBean.panelTabbed.getChildren().add(newDetItem);
    ...

    Shay, good day!
    You answer is good, but - it use only one dynamic view (and one table, iterator and FacesModel).
    I have task like topic started have - i need to create some unknows numbers of ViewObject (created by demad) and i must have a FacesModel for each created ViewObject.
    How can we do it?

  • Dynamic view object and LOV

    Here's the problem I've encountered. I need to create an input LOV, where list is taken from dynamically created view object (it is created using createViewObjectFromQueryStmt; query may be different, but it always has 3 columns with fixed names - that's the rule). The problem is quite similar to that described here: {thread:id=935344}
    I've tried to create a "stub" LOV with a query like
    select 1 ID, 1 RESULTVALUE, 'dynamic' SNAME from dual(all the queries will have 3 columns with names ID, RESULTVALUE and SNAME) and then changing it's query by using something like this
        public void recreateDynamicViewObject(String newSQL) {
            ApplicationModule am = ADFUtils.getApplicationModuleForDataControl(DATACONTROL);               
            if (am.findViewObject(DYNAMIC_VO_NAME) != null)
                am.findViewObject(DYNAMIC_VO_NAME).remove();       
            ViewObject vo = am.createViewObjectFromQueryStmt(DYNAMIC_VO_NAME,newSQL);
            vo.executeQuery();               
        }but it didn't work (with the same results as it was mentioned in the post I've given reference to - the VO changes, but the new rows are not displayed).
    My question is almost the same: is it possible to use a dynamically created VO in LOV? The option of creating a VO for each query is unacceptable in my case, because these queries in fact are created by end users, and there can be any number of these queries.
    In case it is important - I use JDeveloper 11.1.1.2.0.

    I am also looking for a similar solution.
    Actually it works partially.
    I have a created a permanent View Object with a dummy query and in the run time I am replacing the View Object query in the ProcessRequest in CO.
    My problem is when you click on the LOV it works fine with the changed query results, but when I clicked again on the LOV, it shows the the dummy query results which I gave it in the VO.
    Here is my AM method which is called in the CO.
    BOSS_Parameter1_LOV_VOImpl parameterVO =
    getBOSS_Parameter1_LOV_VO1();
    parameterVO.clearCache();
    parameterVO.executeQuery();
    System.out.println(parameterVO.getQuery());
    parameterVO.setWhereClause(null);
    parameterVO.setWhereClauseParams(null);
    parameterVO.setQuery(lovQuery); // this the dynamic query
    parameterVO.setWhereClause(null);
    System.out.println(parameterVO.getQuery());
    Even though its showing the changed query in the getQuery, the LOV is not refreshed.
    I am also changing the Query of the View Object in the ProcessFormRequest
    if (pageContext.isLovEvent() || pageContext.getParameter(EVENT_PARAM).equals("lovPrepare")) {
    call the above mentioned method in the AM.
    But, still it doesn't work.
    Any tips will be appreciated.
    Thanks,

  • How to insert  new records in Master and detail Forms.

    Hi,
    I am having trouble inserting values in both master and detail view at the same time. The scenarios is I have a Dept Table (View Object-VO1) and Employee Table(View Object -VO2) both linked with a foreign key, as per Default HR schema in Oracle DB XE.
    Now I want to insert new record in both Dept(VO1) and EMP(VO2) table via a New page say ( Page2 ). There is a button on Page1 with button INSERT .I can only drag-drop "CreateInsert" operation on that button for VO1 or VO2. So only text box for Dept records are enable to insert data but not Emp records. Is there a way I can insert data in both the tables at the sametime??
    Thanks,
    MB

    Hi MuradRabbani,
    You can programmatically call both createInsert Operations,
    Add to your pageDef both CreateInsert Operations.
    Create a button tha will call insert method from Master (VO1) and then call insert method for Detail (VO2)
    Here is an Example code of calling the operations:
    DCBindingContainer dcb = ADFUtils.getDCBindingContainer(); //you need ADFUtils.java and JSFUtils.java classes. You can find them in the sample applications in your JDeveloper.
    OperationBinding oper = dcb.getOperationBinding("CreateInsertVO1");
    oper.execute();
    -----------------NOTE: at this point you should have set values that compine the ViewLink on the master in order the detail will know where to link the new record there are many ways to do it.
    As an approach try to overrdi the create Method on the in the ViewRowImpl of your Master vo (VO1)
    e.g.
    @Override
    protected void create(AttributeList attributeList) {
    //before
    attributeList.setAttribute("NameOfAttribute", valueHere);
    super.create(attributeList);
    After that you should call the operation for your detail VO2
    e.g.
    DCBindingContainer dcb = ADFUtils.getDCBindingContainer();
    OperationBinding oper = dcb.getOperationBinding("CreateInsertVO2");
    oper.execute();
    The detail record will now have the values from your master automatically.
    Regards,
    Dimitris.

  • Hierarchy Viewer and Drag Drop

    Hi I am new for ADF Hiearchy Viewe components. I am trying drag from ADF table rows to drop ADf Hierarchy viewer node and introduce by http://docs.oracle.com/cd/E28280_01/web.1111/b31973/dv_hviewer.htm here.
    1. can get selected rows from drag source ADF rich table and I couldn't get Drop Row Key. In my source some hierarchy node work and some are not work. sourc here.
    <pre>
        public DnDAction toDropListener(DropEvent event)
            RichTable table = (RichTable) event.getDragComponent();
            Transferable t = event.getTransferable();
            DataFlavor<RowKeySet> df = DataFlavor.getDataFlavor(RowKeySet.class, "rowmove");
            RowKeySet rks = t.getData(df);
            Iterator iter = rks.iterator();
            List<Row> sourceRow = new ArrayList<Row>();
            while (iter.hasNext())
                List key = (List) iter.next();
                table.setRowKey(key);
                JUCtrlHierNodeBinding rowBinding = (JUCtrlHierNodeBinding) table.getRowData();
                sourceRow.add((Row) rowBinding.getRow());
            Transferable transferable = event.getTransferable();
            DataFlavor<Object> dataFlavor = DataFlavor.getDataFlavor(Object.class);
            Object transferableObj = transferable.getData(dataFlavor);
            if (transferableObj == null)
                return DnDAction.NONE;
            UIComponent dropComponent = event.getDropComponent();
            Object dropSite = event.getDropSite();
            if (dropSite instanceof Map)
                String clientRowKey = (String) ((Map) dropSite).get("clientRowKey");
                Object rowKey = getRowKey(dropComponent, clientRowKey);
                List<Key> keys = (List<Key>) rowKey;
                System.out.println("Row Key: "+rowKey+ " Size of Keys: "+keys.size());
                if (rowKey != null)
                    DCIteratorBinding itrEmp;
                    if(keys.size()==1)
                        itrEmp = ADFUtils.findIterator("ParentEmpTreeVO1Iterator");
                    }else
                        itrEmp = ADFUtils.findIterator("ChildEmpTreeVO1Iterator");
                    ViewObject hist=itrEmp.getViewObject();
                    Key key = keys.get(keys.size() - 1);
                    Row targetRow = hist.getRow(key);
                    System.out.println("Key: "+key);
                    System.out.println("Employee Id: " + targetRow.getAttribute("EmpId"));
                    if (sourceRow != null && !sourceRow.isEmpty())
                        for (Row row : sourceRow)
                            Row newRow=itrEmp.getRowSetIterator().createRow();//hist.createRow();
                            newRow.setAttribute("EmpId", row.getAttribute("EmployeeId"));
                            newRow.setAttribute("FirstName", row.getAttribute("FirstName"));
                            newRow.setAttribute("ManagerId", targetRow.getAttribute("EmpId"));
                            itrEmp.getRowSetIterator().insertRow(newRow);//hist.insertRow(newRow);
                            System.out.println("Created Row.");
                else
            RequestContext.getCurrentInstance().addPartialTarget(event.getDropComponent());
            return event.getProposedAction();
        private Object getRowKey(UIComponent component, String clientRowKey)
            if (component instanceof UIHierarchyViewer)
                UIHierarchyViewer hv = (UIHierarchyViewer) component;
                ClientRowKeyManager crkm = hv.getClientRowKeyManager();
                return crkm.getRowKey(FacesContext.getCurrentInstance(), component, clientRowKey);
            return null;
    </pre>
    and in hierarchy viewer added row displayed on level one for session then reload page it is ok why shot in level 1
    Where I missed? how to Selected rows assign to hierarchy viewer object? thanks juddi

    thanks for your reply shay. i am just trying to understand how a dvt HV could render in iPhone mobile browser (eg. iOS simulator) as its a part of ADF Faces components. as a part of mobile development we have only trinidad components available (not HV) and it renders in iOS simulator.
    I have tested a HV app (JDev 11.1.1.6) in Safari web browser and it works fine there. Please share your thoughts on this.
    ~Abhijit

  • Need to add row and set attribute value on pageload

    Guys,
    On my page based on the pageflowscope variable value, i need to add a row for master and one row for detail viewobject and set attribute values. (Some of the attribute are LOV and Checkboxes as well)
    I am using following code to create records.....records are being added but i am not able to set the attributes
    OperationBinding ob;
    ob = ADFUtil.findOperationBinding("Create");
    ob.execute();
    ob = ADFUtil.findOperationBinding("CreateInsert3");
    ob.execute();
    I am using following code to set the attributes value
    DCIteratorBinding dc1 = ADFUtil.getBindingIterator("firstiterator");
    DCIteratorBinding dc = ADFUtil.getBindingIterator("seconditerator");
    row1=dc1.getCurrentRow();
    row=dc.getCurrentRow();
    row.setAttribute("activest","A");
    row1.setAttribute("type","dc14");
    Anything i am doing wrong here or any suggestion to try is greatly appreciated....

    Vinod,
    Yes commit button is there and yes its also has entry in pagedef...
    When I open the same page on edit mode and i can edit regular record and save them
    Problem is that when i open the page on new mode and try to add rows on page load..... and setting values as described above.... save button somehow doesn't work...
    seems like after i add the rows on the fly, i need to refresh the binding?
    any help is greatly appreciated....
    thank you guys

  • CreateInsert problem: different data to see and to commit

    Hi,
    I have edit.JSFF with master and detail tables. Master allows only edit and detail for insert and delete detail records.
    There are two iterators.
    There is button to create to create new record in detail table. This button sets some binding variables, gets current row from master table, does createInsert on detail table and fill some attributes of detail from master record. Then continues by action to insert.JSFF to provide data for insert to user.
    If detail table is emty, everything works fine but when I insert second row insert.JSFF shows data from previously inserted row even I set different data by method.
    Insert and edit.JSFF have same iterator and operations.
    I don't know how it is possible.
    Thanks for help

    I haven't demo schmea implementaion.
    [EditForm binding|http://www.upnito.sk/imggal.php?viewImage=e33223a9f832cd26914989beb6fa0190]
    [NewForm binding|http://www.upnito.sk/imggal.php?viewImage=f1e3423d97bda8e3e1de50f319b03b4c]
    [Part of taskflow from edit master/detail to new detail form|http://www.upnito.sk/imggal.php?viewImage=d7abd38833ca76650aefbf928aff7ed8]
    There is snipped of actionNewSubTask method called as action on button NEW
    public String actionNewSubTask() {
    BindingContainer bindings = ADFUtils.getBindings();
    DCIteratorBinding dciter = (DCIteratorBinding)bindings.get("TaskViewParTaskTypeIdEx1Iterator");
    Row currentRow = dciter.getCurrentRow();
    log.info("Task name: " + currentRow.getAttribute("TaskName"));
    //executeOperation("CreateInsert");
    log.info("ADFUtils.executeOperation (before execution): CreateInsert");
    BindingContainer bindings = getBindings();
    OperationBinding method = bindings.getOperationBinding("CreateInsert");
    if (method != null){
    log.info("method: CreateInsert found in bindings: " + bindings.getName());
    method.execute();
    log.info("ADFUtils.executeOperation (after execution): CreateInsert");
    if (method.getErrors().isEmpty()) {
    return true;
    } else {
    log.severe(Method: CreateInsert missing in bindings: " + bindings.getName());
    BindingContainer bindings = ADFUtils.getBindings();
    DCIteratorBinding dciter = (DCIteratorBinding)bindings.get("TaskView6Iterator");
    Row subTaskcurrentRow = dciter.getCurrentRow();
    // copy data from parent task
    log.info("Task name: " + subTaskcurrentRow.getAttribute("TaskName"));
    subTaskcurrentRow.setAttribute("TaskName", currentRow.getAttribute("TaskName"));
    log.info("Task name: " + subTaskcurrentRow.getAttribute("TaskName"));
    subTaskcurrentRow.setAttribute("TtTypeIdFk", currentRow.getAttribute("TtTypeIdFk"));
    subTaskcurrentRow.setAttribute("ItemNumber", currentRow.getAttribute("ItemNumber"));
    subTaskcurrentRow.setAttribute("DueDate", currentRow.getAttribute("DueDate"));
    return "actionNewSubTask";
    Log information shows correct data but in form shows something different :(
    Log infromation in "CreateInsert" part:
    <ADFUtils> <executeOperation> ADFUtils.executeOperation (before execution): CreateInsert
    <ADFUtils> <executeOperation> method: CreateInsert found in bindings: jsf_fragments_tasks_contentEditTaskPageDef_WEB_INF_taskflow_task_flow_tasks_content_xml_task_flow_tasks_content
    <ADFUtils> <executeOperation> ADFUtils.executeOperation (after execution): CreateInsert

  • How to correctly use adfUtils.waitForServer()?

    I used PMD to check OATS automation scripts code. The quick fix automatically added adfUtils.waitForServer() to my scripts. But when i run scripts, it got stuck at this method. Anyone knows what's wrong?
    Example:
    adfUtils.waitForServer();
    web.window("/web:window[@index='0']").navigate(url);
    The time is out before the URL is entered.

    Do only use System Update if you have problems with a driver or Thinkvantage Tool - feature.
    In my company we never used System update and the laptops are running without any changes (except Windows update) since 5 to 6 years. So i have removed TVSU from all computers.
    System Update is a very excellent tool after a clean install from a Windows CD/DVD to install all Lenovo drivers and tools you want to use. A disadvantage of cyclic updates via System Update is, that parts of old drivers in most cases will be kept because the newer driver will be installed over the old one in most cases, which leads after several updates to an instability of the system.
    Just my private opinion...
    My home-forum: http://www.thinkpad-forum.de
    Wiki: Deutsches ThinkPad-Wiki English ThinkWiki
    My ThinkPad-Collection

  • Application partitioning and scalability questions

    I split my application into dozen or so jars...
    1) Original project had ADF BC BaseClasses overridden... Any way to "share" them now among projects?
    2) How to handle common java files to all projects such as JsfUtil, AdfUtil?
    3) Common resource files, png's
    4) Jdev 11.1.2: How can I exclude folder from jar deployment (test jsfs)? Don't see any filter options on deployment profile ?
    5) What do you guys do with common EO, VO, lookups as far as sharing or will each project have to have own copy?
    6) How can I minimize number of database connections?
    Thanks,
    Brian

    +1) Original project had ADF BC BaseClasses overridden... Any way to "share" them now among projects?+
    Put them into a JAR file and configure them in the JDev preferences for ADF BC.
    +2) How to handle common java files to all projects such as JsfUtil, AdfUtil?+
    WLS shared libraries if you want to maintain a single deployment. Otherwise use a JAR and add them to each project
    +3) Common resource files, png's+
    See sample 86 on http://www.oracle.com/technetwork/developer-tools/adf/learnmore/index-101235.html#CodeCornerSamples
    +4) Jdev 11.1.2: How can I exclude folder from jar deployment (test jsfs)? Don't see any filter options on deployment profile ?+
    Check the project source settings and remove the folder
    +5) What do you guys do with common EO, VO, lookups as far as sharing or will each project have to have own copy?+
    Depends on the use case. If it is common for an application you can use Shared AM to avoid each session to create its own instance. If its about sharing the code therein, use ADF libraries for cross application use
    +6) How can I minimize number of database connections?+
    Use AM pooling, avoid too many root AM, use DataControl sharing on bounded task flows
    Frank

Maybe you are looking for