How to make sure newly created row is editable by default programatically

Hi All,
I got a problem with creating new row in single row selection table with on click property enabled for editing mode.
Function requirement is like: I have Mater-Detail. While creating detail lines, line has to be created with default line number. Eg: Master1 can have line numbers 1,2,3..etc, Master2 can have 1,2,3.. etc.
In applicationTable for Pattern Create
Action Listener=”#{CreateAndEditFiscalDocumentBean.createChargeLine}”
In Table rowSelection="single" and editingMode="clickToEdit"
Here the problem is:
When I first come to the page,the first row in the detail table is editable and could able to edit any other row on click . But When I create a new row , I got a new row with line number but it is not editable.
I want it to be editable on create and previously selected row should be read only. I have tried several ways but nothing is working.
My observation is, when I call the bean method in Action Listener of application Table in create patteren, I am facing this problem. If I do not call this method, it is working as expected. But I need to call this method because it has to create row with line number.
I am putting below two scenarios which I have tried. I am not successful in the both the scenarios.
Could you please help me in achieving expected functionality.
Many thanks in advance for your time and help.
Scenario 1:
Jsff:
ApplicationTable: createActionListener="#{CreateAndEditFiscalDocumentBean.createChargeLine}"
Table: rowSelection="single", editingMode="clickToEdit"
Bean Code:
public void createChargeLine(ActionEvent actionEvent) {
FacesContext fc = FacesContext.getCurrentInstance();
ExpressionFactory factory = fc.getApplication().getExpressionFactory();
MethodExpression method=factory.createMethodExpression(fc.getELContext(),"#{bindings.createChargeLine1.execute}",String.class,new Class[]{});
method.invoke(fc.getELContext(),null);
AMImpl Code:
public void createChargeLine() {
ViewObject itemChargeVO = this.getFiscalDocumentCharges();
ViewObject fiscalDocumentHeaderVO = this.getFiscalDocumentHeader();
Row toRow = fiscalDocumentHeaderVO.getCurrentRow();
Row newRow = null;
Row latestRow = itemChargeVO.first();
Integer line_number = new Integer(0);
int numberOfItemLines = 0;
if (latestRow != null) {
RowSet rs = itemChargeVO.getRowSet();
numberOfItemLines = numberOfItemLines + 1;
if (rs != null) {
line_number =
(Integer)rs.first().getAttribute("LineNumber");
while (rs.hasNext()) {
numberOfItemLines = numberOfItemLines + 1;
Row row = rs.next();
if (line_number.compareTo((Integer)row.getAttribute("LineNumber")) <
0)
line_number =
(Integer)row.getAttribute("LineNumber");
line_number = line_number + 1;
newRow = itemChargeVO.createRow();
newRow.setAttribute("LineNumber", line_number);
itemChargeVO.insertRowAtRangeIndex(numberOfItemLines + 1, newRow);
itemChargeVO.setCurrentRow(newRow);
} else {
newRow = itemChargeVO.createRow();
newRow.setAttribute("LineNumber", new Integer(1));
itemChargeVO.insertRowAtRangeIndex(0, newRow);
itemChargeVO.setCurrentRow(newRow);
Scenario 2:
Bean method changes:
public void createChargeLine1(ActionEvent actionEvent) {
Row newLine = ApplicationsTableEventHandler.getInstance().processCreate(getChargeTable());
newLine.setAttribute("LineNumber", new Integer(1));
}

Hi Jerry,
Please refer to the following blog and check whether you followed all the steps:
/people/harikrishna.sunku/blog/2008/12/18/work-center-and-navigation-link-creation-in-crm-2007
You basically need to ensure that your custom work center is assigned to a navigation bar profile; and this navigation bar profile is assigned to your business role.
Regards,
Shiromani

Similar Messages

  • How to Apply a Newly Created Access Policy on Existing Users in OIM????????

    How to Apply a Newly Created Access Policy on Existing Users in OIM?
    When the rule is getting failed the user is getting removed from the group but resource is not getting revoked. This is happening only for the old uses..for the users which i created now it working fine..i mean its resource is getting revoked.
    (Retrofit access policy" is checked on the Access Policyand Revoke if not longer applied is checked.)
    For the old users i see the POl_Key is null, for new users i see a value '10'. So i updated the pol_key for old users same as it got generated for new users '10'.
    i even updated the form version too but still revoke doesn't work.
    I cant go for the below approach..
    In order to apply a newly created Access Policy on existing users, one has to make sure that:
    1) "Retrofit access policy" is checked on the Access Policy.
    2) Then run the "Set User Provisioned Date" Schedule task to apply the Access Policy on the existing users in OIM.
    Note: After 9.1.0.1 BP03 the access policy execution has been moved to a new scheduled task "Evaluate User Policies" as mentioned inDocument 839368.1 :How to Use Access Policies to Provision with Groups.
    Is there any other approach i can try.. if you have any idea please reply me asap
    Thanks..

    Thanks for the reply kevin..
    We decided to try the Schedule task (Set User Provisioned Date).
    But i see one problem here after seeing this post in metalik --> Can Access Policies Manage The Life-cycle Of Users Created via Reconciliation? [ID 1136540.1]
    According to this post Access Policies framework does not manage users who are obtained either through trusted reconciliation or target reconciliation.
    Is there any custom way to achieve this??
    How does the access policy framework revoke resource work? (revoke if no longer applies)??
    Edited by: IDMuser19 on Jun 21, 2011 11:43 PM

  • Setting focus to inputText of newly created row in af:table

    Using Jdev Ps4
    Simple use case:
    I have an af:table with a few columns and a createInsert button.
    When I press the createInsert button, a new record is added to the table.
    How can I set focus to the first inputText of that newly created row?
    I have been looking for a solution online but all the examples online tell us how to set focus to components that already exist and you know the ID of. With the newly created row, you don't have the ID so you cannot set the focus.
    In this topic (which is quite old...) https://kr.forums.oracle.com/forums/thread.jspa?threadID=643924 Frank Nimphius explained that it would be difficult and he would pass it on to the developers.
    I haven't found any information if there are some enhancements in this area to make this work...
    I tried with using plain old javascript by looping through the dom structure but had no success in doing so...
    Thanks
    Yannick
    Edited by: Yannick Ongena on Apr 2, 2012 8:38 AM

    Yannick,
    can you check this?
    how to get focus on newly created row in table?
    ~Abhijit

  • ADF JS API methods not working for the newly created rows in table

    Hi All,
    We need to make sure the focus goes back to the newly created rows first column's first component.
    Used findComponent and findComponentByAbsoulteId and even hard coded the id, but still the methods are returning null.
    Even tried ADFRichTable.getRowKey(index), by passing index as 0 for the first row, still the method is returning null.
    Tried ADFUITable.findComponent(Object scopedId, Object rowKey), but unable to pass client side rowKey as the above method is returning null.
    All our requirement is to make the focus back to the first row's component when the user clicks on the cancel button instead of save button. Appreciate your help. Thanks.
    P.S.: Rows will be created using CreateInsert method.
    JDEV Version: 11.1.2.0.0 and Table is in a region and we are using UI Shell Tab Template to launch regions.
    Raja.
    Edited by: RajaRamasamy on Feb 10, 2013 4:30 PM
    Edited by: RajaRamasamy on Feb 10, 2013 4:30 PM

    Thanks Frank,
    But some times even we use findComponentByAbsoulteLocator, its not working. So i followed the approach where you will get the rowID like the below and construct the client ID and pushing the JS to client using Service class. And it worked.
    String rowId = table.getClientRowKeyManager().getClientRowKey(facesContext, table, rowKey);
    But i am worried that even though we hard coded the client and executing the js function from the command button by keeping client listener's type as click, the focus is not setting. And i tried giving the id as tableId[rowIndex]:componentId in the findComponentByAbsoulteLocator.
    Can you let me know is there another way to make focus only using JS on click of command button, where the button does not have any action or actionListener.
    Raja.

  • How to draw a perfect circle and how to make sure it is perfectly centered inside a square

    How to draw a perfect circle and how to make sure it is perfectly centered inside a square in Photoshop elements using the Ellipse option.

    1. Create a square canvas.
    2. With the Elipse tool, hold down Shift (Shift forces a circle). Draw the circle anywhere on the canvas (Shape 1 in this example).
    3. Simplify the circle layer
    4. Ctrl-click the layer to select the circle.
    5. Copy the selection to the clipboard (Edit > Copy).
    6. Deselect the selection.
    7. Paste from the clipboard (Edit > Paste). The pasted circle (Layer 1) will be centered.
    8. Delete the original circle layer.
    NOTE: Step 6 is the key. This guarantees that the pasted circle will be centered.
    If you want a circle completely within a square you can simply draw and simplify a circle on any shape canvas. Ctlrl-click the circle to to select it and copy to the clipboard.
    Then do File > New from Clipboard. This creates the circle cropped to a square on transparent background.

  • ADF 10.1.3.4: 'losing' newly created row in master-detail-detail.

    Situation:
    I have a page in JSF/ADF with the following set up.
    Top-half of the page is a table.
    Underneath the table is on the left a selectonelistbox component and next to it on the right a tabbed section.
    The table -> selectonelistbox relation is master-detail.
    The selectonelistbox -> tabbed section is master-detail.
    So when you change the selection in de seletonelistbox the data in the tabbed section changes.
    One of the functions in a tabbed section is a createinsert.
    step1: select value '1' in the selectonelistbox.
    step1: a new row is create (with createinsert). there is no commit yet, the row is in the entity cache.
    step2: change the selection to '2' in the selectonelistbox.
    step3: create a new row (with createinsert).
    step4: commit the changes.
    We see that only the row of the current row is committed. The newly created row under value '1' has disappeared.
    There are no warnings/exception thrown.
    How can I commit all newly created rows?
    It must be possible to created several new rows, before committing if it is possible.
    Some specs:
    JDeveloper 10.1.3.4.0
    using the embedded OC4J server
    JDK
    Thanks,
    Goldhorn

    Which technology are you using?

  • Can someone please tell me how to view a newly created Genius playlist (not via Up Next, but as a stand-alone playlist)?  Thank you!

    Can someone please tell me how to view a newly created Genius playlist (not via Up Next, but as a stand-alone playlist)?  Thank you!

    >> then I get a completely blue screen.
    That probably means that you're not looking at a bug in Photoshop, but a problem with a driver - and the most likely cause would be your video card driver.
    And sure enough, your video card driver is almost 2 years out of date.
    Please go to NVidia's website and get the latest driver - then follow their directions for installation (so you don't get bits of old driver left over).

  • HT4515 How to make sure that after browsing that the webpage is not running in the background, but totally closed down

    How to make sure that after browsing that the webpage is not running in the background, but totally closed down

    Double tap the Home button, tap & hold the Safari icon until it starts to wiggle, tap the red minus sign to remove it from the Multi-Tasking bar. Tap the Home button when finished.

  • I just upgraded to the new 4, but not sure how to make sure all my apps (purchases) get over to the new phone from iphone 3.  can't seem to find instructions. thanks.

    I just upgraded to the new iphone 4, but am hesitant to get it plugged in b/c I don't know how to make sure all the apps purchased on my iphone 3 get to the new phone.  can't seem to find instructions so I'm sure it just "does it", but hesitant to literally pull the plug.  thanks.

    Follow these instructions:  iPhone: Transferring information from your current iPhone to a new iPhone, http://support.apple.com/kb/ht2109

  • How can i add newly create infotype in t.code po13

    Can any one pl tel me how can i view newly created infotype in t.code PO13
    Edited by: Utkarsh M parikh on Mar 10, 2010 5:29 PM

    See:
    Mac OS X Automation,
    Automated Workflow Tips,
    Introduction to Automator tutorial, and
    a four-parter on Automation in Snow Leopard by Sal Saghoian:
    Snow Leopard Services,
    Services for iPhoto,
    Safari and WebKit integration, and
    Installing and using services.
    Finally, 
    Developing AppleScript Applications and
    Apple's Automator Developer Documentation

  • How to make sure that schema name is not included with generated sqls

    How to make sure that schema name is not included with generated sqls with tableadapter wizard.
    What should I use? Oledb, ODT.NET, where can set that I want "pure" sqls, not schemas, not ", or anything like this
    I want
    "Select a,b from t1" ,not "select "a","b" from schema.t1"
    Also schema name is put in all parameters, all over the place... What if schema name changes. (b1test to b1prod)
    . I now manually edit XML files of dataset. It works but....
    thanks

    The full hardware :
    Processor Intel core due 3.00 MHz
    RAM:1.5GB
    psu:650 Watt (but i baught i cheap one so it may be actually about 400 watt)
    HD Disk:160 GB
    But about the power supply if it not able to run the VGA card ,Is it will not show any screen or it will not able to run the computer??

  • How to get the Newly Created Material

    Hi all,
    Iam creating Materials using BDC sessions method,My Problem is to update the Newly Created Material in a Ztable.
    so iam getting the Newly created Matnr by the following peice of code
        SELECT  matnr FROM mara INTO  TABLE v_matnr
                               WHERE ersda = sy-datum
                               ORDER BY matnr DESCENDING.
    But the thing is,we are getting Previously created material.i.e the new material will be  created only after the sessions are processed,but when i write the above code in the program we are getting previous material.
    so how to update the newly created material.
    I think we can't do  that through program because we can get new material only after processing the session..so what is the solution for this.should we use userexits for getting the newly created material.
    thanks in advance
    balaji

    Hello,
    Use the <b>BAPI_MATERIAL_SAVEDATA</b> to create the materials.
    The BAPI will return the Material number which is created at that instance by which u can update the ZTABLE.
    Vasanth

  • HT200131 how to make sure only my laptop can connect to my apple tv?

    I don't want to see my flatmate apple tv under "connect"
    how to make sure I don't click on his tv accidentally and he won't be able to connect mine?
    thank you!

    Hey J-Justin,
    Great question! You can name your Apple TV to differentiate it from others in the AirPlay list:
    Apple TV: Change the name of your Apple TV - Apple Support
    http://support.apple.com/en-us/HT200028
    Furthermore, you can setup an onscreen code or password to restrict access for AirPlay. The password method sounds like the best option for your setup:
    Apple TV (2nd and 3rd generation): Understanding AirPlay settings - Apple Support
    http://support.apple.com/en-us/HT202618
    Set a password
    Go to Settings > AirPlay > Security > Password > [set password]. You can use this setting to require a password for AirPlay-enabled devices to connect using AirPlay on the Apple TV. Use this setting if your device will need permanent access and you only want to enter the password once.
    Thanks,
    Matt M.

  • The newly created row cannot be found with another view

    I'm building a JSP client based on BC.
    I have 2 views based on the single entity.
    I'm creating a new row with one view and want to edit the corresponding row with the other view without intermediate commit.
    However, the last view cannot find the new row.
    For the purpose I get the newly created row's key and trying to find the row at the other view by it's RowKey with the tag <jbo:Row>. Now I have an exception:
    oracle.jbo.JboException: Row was not found using request parameter ...
    Can someone give an advice, please?

    Hi,
    I was a little uncertain. I do not have any view associations in this case.
    I've tried to use " .setAssociationConsistent(true)" - dosen't help.
    I've just changed the standard wizard-generated Browse-Edit UIX/JSP form in such way that I'm using one VO for the browse-table jsp, and some other VO for editing jsp. The editing jsp is by itself divided into a number of tabs.
    Every tab of the editing jsp is based on a specific VO and all of the VOs are based on the single Entity Object to the one table.
    While I am editing the existing records in the table everything goes right, but if I create a new row via the browse page and then try to edit it, I have the exception:
    " Row was not found using request parameter: .... " This thread is continued in another post
    Re: ORA-03113 end of file on communication channel error
    There is a bug with hanlding of viewlink-consistency and DBsequence in Jdev 9.0.2 that leads to this issue as discussed in the other thread.

  • How to make sure the maps are loaded though nokia ...

    Hi,
    I have downloaded new nokia map v.3.0109 to my nokia E75 and loaded maps by using nokia map loader (Asia).
    but still I cant see the all regional map which I downloaded, without usign live internet connection.
    How to make sure the maps are loaded properly to my mobile ?
    with regards
    Moderator's note: Email address removed. It is not wise to publish your personal information on a public forum.
    Message Edited by myn1126 on 27-Jan-2010 07:54 AM

    Hi,
    I have downloaded new nokia map v.3.0109 to my nokia E75 and loaded maps by using nokia map loader (Asia).
    but still I cant see the all regional map which I downloaded, without usign live internet connection.
    How to make sure the maps are loaded properly to my mobile ?
    with regards
    Moderator's note: Email address removed. It is not wise to publish your personal information on a public forum.
    Message Edited by myn1126 on 27-Jan-2010 07:54 AM

Maybe you are looking for