Make my JTable editable

in mu Jtable when i click a cell and change the value inside, the JTable does NOT save the value, (when i come back to the Jtable i find the OLD value and not the new one),
Please help me to make my JTable editable, so when i change the value in any cell this value is saved when i leave this cell...
Thanks to any help

>
in my Jtable when i click a cell and change the value inside, the JTable does NOT save the value, Kindly show your code here...
When i come back to the Jtable i find the OLD value and not the new one)you came back from where ? are you starting the application again or just switching between forms?
Please help me to make my JTable editable, so when i change the value in any cell this value is saved when i leave this cell...Do u want to save values permanently ? and please share your code and let use know what exactly you wanna do.

Similar Messages

  • How to Make a Checkbox editable in a JTable?

    I have a CustomModel inheriting from the AbstractTable Model. I make the isCellEditable( ) function in the CustomModel return true for all the columns(pl. see code snippet). One of the columns returns a Boolean value (checkbox in the table) and the rest of the columns return Strings (JLabels in the table). I can edit the all the columns which return text (JLabels), but cant seem to edit the column containing the Boolean Value (checkbox). How can I make the checkbox editable?
    Help is greatly appreciated...
    here is a piece of the sample code:
    public class CustomModel extends AbstractTableModel
    private Vector _columnMaps = null;
    private MyDefaultData _data = null;
    public SniTableModel(Vector columnMaps, MyDefaultData data)
    _columnMaps = columnMaps;
    _data = data;
    public Class getColumnClass(int col)
    Object value = getValueAt(0, col);
    if (value != null)
    return value.getClass();
    else
    return (new Object()).getClass();
    public boolean isCellEditable(int row, int col)
    return true;
    }

    Try this:
    i) extend DefaultTableModel instead of AbstractTableModel
    ii) public Class getColumnClass(int c) {
    if (this.getValueAt(0,c) == null)
    return super.getColumnClass(c);
    else
    //convert booleans to checkboxes in the table
    return super.getValueAt(0, c).getClass();

  • How to make table as "editable false"

    Dear Forum,
    i am user of jDeveloper jClient/Swing .jpr.
    cutomer table having following attributes-
    1.cust_id (primary key)
    2.cust_name
    3.cust_add
    Suppose customerview bind with jTable1.
    Using ViewObjectEditor, i set "updateable never" for all fields.
    This show error, when data insert into table " cust_id as
    read only".
    Help me, Using jClient Binding how to make Table as "editable false".

    Overriding method prepareEditor() for new table:
    private JTable tableList = new JTable(){
    public Component prepareEditor(TableCellEditor editor, int row, int column) {
    // 1 and 2 column is not editable
    if(column == 0 || column == 1){ return null; }
    return super.prepareEditor(editor, row, column);

  • How do I make a JTable's header sorting actually change the actual table?

    How do I make a JTable's header sorting actually change the actual table?
    Currently, I'm using
    table.setAutoCreateRowSorter(true);to allow the user to sort the table.
    However, I want to be able to load something based on the selected row's index. The problem is that when the table is rearranged, the change appears to only be local, in other words, the actual table isn't changing.
    For instance:
    index 0 "A"
    index 1 "B"
    index 2 "C"
    Sorted in reverse gives me
    "C"
    "B"
    "A"
    But C is still index 2 (instead of 0).
    Thanks in advance.

    Cross posted and answered in the Swing forum.
    [http://forums.sun.com/thread.jspa?threadID=5353865]
    I see this is not your first incidence of cross posting. In future, please post a question once only.
    db

  • After Showing ERROR message make the field editable in subscreen.

    Hello Experts,
    I have a requirment where i have added a subscreen to the standard screen of ME31K for creating the contract. In my Subcreen i have my custom screen fields that i'm updating in EKKO table through include structure.
    Now if user forget to fill the details in my custom fields in the subscreen then i'm giving the error message prompting the user to fill the value in fields.
    But the problem is the screen is locked there itself i want to make the field editable so that user can enter some value in the fields. I can not use the stuatus or information message here because doing this i will get the item overview screen which should not come as i want to restrict the user to header details only and fill all the custom fields.
    Please provide me with your helpful responses.
    Thnaks,
    Naveen

    Hi Naveen,
    Sorry for the delay.
    The code which I gave for popup, i hope its being shown in an IF . . . ENDIF.
    So in that condition u can add the following :
    IF < ur condition >
       < Call message FMs >
        SET SCREEN SY-DYNNR.   "this would set screen to current screen which is 0201
        EXIT.
    ENDIF.
    Other than this if you like you can set some parameters in the PAI of this screen which redirect to current screen based on some conditions.
    So u can manually set OK-CODE and CALFCODE as SPACE, but i dont know how much this can impact the process.
    So please follow the above code.
    This is available in
    Main Program     SAPMM06E
    Source code of   MM06EF0F_FCODE_CALL
    IF OK-CODE EQ SPACE AND
       CALFCODE EQ SPACE.
      SET SCREEN SY-DYNNR.
      EXIT.
    ENDIF.
    Hope this helps.
    Regards,
    Ateet

  • Make "Company" Field editable

    Hello Experts,
    We are using E-Sourcing 5.1 with most of the out-of-the-box functionality. When creating an Auction, header section contains field "Company". This field appears as read only, and populates automatically based on the company defined in the user profile.
    I tried making this field editable by means of page customizing (UI ID: doc.auction.multi.universal.auctionevent.ui.buyside.default), but even when I declare field COMPANY as Editable = YES, the change is not reflected in the UI.
    Any ideas on how to make this field editable so end-users can select another company code besides the one specified in their profile? Your help is appreciated. Thanks!

    Hi Gilberto
    Unfortunately it is not possible to make the company field editable. Workaround could be to hide the standard COMPANY field in page customization and create a new extension definition lets say "Company" with data type: Object Refrence and choose 'Company' as the object reference type.
    Hope this would meet your requirement.
    Regards
    Mudit Saini

  • How to make a pdf editable and save for print

    Hi,
    I just joined Adobe Cloud and it's been a while since I have used acrobat. I have made a brochure that I need a couple of things to be editable on. See below. I need the two areas highlighted in red to be editable for different locales/people. My questions are:
    A) I assume Acrobat is the way to do this. I also have FormsCentral if that works better. Can someone tell me how to make these two fields editable?
    B) What program do they edit with?  Acrobat Reader?
    C) How do they save and output it for print?
    Thank you,
    John

    This is not about what Acrobat can or can't do - and you just said they won't have it anyway. It's about the limitations of PDF. A proper solution is to develop (at some expense) a server side PDF generator that takes the user's input and makes them a custom PDF. I don't know if you can just subscribe to a service to do this. If you aren't going to have them use Acrobat, form fields are your only option. Be sure they (and you) understand the limitations and that they must use Reader (not one of the many other PDF viewers). Be sure you understand about reader enabling: many versions of Reader CANNOT SAVE filled in files unless they are specially prepared.
    So back to your original question: how do you make the fields editable: with the Forms function in Acrobat. You may have better luck in the Acrobat Forms forum.

  • How to make fields Non Editable in Web ADI

    Hi All,
    Can you please let me know how we can make fields Non Editable in Web ADI?
    Thanks,
    Anil

    Hi,
    Are you trying to make required parameters readonly and does this variable have different values for each row. If not then I would suggest you use a wrapper for the API and get only parameters that you need from the excel sheet and the use the wrapper to send the other read only values.
    Thanks

  • Table Control: make a field editable or not based on another field value

    HI All,
    How to make a column field input enabled or disabled based on another field value in a Table Control.
    Here's the scenario:
    I have a table control with two columns, KTOKK and LIFNR. Now for certain KTOKK, the LIFNR field should be editable and for certain KTOKK it should not be editable.
    Eg.,  KTOKK = 0001 =>  LIFNR field is not editable.
            KTOKK = ZKTO => LIFNR field is editable.
    But these fields are in a table control.
    Please advice.
    Thanks in advance,
    RK.

    Hi RK,
    Go through the below link..
    how to make special field editable or diseditable in table control?
    the code mentioned in the link.. just add ur conditions in the module....
    Best Regards,
    Brijesh

  • How do I place a signature on a document and make it un editable

    How do I place a signature on a document and make it un- editable

    Hello,
    To place a signature on the document please follow these steps:
    1. Open the pdf file.
    2. Tap on the pdf if toolbar at the top of pdf file is not visible.
    3. Tap on 3rd icon from Right(commenting option) present in the toolbar.
    4. Tap on Signature icon (Pen type, second from right)
    5. Tap on the pdf file where you want to put the signature.
    6. After that if show you a canvas on which you can draw your signature.
    7. After signature gets added to the pdf file, tap on it modify its properties accordingly.
    To make it un-editable
    Close the document once. After that the signature will become uneditable.
    Please let me know it you faces any issue in adding a signture to the pdf file.
    Thanks and Regards,
    Ankit

  • How to make a field editable, this field is dependent on a checkbox.

    Hi Frens,
    On the selection-screen of a report, i have a field and a checkbox in one block only.I want to make this field non-editable if the checbox is unchecked and if the checkbox is checked than, the field shouls be editable.
    Currently, it is happening but when i press enter after checking or unchecking the checkbox.
    How can we do it without pressing enter.
    Thanks and regards.

    Hi Anshul
    first describe your parameter like :
    PARAMETERS p_chkb AS CHECKBOX USER-COMMAND chkb.
    when user clicks on this checkbox
    the event  AT SELECTION-SCREEN OUTPUT. will be triggered without touching enter button.
    Than write a code like this to make P_OTHER parameter editable or non-editable :
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name EQ 'P_OTHER'.
          IF p_chkb EQ 'X'.
            screen-input = '1''.
          ELSE.
            screen-input = '0''.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    Hope it helps,
    Bulent
    Edited by: Bulent Balci on Jul 6, 2010 5:23 PM

  • After load the pdf in this program, what commands must follow to make the correction (edit),

    if you use
    http://www.doc2pdf.net/
    you can convert doc >> pdf.
    I did try with some samples of files but, in some pages where a subheading is in eg page45, in pdf moved to page44, well to modify the pdf so is exact alignment like doc I must use ACROBAT? Well, conversions from this site must done non-restrict modify the pdf? well since I have Acrobat Pro 9, after load the pdf in this program, what commands must follow to make the correction (edit), and save the file?

    Unfortunately, for your endeavor, PDF is not a file format that supports edit-layout-format activities such as are in word processors.
    Not an "issue" - rather, it reflects what PDF was/is designed to be.
    While minor editing ("touchups") are possible extensive editing of PDF content is not.
    What you appear to have encounterd with the process used to convert something to PDF is something that happens rather too often.
    That is, many non-Adobe PDF creation processes to not provide "proper" PDF.
    Which is to say PDF built to the Adobe PDF References or, now, the ISO Standard for PDF (32000-1:2008).
    As you have Acrobat Pro perhaps using it to convert the document's authoring file to PDF via print to Distiller or via Adobe PDFMaker is something to consider. These convert to PDF per the PDF References/ISO Standard.
    Be well...

  • Possible to make an item editable for certain users and read only for other

    Is it possible to make an item editable for certain users and read only for others?
    I've been able to accomplish this by taken the select statement that I used to define an authorization scheme, placing it in the Read Only condition of the item. However, I would like to simply reference the authorization scheme to utilize caching, and to help keep things cleaner for future maintenance.
    Is it possible to reference an authorization scheme in an item condition similar to the way another item can be referenced by preceding it with a colon (i.e. :P1_First_Name)?

    Thank you, your suggestion worked.
    It would be nice on a future release of APEX if a drop-down box existed under the Ready Only section that would allow an existing Authorization Scheme to be selected or negated when applying the Read Only attribute to a form item.

  • Make a region editable while keeping the entire page as read only

    Hi All,
    I have made an entire page as readonly via the following :
    ClientUtil.setViewOnlyRecursive(pageContext, webBean);
    Now I want the entire page to be readonly except for a sub tab used in the page.
    <oa:subTabLayout id="subTabLayoutRn">
      <ui:contents>
        <oa:header id="tasksTabRN" extends="/oracle/apps/ozf/claim/webui/TasksTabRN"/>
      </ui:contents>
      <ui:subTabs>
        <oa:subTabBar id="subTabBarsRN">
          <ui:contents>
            <oa:link id="tasksTabLink" text="Tasks">
               <ui:primaryClientAction>
                  <ui:firePartialAction event="updateSubTab"/>
               </ui:primaryClientAction>
             </oa:link>
          </ui:contents>
       </oa:subTabBar>
      </ui:subTabs>
    </oa:subTabLayout>
    This sub tab i want to display as editable. Can anyone kindly provide any suggestions on how to achieve this?
    Thanks,
    Arpita

    Hi Sushant,
    Thanks for the reply.
    I am using setViewOnlyRecursive on condition basis only i.e.
    If (status of claim is close / cancelled / pending_approval)
    then
    ClientUtil.setViewOnlyRecursive(pageContext, webBean);
    But I want to make tasksTabRN of the subTabLayout as editable if status of claim is pending_approval.
    How do i code this condition ?
    In the below code, we can get the subTabLayout control but what to do next?
    if(webBean!=null)
    OASubTabLayoutBean subTabLayoutBean = (OASubTabLayoutBean)webBean.findIndexedChildRecursive("subTabLayoutRn");
    if(subTabLayoutBean!=null)
    UINodeList childList = subTabLayoutBean.getIndexedNodeList();
    if(childList!=null)
    RenderingContext rdgCtxt = pageContext.getRenderingContext();
    int size = childList.size(rdgCtxt);
    OAWebBean child = null;
    for(int i=0; i<size; i++)
    child = (OAWebBean)childList.getUINode(rdgCtxt, i);
    if(child!=null)
    String name = child.getUINodeName();
    if("tasksTabRN".equals(name))
    // We can set the value of  subTabLayoutBean as rendered or hideSubTab
    // But how do i make this as editable.
    //subTabLayoutBean. ????
    break;

  • How to make an checkbox editable and uneditable within a single alv output.

    Hi,
    How to make an checkbox editable and uneditable within a single alv output depending on condition.
    I have used Reuse_alv_grid_display.
    In my output every checkbox is editable. i have used edit = 'X'.
    I want editable checkbox for correct value and uneditable checkbox for incorrect value in a single alv

    >
    Mukilansap wrote:
    > I want editable checkbox for correct value and uneditable checkbox for incorrect value in a single alv
    Use alv styles to achieve this, set the style for each record before displaying the ALV. Structure LVC_S_STYL.
    Take a look at the example BCALV_EDIT_02, it is OOPS based, but check how the style table is filled.
    regards,
    Advait

Maybe you are looking for

  • Setting AEP Documents to Open by Default with Adobe After Effects CC NOT Adobe After Effect CC 2014 on a Mac

    I have installed some of the CC 2014 products for testing. Until the rest my department moves from CC to CC 2014 I need to open and create new projects in CC as the CC 2014 AEP's won't open in other versions. The issue is when I try to change the fil

  • Can someone tell me how to delete EditRegion4.

    Can someone tell me how to delete an "exra" EditRegion4" i have in Dreamweaver CS4? I have 5 total edit regions on each page, but somehow I have 2 of the EditRegion4 on one of the poem pages. The one region4 is total empty so since I can't seem to de

  • Multiple select option in the screen painter

    Hi all, I want to give multiple select option for a particular field in the screen painter. how to provide it. Nitin

  • How to create an XML fril from an XML instance

    i have already created an instance of the xml using the classes generated from the SCHEMA, how will i generate an xml file from the instance i have? is it the same like the marshalling/unmarshalling Castor is doing? help please!!!

  • LR3 Missing File Naming Issue

    Hello, I accidently deleted a number of images from two different collections.  Luckily my partner had exported copies of all the keepers with the same file names. LR3 never lost the catalog info, and the thumbnails were still present, albeit with th