Error using groovy to fill the transient attribute

Hello

I wrote this function in my custom extension of ViewObjectImpl
    public String getRecordStatusDesc(oracle.jbo.domain.Number status) {
        if (status.equals(-1)) {
            return "New";
        } else if (status.equals(0)) {
            return "OK";
        } else {
            return "Unknown";
        }
    }
And I want to use it to fill a transient field in my display object. I use this code as the groovy expression
adf.object.getRecordStatusDesc(OpStatus)
The RS of the attribute is defined as oracle.jbo.domain.Number, as shown in this excerpt of the file XML of the entity object depends on the view object
  <Attribute
    Name="OpStatus"
    IsNotNull="true"
    Precision="1"
    Scale="0"
    ColumnName="OP_STATUS"
    SQLType="NUMERIC"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    TableName="OPERATIONS">
    <DesignTime>
      <Attr Name="_DisplaySize" Value="22"/>
    </DesignTime>
    <Data>
      <Property
        Name="ID"
        Value="390789de-0123-1000-8158-c0a8380116d6::::EntityObjectAttribute"/>
    </Data>
  </Attribute>
But when I run with the tester of business components, I get this error
(oracle.jbo.JboException) JBO-29000: Unexpected exception caught: groovy.lang.MissingMethodException, msg=No signature of method: 
com.test.extensions.TestViewRowImpl.getRecordStatusDesc() is applicable for argument types: (java.lang.Long) values: [-1]
Can someone tell me what I am doing wrong? I use 11g r1

Hello

ADF. Object returns the instance of ViewObjectRowImpl not an instance of viewobjectImpl, try using viewObject

Sample:

((CustomViewObjectImpl) viewObject) .getRecordStatusDesc (OpStatus)

Jean Lou

Tags: Java

Similar Questions

  • ADF ViewObject. Fill the transient attribute on ExecuteQuery

    Hi all

    I use Jdev 12.1.3.0

    I have a requirement to display the link within the cell of the column. and there is a chance that there may be multiple links in a single cell at a time.

    I get the table data (spacer) string, separated, if there are several links in a chain.

    Is it that I anticipate, create a transitional attribute and process data and fill attribute (spacer) transient data separated in the table list. And use this as an entry for the iterator to display in the cell of the column.

    But I'm not sure where to implement the that runs as soon as the execution of query.

    Please suggest.

    Thank you

    Vieira

    Hi user,

    You need not transitional attribute.

    Let's say that your attribute delimited by spaces of db table have the name 'space_separated_attr_from_DB '.

    First, create a managed bean property (say, iterTest), with type ArrayList, as follows:

    public ArrayList getIterTest(){
          // get  space separated attribute value:
          FacesContext ctx = getFacesContext();
          Application app = ctx.getApplication();
          ValueBinding bind = app.createValueBinding("#{row.space_separated_attr_from_DB}");
          String space_separated_attr = (String)bind.getValue(ctx);
        // now, parse space_separated_attr, store in the ArrayList, and return as method result:
        return some_parsed_ArrayList; // you know...
    }
    
    private ArrayList listTest = new ArrayList();
    
    public void setIterTest(ArrayList listTest){
          this.listTest = listTest;
    }
    

    Then place new column in the af: table, as follows:

    
            
                   
            
    
    

    This way, you'll have a commandLink for each word of space_separated_attr_from_DB

    Here is how this looks to the execution time:

  • Hide the line of adf table based on the transient attribute does not

    I have a JSF page where the user can insert new line in View object . this View object contains a transitional attribute which indicates whether or not the record is newly created.

    On the same page, I have a table adf which is bounded on the city view object . This table should show only newly created records. my approach is to use expression language of in the renditions property to hide all the other lines that are not newly created. I changed the render property for the columns of the table as: rendered="#{row.bindings.RowStatus.inputValue eq'new'}" , but the table does not show anything.

    Then, I tried to change the made not for the column property, but to the outputText inside the same way. It worked, but the problem is that the blank line is always on display.

    So, basically because I do not hide the entire line, instead I'm hiding the text in the lines and lines with spaces empty is still on display in the page aside.

    The Table of JSF page where the made property is applied on outputText inside the column:

    <af:table value="#{bindings.UplodedFilesView1.collectionModel}" var="row"
      rows
    ="#{bindings.UplodedFilesView1.rangeSize}"
      binding
    ="#{CreatSR_UserBean.fileTable}">

      
    <af:column sortProperty="#{bindings.UplodedFilesView1.hints.FileName.name}"
      headerText
    ="File Name" id="c1">

      
    <af:outputText value="#{row.bindings.FileName.inputValue}" id="it1"
      rendered
    ="#{row.bindings.RowStatus.inputValue eq'new'}"/>

      
    </af:column>

      
    </af:table>

    I use Jdeveloper with ADF technology 11.1.2.3

    Thanks Timo,

    You are right. Its to late to hide lines after stamping in the row set. I solve the problem by filtering the view object, based on the transitional attribute in the section of liaison page. The steps as follows: (assuming that the object from view with the temporary attribute has been created, and the transient attribute contains the filtered values)

    1. Drag the view object on the page and also make the Table (in my case it might otherwise listen)
    2. On the page, go to the connection tab.
    3. Double-click the object desired in the links column.
    4. New window will appear titled with (change the binding tree)
    5. Check the option (enable filtering)
    6. Select the (filter attribute) and (filter value) for the selected filter attribute.
    7. Select (Display attribute) you want to appear in the page.
    8. Press OK
  • HO to calculate the average in the Transient attribute?

    Hi experts,

    I created a transitional attribute in the employee table to calculate the average skills employee.
    Am able to get the sum of skills but dono how to calculate the average. Please help me in this problem.

    code to calculate the sum is

    public getEmpOverallRating() number + {+
    RowIterator comp = getEmpSkillView();
    Number sum = new Number (0);
    + all in (comp.hasNext ()) {+
    sum = sum.add ((Number) comp.next () .getAttribute ("Ratting"));
    +}+
    to return the sum;
    +}+

    Thanks in advance,
    Knockaert

    Set the default value of the transient attribute to type of expression with a value like SkillView.avg ("Rating") where SkillView is the VO.

  • How to add the transient attribute for LOV (object of the view read-only)

    I have a view called CustomerView and attribute DepartmentId is present in it.

    Also exists DepartmentView and CustomerView.DepartmentId has an LOV from this point of view.

    I need to add a transient attribute to CustomerView which express the DepartmentName attribute in the LOV.

    Because of the view are read-only there is no entity object don't match them.

    How can I write the groovy for the transitional object expression.

    The name of the view accessor Lov's DepartmentView1

    Looking for your help. Thank you.

    Hi gcoban

    I do not understand your question correctly,

    you are not able to write to the expression property in viewObject?

    or you want to know how to write groovy for that?

    for writing groovy you need viewAccessor and you who have, you can try as Alejandro Tovar Lanz suggested

    or you can write code in RowImpl to fill in the name of the Ministry of the accessor

    See -https://blogs.oracle.com/adf/entry/combo_lov_how_to_display

    Thank you

  • Create the Script to fill the SimpleDisplayName attribute Active Directory Exchange

    Hello

    I want to implement the use of SimpleDisplyNames in my Exchange 2010 environment. After my research, I can see that, if the SimpleDisplayName attribute is enabled and left empty it just goes to show the SMTP address for the external recipients. so to say that I need a way to fill all current users SimpleDisplayName attributes with their Displayname and I'll manually change a few users who have to be modified.

    My question is, can someone help me with something of a powershell script that can run through all AD and make the change for me? I want them all have their display name (first and last) in the LEAGUE.

    Thanks in advance

    Greetings,

    That answer. Microsoft.com Community Forum is very focused on consumers.  Your question might get a better response from the IT professionals on the Microsoft TechNet site, at http://forums.technet.Microsoft.com of if you would care to after the same survey here.  You can file it under the section Active Directory or Windows IT Pro.

  • Problem of calculation the sum in the Transient attribute

    Scenario is,

    I have a form master detail. I want to make the sum of the Quantity column of the secondary table. I have visited many blogs for this tutorial.

    I made view accessor in detail in VO. Master then transitional attribute default Value Master VO, I set value Expression such as DetailViewAccessor.sum ("Qty")

    When I run BCJ4 tester. Transient attribute shows all the total instead of the current detail record. in tutorials they showed her work:)

    J Dev Version 11.1.2.4

    I did it. No need to create to display the details of Accessor.of to the master.  I used ViewLink accessor between master and detail as pictured

    then, by default value transient expression attribute, I wrote ShpContractDView.sum("Qty"), Inseated to the create view accessor.

    It is a success and Trail for me Ashish and Timo please tell me the concept behind what I did?

  • Disabled property stripping does not work with the transient attribute

    Dear gurus,

    I have 2-attributes on page .jspx off including 1-is transient attributes with the default SQL and another column in the db table. I turn off the property for the two field whose appearance and usability are the same during development but showing a different behavior when running. Please find the attributes and the images.

    ApprovalStatus attribute is db-table column and AdfCreatedname is a transient with SQL as default attribute and appearance are different from db table column.

    < af:inputText value = "#{bindings." ApprovalStatus.inputValue}.

    label = "#{viewcontrollerBundle.APPROVAL_STATUS} '"

    required = "#{bindings." ApprovalStatus.hints.mandatory}.

    columns = "#{bindings." ApprovalStatus.hints.displayWidth}.

    maximumLength = "#{bindings." ApprovalStatus.hints.precision}.

    shortDesc = "#{bindings." ApprovalStatus.hints.tooltip}.

    Binding = "#{backingBeanScope.backing_ProposalSearch.IT10}" id = 'it10' "

    labelStyle = "' make-weight: Bold" disabled = "true" > "

    < f: validator binding = "#{bindings." ApprovalStatus.validator} "/ >"

    < / af:inputText >

    < af:inputText value = "#{bindings." AdfCreatedName.inputValue}.

    label = "#{bindings." AdfCreatedName.hints.label}.

    required = "#{bindings." AdfCreatedName.hints.mandatory}.

    columns = "#{bindings." AdfCreatedName.hints.displayWidth}.

    maximumLength = "#{bindings." AdfCreatedName.hints.precision}.

    shortDesc = "#{bindings." AdfCreatedName.hints.tooltip}"id ="it35.

    disabled = "true" labelStyle = "' make-weight: bold;" > "

    < f: validator binding = "#{bindings." AdfCreatedName.validator} "/ >"

    < / af:inputText >

    Development-image

    development.JPG

    Picture of the production

    running.JPG

    kindly let me know what I need to make changes. Please help me out.

    Kind regards

    MD Jahangir Pasha

    Hello

    I think that your transient 'AdfCreatedName' attribute has updatable property was never in your ViewObject.

    Set it to always get the same look as your attribute of "approval status".

    Kind regards

    Ruben.

  • Panel request: hide the transient attributes

    Hello

    I have an EmpVO that has a transitional attribute to say lets say for example age. I want to display on the page. This page is a panel request also with "Add", more fields dropdown. I don't want to display my age transitional attribute in the query Panel or adding drop-down fields.

    When I put the suspicion of display to hide in the indicators of control of the view at the age attribute, object, the value is NOT coming in the page. ID, I say 'Display' is 'also' showing in the query Panel.

    My Version of JDev

    -----------------------------------------------------

    Studio Edition Version 11.1.1.7.0

    Build JDEVADF_11.1.1.7.0_GENERIC_130226.1400.6493

    JDK1.6

    Thank you

    Murali.

    Hello

    Check this: https://tompeez.wordpress.com/2012/01/06/jdev-afquery-hide-some-attributes-from-query-panel-but-show-them-in-the-result-table/

    Arun-

  • Error using App Builder and the Application Loader

    Hello

    We have created for many App App Builder before and after the release of v27 we tried to put a couple of App update so we get in the App Designer, under the v26 version to v27 (has not changed anything else!) and rebuild the application. Now, we want to use the Application Loader to download the App on iTunes Connect, but whenever we receive this message:

    "The binary being analyzed must be an executable: /var/folders/9x/.../..._v27_distribution-viewer.zip/viewer.app/viewer.

    We are rebuilding the application several times, updated the App Builder but nothing works. Anyone have an idea?

    Concerning

    Sven

    You are using Mac OS X 10.6.8 or earlier? If so, it is probably the problem. We always try to know that if it's something the team of DPS App Builder control on. Until they learn, the best approach is to use a computer with Mac OS X 10.7 or later to install the loader app (available on a connection, iTunes link), copy or download the .zip file and download it. Alternatively, update your machine to use Mac OS X 10.7 or higher. I'll let you know when I find more information.

  • Error while using any tool in Photoshop "could not use tool the___ ("fill in the blank with any tool") because the channel of the target is hidden".

    I'm working in Photoshop CC, but when I try to use the tools I get this message:

    "Could not use the___ tool ("fill the void with any tool ") because the target channel is hidden."

    Why I get this message? I haven't hidden all channels.

    Anyone know?

    Thank you.

    Hi snow,

    See this thread: 'Could not move tool use because the channel of the target is hidden'

    Kind regards

    Claes

  • VO extension: Transient attributes not getting seeds not filled

    Hi gurus,

    I expanded VO by adding two additional columns (questioned). Even if the new columns and surveyed existing columns are coming fine on the page, the calculated columns return null.

    Calculated columns are populated in the VORowImpl code seeded of the VO seeded. I'm missing something here?

    see you soon

    Anish.

    Hi Anish,

    If the transient attributes will be populated in the VORowImpl, you must copy the logic in the extended VORowImpl or call the same method using super.

    ex: -.

    Standard VORowImpl

    public String getAttribute1()
    {
       return "Calculated Value";
    }
    

    VORowImpl extended

    public String getAttribute1()
    {
        super.getAttribute1();
    }
    

    See you soon

    AJ

  • Programatically set passivate = true on a transient attribute

    Hello

    Generate us the xml viewDef data programmatically and must assign passivate = true on a transitional attribute. No idea how to do this?

    Jdev version - 11.1.1.7.2

    Thank you

    R

    How to create your Def VO? You can use the ViewDefImpl.setPassivationMode () method to set the mode of passivation at the level of the VO. For example, you can set the mode of passivation to "Passivation, including all of the transitory values" by invoking the following:

    this.setPassivationMode (PASSIVATE_TRANSIENTS_TOO);

    If you want only some of the transient attributes, passivation, so if you add a custom property to the AttributeDefImpl (s) corresponding with name equal to ViewObjectImpl.XML_ELEM_PASSIVATE_TRANSIENT and one value other than 'false', the framework will passivate these transient attributes:

    attrDef.setProperty (ViewObjectImpl.XML_ELEM_PASSIVATE_TRANSIENT, "true");

    Take a look at the method undocumented scope of package ViewAttributeDefImpl.isPassivatableTransientAttribute () for more details.

    Dimitar

  • How to change the default message for the required attribute of the entity?

    Hello

    I use JDeveloper 11 g 11.1.1.5

    Is it possible to modify a commit message by default on the attribute of the required entity? I don't want to show the user something more useful than VO and the name attribute.


    Anatolii

    Hello
    You can open the respective OS.
    Open the business rules and then select the required attribute and click the Edit option and write your custom message
    on the Management window of failure on the error message section.

    Thank you
    Sumit Yadav

  • Check if there is a transient attribute in 10.1.2

    Hi good ppl

    We have an old application using BC4J - 10.1.2 and noticed that [AttributeDef] doesn't have the isSelected() method that could help me to differentiate the transient attributes. Is there a solution for this? I need to isolate the transient attributes from the rest, without test manually by report name (if another developer adds a transient attribute tomorrow, I can't wait for the change must be made in all the places where we test "is TransientAttribute").

    Thank you...
    K

    Hello!

    You can use AttributeDef.getAttributeKind (). If the byte returned is AttributeDef.ATTR_TRANSIENT the attribute is transitional.

    Sascha

Maybe you are looking for