How to bind UI component to a view object which is created from a SQL query

I am using JDeveloper 11.1.1.2.
I created a method in my ApplicationModule to create an instance of ViewObject dynamically based on a "voCode" passed in :
public ViewObject loadVO(String voCode) {
ViewObject viewObject = findViewObject(voCode);
if (viewObject == null) {
viewObject = createViewObject(programCode);
return viewObject;
I created a Client interface for this method and refreshed the data control of the ApplicationModule.
From the "Oracle JDeveloper 11g Handbook", I should be able to create a tree binding and a methodIterator executable for the "loadVO" method via the data control of the AM.
I tried to add the binding manually to the page definition of my jspx page as I like to see if I can replace an existing binding with this new binding.
I was not able to add the binding as the "Create Tree Binding" required both the "Root Data Source" and "Tree Level Rules" to be specified.
I could specify the "Root Data Source" to point to the "loadVO" and corresponding parameter but not able to add any rule.
When I clicked on the "+" icon to add rule, nothing happened that allowed me to specify the rule (if I know what rule I need to add).
How should I bind the application module method "loadVO" so that it can be exposed in the Data Control to provide the data for a UI component like dynamic table?
On the other hand, I could create the "methodIterator" first for the AM method "loadVO" but I wasn't able to create a tree binding to reference the "methodIterator".
Is it possible to invoke the loadVO method with specific parameter value via the "methodIterator" from a bean method?
Edited by: pyin_amec on Jan 25, 2010 3:57 PM
I corrected the subject line and change my question to better reflect the problem I tried to solve.
Edited by: pyin_amec on Jan 26, 2010 7:41 AM

Hi,
This worked for me .. I created a inputtext area where I can enter a query and execute ..
Hope it helps..
AM Impl
     public void createVoWithQuery( String pQuery )
          ViewObjectImpl vo = null;
          if( findViewObject( "DemoVo" ) != null )
               findViewObject( "DemoVo" ).remove();
          vo = ( ViewObjectImpl )createViewObjectFromQueryStmt( "DemoVo", pQuery );
          //  vo.setKeyAttributeDefs( new int[]{0} );
          vo.executeQuery();
     @Override
     protected void prepareSession( Session session )
          super.prepareSession( session );
          if( findViewObject( "DemoVo" ) == null )
               createViewObjectFromQueryStmt( "DemoVo", "Select 1 from dual" );
     }Page Def
<executables>
    <variableIterator id="variables">
      <variable Type="java.lang.String" Name="createVoWithQuery_pQuery" IsQueriable="false"/>
    </variableIterator>
    <iterator Binds="DemoVo" RangeSize="25" DataControl="AppModuleDataControl"
              id="ViewObj1Iterator" Refresh="deferred"/>
  </executables>
  <bindings>
    <tree IterBinding="ViewObj1Iterator" id="ViewObj1">
      <nodeDefinition Name="Dummy">
      </nodeDefinition>
    </tree>
    <methodAction id="createVoWithQuery" RequiresUpdateModel="true" Action="invokeMethod"
                  MethodName="createVoWithQuery" IsViewObjectMethod="false"
                  DataControl="AppModuleDataControl"
                  InstanceName="AppModuleDataControl.dataProvider">
      <NamedData NDName="pQuery" NDType="java.lang.String"
                 NDValue="${bindings.createVoWithQuery_pQuery}"/>
    </methodAction>
    <attributeValues IterBinding="variables" id="pQuery">
      <AttrNames>
        <Item Value="createVoWithQuery_pQuery"/>
      </AttrNames>
    </attributeValues>
  </bindings>page
<af:panelStretchLayout id="psl1" startWidth="0" topHeight="100px" bottomHeight="0">
          <f:facet name="center">
            <af:table rows="#{bindings.ViewObj1.rangeSize}"
                      fetchSize="#{bindings.ViewObj1.rangeSize}"
                      emptyText="#{bindings.ViewObj1.viewable ? 'No data to display.' : 'Access Denied.'}"
                      var="row" rowBandingInterval="0"
                      value="#{bindings.ViewObj1.collectionModel}"
                      selectedRowKeys="#{bindings.ViewObj1.collectionModel.selectedRow}"
                      selectionListener="#{bindings.ViewObj1.collectionModel.makeCurrent}"
                      rowSelection="single" id="t1" partialTriggers="::cbEx">
              <af:forEach items="#{bindings.ViewObj1Iterator.attributeDefs}" var="def">
                <af:column headerText="#{def.name}" sortable="true" sortProperty="#{def.name}"
                           id="c1">
                  <af:outputText value="#{row[def.name]}" id="ot1"/>
                </af:column>
              </af:forEach>
            </af:table>
          </f:facet>
          <f:facet name="bottom"/>
          <f:facet name="top">
            <af:panelFormLayout id="pfl1">
              <af:inputText value="#{bindings.pQuery.inputValue}"
                            label="#{bindings.pQuery.hints.label}"
                            required="#{bindings.pQuery.hints.mandatory}"
                            columns="60"
                            maximumLength="#{bindings.pQuery.hints.precision}"
                            shortDesc="#{bindings.pQuery.hints.tooltip}" id="it1" rows="2">
                <f:validator binding="#{bindings.pQuery.validator}"/>
              </af:inputText>
              <af:commandButton actionListener="#{bindings.createVoWithQuery.execute}"
                                text="ExecuteQuery"
                                disabled="#{!bindings.createVoWithQuery.enabled}" id="cbEx"/>
            </af:panelFormLayout>
          </f:facet>
        </af:panelStretchLayout>

Similar Messages

  • How many view object instances can create from Single Entity ?

    Hi All,
    JDev Ver : 11.1.1.5
    I want to How Many view objects can i create from the single entitiy ?
    Is there any limit ?
    Thanks,
    Gopinath

    No, there is no limit

  • How to set Where clause in the View Object of the MessageChoice ?

    Hi,
    How to set Where clause in the View Object of the
    MessageChoice ?
    Example:
    <bc4j:rootAppModuleDef name="EdEscolaCampusView1AppModule"
    definition="ed00050.Ed00050Module"
    releaseMode="stateful" >
    <bc4j:viewObjectDef name="EdEscolaCampusView1" >
    <bc4j:rowDef name="CreateEdEscolaCampusView1" autoCreate="true" >
    <bc4j:propertyKey name="key" />
    </bc4j:rowDef>
    </bc4j:viewObjectDef>
    <bc4j:viewObjectDef name="ListaTipLocalView1"
    rangeSize="9999">
    </bc4j:viewObjectDef>
    </bc4j:rootAppModuleDef>
    </bc4j:registryDef>
    messageChoice declaration:
    <bc4j:messageChoice name="SeqTipoLocalCampus"
    attrName="SeqTipoLocalCampus"
    prompt="Local do Campus">
    <contents>
    <bc4j:optionList attrName="SeqTipoBasico"
    textAttrName="NomTipoBasico"
    voName="ListaTipLocalView1"/>
    </contents>
    </bc4j:messageChoice>
    I would like set where clause of ViewObject, with dinamic parameters (using attribute1 = :1), before populate messageChoice.
    thanks...
    Danilo

    Hi Andy,
    I try set a where clause using the message:
    Set where Clause parameter using UIX , but my UIX Page have 2 messageChoice's of different ViewObject's, then I need implement this Java Class:
    //Nome da Package da Tela Detail
    package br.com.siadem.siaed.ed00050;
    // Importa as Bibliotecas necessárias
    import oracle.jbo.ViewObject;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.client.Configuration;
    import oracle.cabo.servlet.BajaContext;
    import oracle.cabo.servlet.Page;
    import oracle.cabo.servlet.event.PageEvent;
    import oracle.cabo.servlet.event.EventResult;
    import oracle.cabo.data.jbo.servlet.bind.*;
    import oracle.cabo.ui.data.BoundValue;
    import oracle.cabo.ui.data.DataBoundValue;
    import javax.servlet.http.HttpServletRequest;
    import br.com.siadem.siaed.util.*;
    import javax.servlet.http.Cookie;
    import oracle.cabo.data.jbo.def.NestedAppModuleDef;
    import oracle.cabo.data.jbo.def.ViewObjectDef;
    import oracle.cabo.data.jbo.def.AppModuleDef;
    // Classe que configura os parametros para a execução da Query,
    // utilizando variáveis de Sessao
    public class FunPreQueryLista
    public static EventResult FunConfiguraQuery(BajaContext context, Page page, PageEvent event) throws Throwable
    // TrataDadosSessao - Classe utilizada para retornar os valores das variáveis de sessão genéricas
    // Ex: CodCliente, CodMunicipio etc...
    TrataDadosSessao varDadosSessao = new TrataDadosSessao();
    // 1o. Parametro Configurado - Através da classe TrataDadosSessao, utilizando um método Get
    // <alterar>
    String valor1 = varDadosSessao.getCodCliente();
    String valor2 = varDadosSessao.getCodMunicipio();
    //Cria o objeto que retorna o ApplicationModule
    ApplicationModule am = ServletBindingUtils.getApplicationModule(context);
    // Início das Configurações da Query da Lista
    //Cria o objeto que retorna o view object da lista desejada
    //alterar
    ViewObject TipoLocal = am.findViewObject("ListaTipoLocalView1");
    //Configuração dos parametros definidos na query do view Object
    //alterar
    TipoLocal.setWhereClauseParam(0,valor1);
    TipoLocal.setWhereClauseParam(1,valor2);
    // Executa a Query
    TipoLocal.executeQuery();
    // Fim das Configurações da Query da Lista
    // Início das Configurações da Query da Lista
    //Cria o objeto que retorna o view object da lista desejada
    //alterar
    ViewObject TipoDestLixo = am.findViewObject("ListaDestinoLixoView1");
    //Configuração dos parametros definidos na query do view Object
    //alterar
    TipoDestLixo.setWhereClauseParam(0,valor1);
    TipoDestLixo.setWhereClauseParam(1,valor2);
    // Executa a Query
    TipoDestLixo.executeQuery();
    // Fim das Configurações da Query da Lista
    // Retorna o Resultado para a Página
    return new EventResult(page);
    The code works very well...
    And, I'm sorry for my two repost's in UIX Forum about this in a few time.
    Thank very much...
    Danilo

  • Get bind variables of a dynamic view object

    I seem unable to retrieve the bind variables for a dynamically created view object, even though I can do the same thing for a regular view object.
    Here is the code:
    newVO = repServ.createViewObjectFromQueryStmt("newQry",strSql);
    VariableValueManager vvm = newVO.ensureVariableManager();
    if (vvm != null)
    Variable vars[] = vvm.getVariables();
    vars will be empty, even though the sql statement in strSql has bind variables in it.
    Is there any way to determine the bind variables of a dynamic view object?
    Thanks!

    I got the same problem as yours and still could not find any way out.
    However, as I can see, you wanted to get VariableValueManager of newly created ViewObject that may be not available at this moment.
    If you find way to solve the problem, please help.
    Cheer,
    MinhTran

  • How to bind Links Detail Button to an object?

    Hi,
    As per the WebCenter Dev Guide, we can create link from "Any object to which you bind the custom JSF components, such as the Links Detail Button".
    How to bind Link Details Button to an object?
    TIA

    maple_shaft wrote:
    Each object has a unique id associated to it. One can retrieve that id string from an object by calling the toString() method, as long as this method hasn't been overridden from its default behavior.and if it has System has a method to help you.
    But it is not quite a unique id. It might be, but a different JVM could implemented it as "return 1" and it would still technically satisfy the contract.
    As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)

  • How to delete sotware component,SWCV and all objects under SWCV

    Hi All,
    how to delete sotware component,SWCV and all objects under this SWCV. Since i have imported all the SWC, SWCV and all interface , mapping object. I want to delete all these imported objects and re import these objects again. Please let me know how to do that.
    Thanks in advance.
    Kalpana

    You will have to delete all the objects under the namespace (then activate the changes), then delete the namespace and then finally delete the SWCV !!
    More ref this latest thread on the same subject: how can i delete software component in the IR

  • Filter view object by selected values from list of values

    Hello,
    I've the following problem with my ADF Application. I have three view objects in my application module. Two of them are connected via a view link. For example take users, who are connected to their departments. The remaining view object consists of factories. Now I want to show the user/department dependency in a tree table and the available factories in a list of values. This list of values should be used to filter the shown users.
    I've already tried to use bind variables in the users view object. But I don't know how to fill them with the value of the list of values.
    Can someboy give me a tip how to solve this problem.
    Best regards,
    Enno

    Hi Enno,
    Try this:
    - Have a AM method with one parameter(which takes user from the list of values) and inside AM method write code to set the bind parameter value and execute the query
    Sample Code
    public void filterByUser(String user){
       //Get your UserViewObject instance to userVO
       userVO.setNamedWhereClauseParam("<Bind_Variable_Name>", user);
       userVO.executeQuery();
    }- Expose the method as client interface
    - Drop the method (Data Control) as a button on to the page and pass the listofvalues value as a value to the method binding param
    Something like this: ${bindings.<User>.inputValue}
    - Finally refresh the master and detail tables based on the ListOfValues selection by setting partialTriggers property to the listofvalues component id
    Hope it is clear
    Sireesha
    Edited by: Sireesha Pinninti on Oct 15, 2009 4:54 AM

  • 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

  • How can i update rows  in a table based on a match from a select query

    Hello
    How can i update rows in a table based on a match from a select query fron two other tables with a update using sqlplus ?
    Thanks Glenn
    table1
    attribute1 varchar2 (10)
    attribute2 varchar2 (10)
    processed varchar2 (10)
    table2
    attribute1 varchar2 (10)
    table3
    attribute2 varchar2 (10)
    An example:
    set table1.processed = "Y"
    where (table1.attribute1 = table2.attribute1)
    and (table1.attribute2 = table3.attribute2)

    Hi,
    Etbin wrote:
    Hi, Frank
    taking nulls into account, what if some attributes are null ;) then the query should look like
    NOT TESTED !
    update table1 t1
    set processed = 'Y'
    where exists(select null
    from table2
    where lnnvl(attribute1 != t1.attribute1)
    and exists(select null
    from table3
    where lnnvl(attribute2 != t1.attribute2)
    and processed != 'Y'Regards
    EtbinYes, you could do that. OP specifically requested something else:
    wgdoig wrote:
    set table1.processed = "Y"
    where (table1.attribute1 = table2.attribute1)
    and (table1.attribute2 = table3.attribute2)This WHERE clause won't be TRUE if any of the 4 attribute columns are NULL. It's debatable about what should be done when those columns are NULL.
    But there is no argument about what needs to be done when processed is NULL.
    OP didn't specifically say that the UPDATEshould or shouldn't be done on rows where processed was already 'Y'. You (quite rightly) introduced a condition that would prevent redo from being generated and triggers from firing unnecessarily; I'm just saying that we have to be careful that the same condition doesn't keep the row from being UPDATEd when it is necessary.

  • How to process each records in the derived table which i created using cte table using sql server

    I want to process each row from the CTE table I created, how can I traverse from first row to second row and so on....
    how to process each records in the derived table which i created using  cte table using sql server

    Ideally you would be doing a set based processing rather than traversing row by row as thats more efficient. To answer it specific to your scenario we may need more info. Can you explain with some sample data your exact requirement?
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Re: How to converting from PL/SQL query to T-SQL query

    How to converting from PL/SQL query to T-SQL query... Its Urgent

    Download the
    SQL Server Migration Assistant for Oracle.  It will convert whole Oracle databases, or single queries or PL/SQL stored procedures.
    With caution that If your database is using Collation which is case sensitive SSMA will not work.SSMA doesnt guarantees 100% for conversion of Queries/stored proc /database if it fails to do so for some queries you will have to do it manually.
    But you can try
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • How to get object which is created previously?

    Hi ,
    My question is that how to get reference of the object which is created previously using reflection API.
    that means,
    suppose i created one instance of class : ABC
    Class classAbc = Class.forname("ABC"); //load the class ABC.
    Object abcClassObject =classAbc.newInstance(); // create an instance of classABC.
    now how do i retrieve that object which is referred by ref. variable abcClassObject?
    expecting a favourable reply,
    Thanks & regards ,
    Swapnil

    My question is that how to get reference of the object which is created previously using reflection API.
    Object abcClassObject =classAbc.newInstance(); // create an instance of classABC.
    now how do i retrieve that object which is referred by ref. variable abcClassObject?abcClassObject is already a reference to it. Just use it. Nothing further required.

  • How to change the default behaviour of View Object in oracle adf

    Hi,
    I have created a view object from an entity object and placed it as a table with multiple lines on my page.
    When I run my page, by default, it loads all the rows based on the sql in the VO.
    My requirement is when I load my page, I don't want to return any data in that table.
    I am using JDeveloper 11.1.2.4.
    Please can you advise how can I achieve this functionality?
    thanks
    Muhammad

    Hi Shay,
    I've used  the refreshCondition #{bindings.Sku.inputValue ne null} as per your suggestion but getting below error
    <RichExceptionHandler> <_logUnhandledException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6
    java.lang.NullPointerException
        at oracle.adf.model.binding.DCExecutableBinding.refreshMasters(DCExecutableBinding.java:265)
        at oracle.adf.model.binding.DCExecutableBinding.refreshIfNeeded(DCExecutableBinding.java:340)
        at oracle.jbo.uicli.binding.JUCtrlHierBinding.getRootNodeBinding(JUCtrlHierBinding.java:90)
        at oracle.jbo.uicli.binding.JUCtrlHierBinding$1JUCtrlHierHintsMap.internalGet(JUCtrlHierBinding.java:210)
        at oracle.jbo.common.JboAbstractMap.get(JboAbstractMap.java:54)
        at oracle.adfinternal.view.faces.model.binding.FacesCtrlHierBinding$1DecoratedHintsMap.internalGet(FacesCtrlHierBinding.java:305)
        at oracle.jbo.common.JboAbstractMap.get(JboAbstractMap.java:54)
        at javax.el.MapELResolver.getValue(MapELResolver.java:164)
        at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
        at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
        at com.sun.el.parser.AstValue.getValue(Unknown Source)
        at com.sun.el.ValueExpressionImpl.getValue(Unknown Source)
        at org.apache.myfaces.trinidad.bean.FacesBeanImpl.getProperty(FacesBeanImpl.java:73)
        at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer.getProperty(BaseColumnRenderer.java:1195)
        at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer.layoutHeader(BaseColumnRenderer.java:643)
        at oracle.adfinternal.view.faces.renderkit.rich.table.BaseColumnRenderer.encodeAll(BaseColumnRenderer.java:152)
        at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1681)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
        at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
        at oracle.adfinternal.view.faces.renderkit.rich.table.BaseTableRenderer.layoutColumnHeader(BaseTableRenderer.java:1197)
        at oracle.adfinternal.view.faces.renderkit.rich.TableRenderer.encodeAll(TableRenderer.java:636)
        at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
        at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:617)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1681)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
        at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:447)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$1500(PanelGroupLayoutRenderer.java:30)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:734)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:637)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
        at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:360)
        at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1681)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
        at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeFormItem(PanelFormLayoutRenderer.java:1127)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.access$100(PanelFormLayoutRenderer.java:50)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1604)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer$FormColumnEncoder.processComponent(PanelFormLayoutRenderer.java:1523)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
        at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer._encodeChildren(PanelFormLayoutRenderer.java:420)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelFormLayoutRenderer.encodeAll(PanelFormLayoutRenderer.java:208)
        at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1681)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
        at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer._encodeChild(PanelGroupLayoutRenderer.java:447)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.access$1500(PanelGroupLayoutRenderer.java:30)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:734)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer$EncoderCallback.processComponent(PanelGroupLayoutRenderer.java:637)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:187)
        at org.apache.myfaces.trinidad.component.UIXComponent.processFlattenedChildren(UIXComponent.java:318)
        at org.apache.myfaces.trinidad.component.UIXComponent.encodeFlattenedChildren(UIXComponent.java:283)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelGroupLayoutRenderer.encodeAll(PanelGroupLayoutRenderer.java:360)
        at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1681)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
        at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
        at oracle.adf.view.rich.render.RichRenderer.encodeStretchedChild(RichRenderer.java:2194)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer._renderPane(PanelSplitterRenderer.java:1599)
        at oracle.adfinternal.view.faces.renderkit.rich.PanelSplitterRenderer.encodeAll(PanelSplitterRenderer.java:279)
        at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1681)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
        at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
        at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
        at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:274)
        at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1681)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:624)
        at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:3201)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:641)
        at oracle.adf.view.rich.render.RichRenderer.encodeAllChildrenInContext(RichRenderer.java:3062)
        at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1275)
        at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1452)
        at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:511)
        at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:923)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1681)
        at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1677)
        at oracle.adfinternal.view.faces.component.AdfViewRoot.encodeAll(AdfViewRoot.java:91)
        at com.sun.faces.application.view.JspViewHandlingStrategy.doRenderView(JspViewHandlingStrategy.java:431)
        at com.sun.faces.application.view.JspViewHandlingStrategy.renderView(JspViewHandlingStrategy.java:233)
        at org.apache.myfaces.trinidadinternal.application.ViewDeclarationLanguageFactoryImpl$ChangeApplyingVDLWrapper.renderView(ViewDeclarationLanguageFactoryImpl.java:350)
        at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
        at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:273)
        at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:165)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:1035)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:342)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:236)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:509)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:125)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
        at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
        at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
        at java.security.AccessController.doPrivileged(Native Method)
        at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
        at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
        at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
        at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
        at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:139)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    any ideas please?

  • BC4J: Question on bind variables and DML in view objects

    Hello,
    I have a view object with a bind variable in the WHERE clause of the underlying query. I'm curious about how the state of this bind variable affects the use of the view object for inserting, updating, etc., at various stages of the commit cycle (before posting changes, after posting changes, after commit).
    Specifically, what happens in the following scenarios?
    1. The bind variable is not bound (and the query has not been executed) and a row is inserted into the VO
    2. The bind variable is set to some value and an inserted or updated row in the VO does not meet the criteria specified by the bind variable; the transaction is then committed
    If there is a weblog entry, help file, or HOWTO somewhere, I'd welcome a link to it.
    Thanks,
    Alan

    The variable would only come into play when the VO's query is executed. It can be executed implicitly -- for example, accessing the first() row if the query hasn't been executed yet -- or explicitly by a call to executeQuery().
    By setting setMaxFetchSize(0) on your VO, no rows will be fetched and you can use the VO for insert only.

  • Bind a variable in a View object

    i built a new ADF application and i need to use the user in the where clause of the SQL of the view objects, the applicaton users aren't database users so i can't use the 'user' variable in the SQL. i know how to get the user as above
    Expression Language
    <af:outputText value="#{facesContext.externalContext.userPrincipal.name}"/>
    Managed / Backing Bean
    ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();
    String userName = ectx.getUserPrincipal().getName();
    System.out.println("Current user: " + userName);
    ADF BC Application Module
    String userName = getUserPrincipalName();
    System.out.println("Current user: " + userName);
    but i don't know how to use it in the SQL of the VO??
    Appreciate any help

    Hello,
    Yes a bind variable is the correct way.
    Maybe these steps will help you:
    1) Create a viewobject with the bindparameter
    2) On the page you need to call it, rightclick the page and select goto pagedef.
    3) Select the STRUCTURE window, select BINDINGS
    4) right click, Select insert inside, action
    5) select the viewobject you need to query, select EXECUITEWITHPARAMS as method, it will show your bind variable, put: "#{facesContext.externalContext.userPrincipal.name}"
    6) now in the STRUCTURE window, select EXECUTABLES
    7) right click, select insert inside, invokeAction
    8) give it some name and for BINDS select the action you just created, mose likely named executeWithParams, goto advanced properties and select refresh=always
    Now each time the page is loaded the query will execute.
    -Anton

Maybe you are looking for