Groovy expression to set the current row

Hi!!
I am using jdeveloper 11.1.1.5
I had GlJrnlHd in which i have the following attributes
GjhYear , GjhPeriod
year - Transient Attribute with the following querry
SELECT fp_year FROM fin_periods WHERE fp_bu = :p_bu AND TRUNC(GJH_JRNL_DATE) BETWEEN fp_from_date AND fp_end_date
period - Transient Attribute with the following querry
SELECT fp_period FROM fin_periods WHERE fp_bu = :p_bu AND TRUNC(GJH_JRNL_DATE) BETWEEN fp_from_date AND fp_end_date
Now i need to set
GjhYear = year
GjhPeriod = period
How can i perform this

Your question is not clear.
What is GlJrnlHd ? VO?
From where attributes GjhYear , GjhPeriod coming from? Query?
Now i need to set
GjhYear = year
GjhPeriod = periodWhat do you want to set them as? Default value? Fill all the rows with these values?
You will get an answer sooner when you provide some example data , queries along with your question.
-Arun

Similar Messages

  • How to set the current row in table automatically when tabout from one row to next row

    Hi
    I'm using jdev 11.1.2.0.0
    How can we set the  row(in which row focus is)  as current row in the table?
    If we create a table with single row selection, then whichever row we select, that row becomes current row because of the selection listener(#{bindings.xxvo.collectionModel.makeCurrent}).
    Then if we do tabout from one component to another component in table and moved to next row, then the focus would be on another row .
    when focus is shifted from one row to another row, then how can we make the focused row as current row or selected row.
    Any suggestion would we appreciated
    Thanks.

    Add clientListener inside table component and set client listener type to dblClick with method as a JavaScript method name.
    <af:clientListener method="dblclk" type="dblClick"/>

  • Setting the Current Row

    I've put together a simple Spry Repeat List navigation w/ a
    detail region for content, and defined .hover and .selected classes
    so that when each row is clicked it highlights.
    My question is this: how can I make the default row highlight
    when the page is first loaded?
    Thanks.

    Marcel,
    You should be able to add a <set> in a compund event handler like this:
    <set property="currentRowIndexInRange" target="${data.yourPageUIModel.yourViewNameIterator}" value="${theValueYouWantToSetItTo}"/>
    Regards,
    Dan Schiff

  • Maintain the current row position of a table after refresh.

    Hi,
    I use a poll to refresh tables continuously. when a table is refreshed, the current referring row is reset.
    To maintain the current row position after a refresh I use the following poll method.
    public void refreshTableT1(PollEvent pollEvent) {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ValueBinding dcb = fctx.getApplication().createValueBinding("#{bindings}");
    DCBindingContainer bindings1 = (DCBindingContainer) dcb.getValue(fctx);
    DCIteratorBinding dciter = bindings1.findIteratorBinding("<VOIterator>");
    if(dciter!=null){
    if(dciter.getCurrentRow()!=null){   
    Key current_row_key = dciter.getCurrentRow().getKey();
    dciter.executeQuery();
    if(current_row_key!=null){
    try{
    dciter.setCurrentRowWithKey(current_row_key.toStringFormat(true));
    }catch(Exception ex) {
    System.out.println("Exception in current_row_key");
    }This works for normal tables well. But when I use it to master-detail tables (pair of tables) it does not.
    At the master-detail tables, before the first data fetch, it works well. if we go below the first data fetch, it sets the current row into another position.
    how can I overcome this...??
    Thanks,
    Dinuka.

    Hi Mr.Frank,
    I have an association in two VOs.
    for example: There are 2 tables called Emp and Dept. Every Department has Employees. so there is an association (both tables have a common column). Master table is the Dept table. when you click on one record of the Dept table Detail table will show the details of the employees belongs to that selected department. That's what I referred as master-detail tables. first one is master table; second one is detail table.
    When the web page loads all the table data is not fetched from the db (it will depend on the fetch size). when we scroll down the table data fetch happens again and again.
    think my data fetch size is 25 rows per time.
    Suppose we use mine poll method and think I have clicked on the 20 ^th^ row of table1(master table). then the table2 will display details belongs to selected department. that is OK even after refresh. that works well.
    when I go to 30 ^th^ row data fetch will happen (my fetch size = 25)
    when I click on the 30 ^th^ row of the table1(master table), table2 will display details belongs to selected department. but after the poll method is called the selected row at the table1 disappears and is set to another position. now the 30 ^th^ row is not in the 30 ^th^ position. but it is the selected row and table2 displays correct details.
    I think you have got the problem now. :D
    Thanks a lot.
    Dinuka.

  • Change the current row in an iterator and reflect the change on page

    Hi there,
    I have a jspx with a creation form created as usual draging and droping the data control. In same page, I inserted a commandButton which ActionListener executes a method in a managed bean called validate(). Through such a method what Im trying to do is to fill the form with data from specified entry of the database if certain condition is true. I know it is kinda twisted but unfortunately is the requirement for the page.
    So basically in "validate" method, if the condition I mentioned is reached, I do the following:
    // execute a Rollback (included in Page Definition) in order to cancel the previous auto-invoked "Create".
    FacesContext context = FacesContext.getCurrentInstance();
    Application app = context.getApplication();
    BindingContainer bindings =(BindingContainer)app.getVariableResolver().resolveVariable(context,"bindings");
    OperationBinding opBinding = bindings.getOperationBinding("Rollback");
    opBinding .execute();
    //get the iterator and asociated VO from the binding container
    ValueBinding vb = app.createValueBinding("#{bindings.AccountsVOIterator}");
    DCIteratorBinding dciter = (DCIteratorBinding) vb.getValue(FacesContext.getCurrentInstance());
    ViewObject view = dciter.getViewObject();
    //and set the current row with the specified entry I have mentioned above.
    Object keyValues[] = new Object[2];
    keyValues[0] = "1"; keyValues[1] = "98543";
    Row[] row = view.findByKey(new Key(keyValues),1);
    AccountsVpnVORowImpl client = (AccountsVpnVORowImpl)row[0];
    view.setCurrentRow(client);
    view.executeQuery();
    dciter.setCurrentRowWithKey(client.getKey().toStringFormat(true));
    dciter.executeQuery();
    opBinding = bindings.getOperationBinding("Execute");
    opBinding.execute();
    All this works perfectly when I debbug it but I cannot see the changes in the page(even refreshing browser). I need that when such a condition is met, the creation form turns into a modify-specific entry form, filling all fields with the specific data in order user can modify it, and all in the same page.
    Any clue?
    Thanks so much in advance for your time.

    Hi,
    I could see the problem with call to executeQuery and execute methods at the end of your method which re-sets the current row.
    Once you set the current row you should not call execute or executequery methods. Try removing those calls and also make sure that you have added partialTriggers property on the table is set to commandbutton id and partialSubmit property is set to true on commandButton to refresh the table partially on click of a button
    Sireesha

  • Setting the current in an ADF table via click

    Hi,
    I have created a HTML table in a jsp by dragging a DataControl from the DataControl Palette. Can I set the current row by clicking a table row?
    Thank you for any Information!
    Simon

    hi,
    take a look at this thread
    how to get a pagination dropdown inside an ADF Faces Rich Client Table ?
    Timo

  • Get the icon for the current row selected

    Hi !!
    I am using jdeveloper 11.1.1.5
    I had dragged and dropped my ApplBusFunVO as a af:tree
    My Output will look like this
    Supplier Balance
    Supplier Document Details
    Purchase order
    Purchase ReceiptsMy af:tree doesnt contains the Parent
    My Scenario:
    When my user clicks the current node of the tree!! an icon should appear before the current node is selected
    For Eg: If my user clicks the Purchase Order then my output should like this
    Supplier Balance
    Supplier Document Details
    ==>Purchase order
    Purchase ReceiptsThe Symbol ==> Represent the icon! that appears before the purchase order!!

    Hi
    <af:tree value="#{bindings.SalesPeople.treeModel}" var="node"
              selectionListener="#{bindings.SalesPeople.treeModel.makeCurrent}"
              rowSelection="single" id="t4" fetchSize="35">
              <f:facet name="nodeStamp">
                 <af:group>
                      <af:image id="cl3" source="#{reference_to_image_url}"
                      rendered="#{check_if_current_row}"/>
                      <af:outputText id="ot2" value="#{node}"/>
                 </af:group>
       </f:facet>http://docs.oracle.com/cd/E23943_01/apirefs.1111/e12419/tagdoc/af_image.html
    As mentioned in a previous answer to this very same question, the tree is a stamped component which means that you need to partially refresh the tree component to show the icon. You can us the selectionListener (override the current setting to use a managed bean setting the current row - calling the same EL) to determine the new selected row key and then use the rendered option to determine (using a managed bean reference) if the current rendered node (#{node} is accessible from a managed bean at render time) is the selected node.
    The side effect is that upon tree node selection the tree will "flicker"
    Frank

  • Is there a way to make the current row not editable

    Hi, I'm using JDev 11.1.1.2
    In my usecase I have a Form , navigateable with next/previous , and for every row a I have a calculation which makes the row editable or not.
    For now I made it with disabled property on every input component set to some bean property which is calculated every time.
    My question is if there is some general way to make an Entity not updateable ?
    I tried with doDML() ... but the problem there is that this method is not called when switching the current row but rather when commiting. So the user can modified several rows and when pressing commit it will prevent some of the to be committed which would be confusing.
    Is there a method in the ViewObject that i can overwrite which is called every time the current row is changed? So I can see if the row was modified or not.
    Thanks, agruev

    Yes, there is always isAttributeUpdateable() in the ViewRowImpl, which you can override and enable/disable your attributes based on an enabling/disabling condition.
    Here is an example:
    public boolean isAttributeUpdateable(int i) {
    boolean updateable = false; /disable by default all arguments
    // enable, if your condition is met
    if ( meets_your_condition )
    updateable = super.isAttributeUpdateable(i); // let the framework decide based on your declarative settings
    return updateable; // return true/false indicator
    Nick

  • Issue in finding the current row

    I am rendering rows of a VO using an iterator component. One of the component I am rendering is a declarative component created by me.
    In this component there is a clickable link on which i can write any method to achieve desired functionality.
    Since, iterator is used so the current row is set to the last row. Now on clicking the link in the declarative component i need to do some operation based on the current row (pk of that row). So, how to find the current row id?
    Note: If it would be a simple adf component like a commandLink i could have inserted a setServerListener inside it and could have put the id in to requestScope to access it. But as this is the declarative component in which i cannot create a serverListener so I am looking for some other solution.

    Hi john,
    My table have the selection listener.
    Thanks in advance

  • Differentiating the current Row

    Hi
    I am using Jdeveloper 9.0.5.1. All my pages are designed in UIX.. My client is asking me to help him navigating among a list or record by giving the current row a different visual attributes..
    Please help
    ammar

    Perhaps you can set a transient field in your view object that determines what visual attribute would be shown, and then in your uix code for each row determine the style class based on that value using jstl tags. I don't have an example with setting the class, but I can't see why that wouldn't work.
    You could code the visual attributes into your css file.

  • Losing the current row without doing anything

    I using 10g and my page have a VOR (viewobject readonly) to control form data but...
    I'm losing several times the current row ... for example I put this code in a button:
    public String clickAction() {
    AdminUCAtoCartorarioAMImpl am = null;
    try {
    am = ( AdminUCAtoCartorarioAMImpl )super.getApplicationModule( "AdminUCAtoCartorarioAMDataControl" );
    am.getAmbienteEscaninhoVOR().getCurrentRow(); //Here, sometimes brings me null.
    } catch (Exception e) {
    e.printStackTrace();
    return null;
    }

    User,
    You give us the symptom of the problem, but
    I'm losing several times the current rowdoesn't help anyone to help you pinpoint what might be the cause. Under what circumstances does the current row come across as null? Are you manually iterating through the VO's row set somewhere? What happens before the current row is "lost?" What specific version (your tag indicates 10g, but specifically which version) of JDeveloper/ADF are you using? Does this occur only when deployed, or does it occur when running in the embedded OC4J.
    One thing for you to try... if it occurs "sometimes," seemingly randomly under load, try turning off Application Module Pooling and re-test. If it occurs every time with pooling turned off, you are likely seeing some issue related to passivation/activation - which is why it would be critical to mention the exact version; there are known issues with specific versions, and there are patches available.
    John

  • How to handle the current row with radio button selection???

    Hi Everyone,
    I have one ADF page with one table and one "Find" button.
    I have created one new attribute with VARCHAR2(1) in the VO and dragged that attribute as first column in the table. And changed that first column to Radio Button to select only one row at a time.
    Upon clicking on the "Find" button i need to get the values of current selected row.
    How can i get the values of selected row?
    What code should i write to get the values of selected row in Method Binding of "Find" button?
    Any suggestions will be really useful.
    Thanks.

    Hello Kumar,
    I have some comments on your case.
    >
    I have created one new attribute with VARCHAR2(1) in the VO
    >
    1- You should create this attribute in the Entity object and then add it to the view object.
    2- Do you need that only one radio button is set at a time for all rows ? If yes then you need to handle the case when the user set more than one row and clear the value of the attribute for all other rows.
    >
    How can i get all the values of current row in backing bean method(method binding of Find method)?
    can u plz provide me the code for that?
    >
    If you mean by the current row is that the row with its value of the selected attribute is set (the radio button is set for that row), then you can write a method in the viewObjectImpl class and expose it to client interface and call it from your bean.
    here is an example based in Department table in HR schema.
    //This method is written in DepartmentsViewImpl   
    public Row getSelectedRadioRow(){
                //create a second row set to not impact the row set used in ADF
                RowSet duplicateRowSet = this.createRowSet("duplicateRowSet");
                //get the current row of the table to set it back after re-executing the VO
                DepartmentsViewRowImpl currentRow = (DepartmentsViewRowImpl)this.getCurrentRow();
                Row[] filteredRows = duplicateRowSet.getFilteredRows("IsSelected", "1");
                DepartmentsViewRowImpl row=null;
                if(filteredRows.length>0){
                    row = (DepartmentsViewRowImpl)filteredRows[0];
                    System.out.println("Department Name " + row.getDepartmentName());              
                this.setCurrentRow(currentRow);
                duplicateRowSet.closeRowSet();
                return row;           
            }

  • Updating the current row in vo which is bind to af:table.

    Dear all.
    I have created af table by dragging datacontrol on page.. i also have a form and onclick of button i want to update the current selected row in table..
    I am getting the current row properly but when i am trying to update the row.. it gives me following exception.
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: Failed to lock the record, another user holds the lock.
    oracle.jbo.AlreadyLockedException: JBO-26030: Failed to lock the record, another user holds the lock.
    Following is my update code.
    public void update(){
    //BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Create").execute();
    BindingContext bc = BindingContext.getCurrent();
    JUApplication japp =
    (JUApplication)bc.getCurrentBindingsEntry().get("Entries_AMDataControl");
    Entries_AMImpl ampl = (Entries_AMImpl)japp.getApplicationModule();
    ViewObjectImpl vo=ampl.getEntries_VO1();
    Entries_VORowImpl row=(Entries_VORowImpl)vo.getCurrentRow();
    row.setSubject(subject);
    ClobDomain c=new ClobDomain(toXML().toString());
    row.setXmlcontent(c);
    row.setDescription("");
    //vo.setCurrentRow(row);
    //vo.executeQuery();
    //BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Execute").execute();
    BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Commit").execute();
    So please can anyone there tell me how can solve this problem.
    Thanks,
    Regards
    jdev version 11.1.1.4.0

    Hi Frank
    in your AM configuration, set the locking behavior to optimisticIts already optimistic.
    is bad coding practice. You should perform updates through teh ADF binding layer and not directlxy against the Application Module Impl class. You can get the >current row from the iterator the table is bound to and set the attributes on itI changed my code to following
    RowKeySet rs = getCalcTable().getSelectedRowKeys();
    Iterator it = rs.iterator();
    DCBindingContainer bindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding empIter =
    bindings.findIteratorBinding("Entries_VO1Iterator");
    StringBuilder sb = new StringBuilder();
    RowSetIterator empRSIter = empIter.getRowSetIterator();
    Row currentRow = null;
    while (it.hasNext()) {
    Key key = (Key)((List)it.next()).get(0);
    currentRow = empRSIter.getRow(key);
    break;
    Entries_VORowImpl row=(Entries_VORowImpl)currentRow;
    row.setSubject(subject);
    ClobDomain c=new ClobDomain(toXML().toString());
    row.setXmlcontent(c);
    row.setDescription("");
    BindingContext.getCurrent().getCurrentBindingsEntry().getOperationBinding("Commit").execute();
    But it still gives me same error.
    <Utils> <buildFacesMessage> ADF: Adding the following JSF error message: Failed to lock the record, another user holds the lock.
    oracle.jbo.AlreadyLockedException: JBO-26030: Failed to lock the record, another user holds the lock.
    Any suggestion appreciated..
    Thanks
    Regards.

  • How to Select the Current Row When Using af:iterator?

    Hello all,
    I encounter the following problem when using af:iterator to display data from
    a View Object:
    When trying to display the content of a row via a popup, only the first row is
    returned no matter which row is selected. So a selection of the current row
    should exist or some other method which should allow the access to the
    current row.
    The af:table has a selectionListener attribute which permit to achieve this.
    Does anyone know about some similar attribute or some method for
    selecting the current row when the af:iterator is used?
    Thank you,
    Mirela

    I would be interested in the answer to this basic question as well. I cannot get the selected row value of an attribute in an iterator for a view if I simply set-up a attribute binding to the iterator. It seems that this should be possible. I've had no other option but to obtain the current row and the related attributes programmatically. This works fine, but if there is a more elegant option, then I'd certainly like to use it.
              <af:table value="#{bindings.CompaniesView1.collectionModel}"
                            var="row"
                            rows="#{bindings.CompaniesView1.rangeSize}"
                            emptyText="#{bindings.CompaniesView1.viewable ? 'No data to display.' : 'Access Denied.'}"
                            fetchSize="#{bindings.CompaniesView1.rangeSize}"
                            selectedRowKeys="#{bindings.CompaniesView1.collectionModel.selectedRow}"
                            rowBandingInterval="0" id="tCompanies"
                            summary="Companies"
                            width="100%"
                            rowSelection="single"
                            binding="#{CompanyBackingBean.companiesTable}">Page Def:
        <attributeValues IterBinding="CompaniesView1Iterator" id="Id">
          <AttrNames>
            <Item Value="Id"/>
          </AttrNames>
        </attributeValues>I should be able to get the Id attribute value of the current selected row using "#{bindings.Id}", right? Well, it doesn't work for me. Any ideas?
    Thanks

  • Unable to open windows using boot camp.  Get message "The bless tool was unable to set the current boot disk."  Any thoughts, Thank you.

    Unable to open windows using boot camp.  Get message "The bless tool was unable to set the current boot disk."   I am using an Imac , Lion operating system, and Windows 7.  It worked a few days ago.  Any thoughts, Thank you.

    Note that nowhere in the Boot Camp instructions does it tell you to use Disk Utility to format the Windows partition. The Boot Camp Assistant program creates the partition & sets the +partition scheme info+ of the disk as appropriate for the Windows installer but the Windows installer itself is responsible for formatting the new partition with the appropriate +file system scheme+ (NTFS for Windows 7).
    If you follow the instructions in the Boot Camp Installation & Setup Guide to the letter you should have no problems installing Windows.

Maybe you are looking for

  • Photoshop CS5 crashing on launch

    I installed CS5 last week and all was fine until today when it started crashing on launch. Here's the report. Anyone have any ideas? thanks! Process:         Adobe Photoshop CS5 [640] Path:            /Applications/Adobe Photoshop CS5/Adobe Photoshop

  • Showing Broken Font while creating new document

    Hi. While our user is creating the new document, BO is showing the broken Font like ㅁㅁㅁ. This is not for all users, but for some users. We've tried to re-install the JAVA, but it is still the same. Is there anyone who know how to fix this?

  • Chapter ID for Materal

    Dear Experts, when i enter the material in sales order the system shows the messege "Maintain the chapter ID for Materal 456788 J_1MTCHID" Where is the missing link? Regards jyoti

  • Editing Workspace in Premiere Pro CS4 not working.

    When I start Premiere Pro all the workspaces work except the Editing workspace, all I see is this: I am am using Windows 7 64 bit, what could be going wrong? I've already tried reinstalling Premiere once, can anyone shed any light on this problem?

  • Cp and rsync cannot find system directory

    Hello, I am working on a script to copy a custom user profile over to the default. Part of the script uses rsync to copy the contents of the customized profile, named "profile" to the default profile located in: /System/Library/User Template/English.