Setting the JComboBox to the first value

Hi ,
I have a JComboBox in a one of the table columns. My UI is in a seperate class and the model is in a seperate class. I cannot define the JComboBox as any other specifier than private in the UI. I have added a defaultCellEditor to the combo.
Now my table model will have the setValue. My table model is in a seperate class. My parent UI frame object is being passed to it. What I want to do is everytime a value is selected , after the selection next time I click on the combo the fisrt value appears selected.
Secondly if I click on the dropdown option and click else where then the first value gets selected and my setValue for the cell never gets called. Is there any way I can avoid that.
Regards,
Anand

Hi Ananth,
Thank yo for your reply.
This is how my code below looks like after I applied your solution and I got the error. (See below)
<?if:(sum(current-group()/NUMINCOMPLETE)!=0 And (xdoxslt:get_variable($_XDOCTX,’vTotalE’)!=0?>(sum(current-group()/NUMINCOMPLETE))div(xdoxslt:get_variable($_XDOCTX,’vTotalE’))*100<?end if?>
I think its a syntax error only. Can you help me again organize this one?
Error:
FOProcessor setLocale: en-us
java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at oracle.apps.xdo.common.xml.XSLT10gR1.invokeNewXSLStylesheet(Unknown Source)
     at oracle.apps.xdo.common.xml.XSLT10gR1.transform(Unknown Source)
     at oracle.apps.xdo.common.xml.XSLTWrapper.transform(Unknown Source)
     at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
     at oracle.apps.xdo.template.fo.util.FOUtility.generateFO(Unknown Source)
     at oracle.apps.xdo.template.FOProcessor.createFO(Unknown Source)
     at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
     at RTF2PDF.runRTFto(RTF2PDF.java:629)
     at RTF2PDF.runXDO(RTF2PDF.java:439)
     at RTF2PDF.main(RTF2PDF.java:289)
Caused by: oracle.xdo.parser.v2.XPathException: Expected ')' instead of ' And '.
     at oracle.xdo.parser.v2.XSLProcessor.reportException(XSLProcessor.java:806)
     at oracle.xdo.parser.v2.XSLProcessor.newXSLStylesheet(XSLProcessor.java:571)
Thanks Much.
JP
Edited by: BIPnewbie on Feb 10, 2012 4:00 AM

Similar Messages

  • Unable to set the selected value for a ADF LOV

    Hi,
    I am developing an application using jdeveloper 10.1.3 and Struts.
    I have created a ADF LOV on my JSP Page as given below:
    <html:select property="lob" onchange="javascript:selectLOB(this.form)">
    <html:optionsCollection label="prompt" value="index" property="lob.displayData"/>
    </html:select>
    When i submit the form, i am able to get the value of the selected Value in the List.
    JUCtrlListBinding listBinding = (JUCtrlListBinding) formBean.get("Lob");
    Row r = (Row) listBinding.getSelectedValue();
    String SoLob = (String) r.getAttribute("LobLob");
    But i am unable to set the selected value back in the list when i return to the form again.
    I tried the following:
    int x = listBinding.getSelectedIndex();
    listBinding.setSelectedIndex(x);
    It would be really helpful if some one could let me know what needs to be done.
    Thanks,
    Subashini

    Gyan,
    I tried with the code you suggest , its trying to set the value of a field, but my requirement is to change the property for
    "Rendered" on the field so that based on search parameters we can hide result table column.
    After searching online, I modified the controller code as follows
    1.Created a new transient attribute (Testrender) with type "Boolean" and always updateable.
    2.changed the "Rendered" property value on the field I want to hide as ${oa.PoSearchVO1.Testrender}.
    3. Modified the controller code as follows :
            OAApplicationModule am = pageContext.getApplicationModule(webBean);
            OAViewObject testvo = (OAViewObject)am.findViewObject("PoSearchVO1");
            OADBTransaction txn = am.getOADBTransaction();
            if (testvo != null)
              OARow row = (OARow)testvo.first();
                if (a.equalsIgnoreCase("Approved"))
                     row.setAttribute("Testrender", Boolean.FALSE);
                else
                     row.setAttribute("Testrender", Boolean.TRUE);
            } But now when i run the page and populate the search field and click "Go" its hiding the field but throwing the following error and the search results are also bad.
    Its using only the value of one search parameter but not the second one .
    The search cannot be executed because the table has pending changes that would be lost. I think the vo is getting dirty when I update the transient attribute value. So I used txn.rollback ,then search is working fine but its not hiding the field.
    So can you please let me know how to proceed from here ?

  • How to set the default value of a LOV that is found in a view criteria

    HI,
    I need to set the default value of an LOV that is found in a view criteria. I tried to set a groovy expression but unfortunately it wasn't read. i also tried to bind the LOV to a bind variable and set the value of the bind variable in the constructor of my backing bean but unfortunately the default value appeared the second time i entered the screen and not on page load.
    Can anyone advise where can i set the default value,
    Thanks

    if you want some default value in LOV. you go to edit list of value wizard-> UI hint->include no selection Item checkbox -checked.use labeled item first of list- and beside that put the label. but when you try to get value, it will show null.but you can manipulate in ur java , if it default value

  • Setting the first day of the week

    Hi,
    Is there any other place in Mac OS X where I could set system's first day of the week, except iCal? In iCal it's set to Sunday, but in OmniFocus mini calendars show Monday as the first day of the week, although even there in OmniFocus preferences I've set it to use Sunday as the first day of the week. Developer says that OmniFocus is using system's settings, but nowhere in my system (except iCal) I can find where I could set the first day of the week. I have set English as the default language and order of list sorting in the International settings. Any ideas or suggestions?

    Unless it is set with the Country in the International preferences, I don't think their tech support knows what they are talking about. However, if that is where it would be set, you should be able to override it with the custom settings, but you can't.
    I'd ask them to tell you where that gets set, or is stored. Ask them what system call is used to get that value. My guess is they won't be able to tell you.

  • Iam using a table in numbers to plot daily graph lines. If I fill a cell with a text box  at say zero it plots the graph. I can't actually set the cell value until the actual day but the graph plots it at zero when I don't want it to plot anything. Is tho

    I am using a table in Numbers to plot daily graph lines. Mood swings of how I am on the day, i"m a depressive.
    If I fill a cell with a step box at say zero it plots the graph. I can't actually set the cell value until the actual day but the graph plots it at zero when I don't want it to plot anything. Is there a work around. so thatbgraph only plots on the day?

    The answer is (sort of) in your subject, but edited out of the problem statement in the body of your message.
    When you use a stepper or a slider, the value in the cell is always numeric, and is always placed on the chart if that cell is included in the range graphed by the chart.
    But if you use a pop-up menu cell, you can specify numeric or text values in the list of choices for in the menu. Numeric values will be shown on the chart. Text values will not.
    For the example, the values list for the pop-up menu was:
    5
    3
    1
    Choose
    -1
    -3
    -5
    The first pop-up was set to display Choose, then the cell was filled down the rest of the column. Any text value (including a single space, if you want the cell to appear blank) may be used instead of Choose.
    For charts with negative Y values, the X axis will not automatically appear at Y=0. If your value set will include negative values, I would suggest setting the Y axis maximum and minimum to the maximum and minimum values on your menu list, rather than letting Numbers decide what range to include on the chart. Place a line shape across the chart at the zero level, and choose to NOT show the X axis.
    Regards,
    Barry

  • How to set the initial value of of a poplist dynamical

    Hi,
    I've got a poplist that is populated by a recordgroup. This is done by the following pre-form trigger:
    DECLARE
         l_query_ok NUMBER;
         l_group_id RecordGroup;
         l_it_id     item;
         l_int_value VARCHAR2(2);
    BEGIN
         l_it_id := Find_item('MERGED_ISSUER.product_code');
         l_group_id := FIND_GROUP('RG_PRODUCT_CODE');
         l_query_ok := POPULATE_GROUP(l_group_id);
         -- Populate list 'Product Code'
         CLEAR_LIST (l_it_id);
         POPULATE_LIST(l_it_id,l_group_id);
    END;
    I've tried to set the initial value by adding following lines to the trigger above but I receive the frm-41084 error. This code assigns the first value of the recordgroup to a hidden text item. In the properties of the poplist the value of the hidden text field is set as initial value.
    -- Set initial value
    l_int_value := Get_Group_Char_Cell('RG_PRODUCT_CODE', 1);
    :MERGED_ISSUER.int_value := l_int_value;
    Any help?
    thx

    Hello Ken,
    you can set an initial value for a poplist with the copy command.
    You could use a procedure like this:
    PROCEDURE P_FILL_LBX
         lbx_ITEM_IN                 VARCHAR2,
         grp_DATA_GROUP_IN  VARCHAR2,
         flg_DEL_NULL              BOOLEAN,
         str_WERT_IN               VARCHAR2
    ) IS
      ERROR_ID NUMBER;
    BEGIN
      CLEAR_LIST(lbx_ITEM_IN);
      ERROR_ID := populate_group(grp_DATA_GROUP_IN);
      populate_list(lbx_ITEM_IN,grp_DATA_GROUP_IN);
      IF flg_DEL_NULL = TRUE THEN
        DELETE_LIST_ELEMENT(lbx_ITEM_IN,GET_LIST_ELEMENT_COUNT(lbx_ITEM_IN));
      END IF;
      IF str_WERT_IN IS NOT NULL THEN
        COPY(str_WERT_IN,''||lbx_ITEM_IN||'');
      END IF;
    END;Bernd

  • SRM 4.0- How to set the default values for product type (01) only for SC

    The radio button “Service” should not be visible.
    Also for search help (e.g. search for internal products) where a search should only be possible for product type 01 (goods). The system should not display the product type and internally always search for goods only.
    How to set the default values for product type (01) only for SC
    We needs to use Search help BBPH_PRODUCT which having parameter PRODUCT_TYPE
    Here we can set defalut value 01 but it is not correct one since same search help is using several places.
    We need to limit the search help results only for SC.
    Kindly help out me ASAP.

    The easiest way to set defautl values is to edit the batch class.
    Goto the characteiristic and go to update values.
    In here you probably have something like 0 - 100 as a spec range.
    On the next line enter the default value within this range.  At the end of the line, click in the box in the column labelled "D".  This indicates the defautl value for the characteristic.
    If you need to you can do this in the material classification view as well.
    Just to be clear, these values will only show up in the batch record.  You can not have defautl values in resutls recording screens.
    FF

  • How to set the default value of a database column to NULL

    Hello,
    I want to set the default value of a column (VARCHAR2(20) to NULL, nut I cannot figure out to do this. I tried the following editing the offline table with JDeveloper:
    Default Value : <empty> -> On database NULL
    Default Value: '' -> On database ''
    When I create a new column, there is no default value on the database side and when I open the tabe properties in the database navigator I can see that the default value is (null). This is what I want to see in the other column as well. I don't know why sometimes a default value is visible on the database side (when generating form offline tables to database tables) and sometimes not.
    Perhaps sombody can bring some light in this issue.
    Thanks Thomas

    Hello Shay,
    I have the impression that you don't understand my problem. So here step by step:
    1. Create a offline Table TEST with one column TEST: VARCHAR2(20). nullable=true, no default value.
    2. Generate the table to the database
    3. When you look at the table properties (columns) with the database navigator the following information is displayed (sorry for the formatting):
    Column Name | Data Type | Nullable | Data Default | COLUMN ID| Primary Key | COMMENTS
    TEST | VARCHAR2(20 BYTE | Yes | (null) | 1 | (null) | (null)
    4. Now set the default value for the column TEST in the offline table for example to 'Test'
    5. Generate the table to the database.
    6. When you have a look at the database table, the default value is now 'Test' (as expected)
    7. Now remove the default value of the column TEST in the offline table
    8. Generate the table to the database
    9. When you have a look at the database table, the default value is now NULL (in uppercase letters without parenthesis)
    And this is where the problem starts!
    When you generate the table again with the options "Alter/Manual Reconcile" the default value of the column test is considered to be different! But in fact it should'nt be different because nothing has been changed.
    Best regards Thomas
    Edited by: thmayr on May 28, 2009 9:05 AM
    Edited by: thmayr on May 28, 2009 9:31 AM

  • Setting the cookies value

    hi,
    when i do, submiting the page i'm able to set the cookie value.I'm not getting any messages. But the Same time when i call the proceudre with parameters from the URL i'm not able to store the cookie value.
    It display's the message like this and the value is not stored in the cookies
    Content-type: text/html Set-Cookie: emp_no=9999X; path=/;
    my code is :
    owa_util.mime_header('text/html',FALSE);
         owa_cookie.send('emp_no',UPPER(lv_emp_no),null,'/',null,null);
    owa_util.http_header_close;
    How do i solve this problem?
    Thanks

    Hi,
    Here are a couple of things you can try:
    1) remove the following line because it shouldn't be necessary:
    the_cookie.num_vals :=0;2) remove the following line because the owa_cookie.send will automatically replace any existing cookie:
         owa_cookie.remove('emp_no',the_cookie.vals(1),null);3) try capturing the cookie value in a local variable and printing it (after htp.body, of course) to see if it is working correctly.
    4) enable the browser to prompt you when a cookie is being set so that you can verify whether it is being set or not.
    HTH,
    Ashesh Parekh
    Oracle9iAS Product Management
    hi,
    Something like this...
    Code
    PROCEDURE checkLogin ( emp_no in varchar2 default NULL) IS
         pv_check_f      BOOLEAN ;
    the_cookie      owa_cookie.cookie;
    BEGIN
    pv_check_f := FUN_EMP_PASSWORD(UPPER(emp_no) ) ;
    IF NOT pv_check_f THEN
         v_msg := 'Sorry Log on denied';
         RAISE EMP_ERROR;
         END IF ;
    the_cookie.num_vals :=0;
    the_cookie:= owa_cookie.get('emp_no');
    if the_cookie.num_vals= 0 then
              owa_util.mime_header('text/html',FALSE);
              owa_cookie.send('emp_no',UPPER(emp_no),null,'/',null,null);
              owa_util.http_header_close;
         else     
              owa_util.mime_header('text/html',FALSE);
         owa_cookie.remove('emp_no',the_cookie.vals(1),null);
              owa_cookie.send('emp_no',UPPER(emp_no),null,'/',null,null);
    owa_util.http_header_close;
    end if;
    htp.p('<script language="javascript">
    window.location="http://www...URL";
    </script>');
         htp.formclose;
    EXCEPTION
         WHEN EMP_ERROR THEN
         Pageheader;
    Procedurename.Banner('Login denied');
    htp.fontOpen('red','Arial Narrow');
    htp.header(3,lv_msg);
    loginagain;
    htp.fontClose;
    htp.centeropen;
         htp.br;
         htp.p('<INPUT type="button" value="Back" onClick="history.back()">');
         htp.br;
         htp.centerclose;
    pagefooter;
    END checkLogin;
    calling the Procedure "checklogin" with the parameter emp_no from the URL like this
    "http://....:8810/dir/Packname.checkLogin?emp_no=9ABCDS".
    Waiting for ur replay.
    Thanks.

  • How to set the Default values for Info Objects in Data Selection of InfoPac

    Hi All,
    Flat file Extracion:
    How to set the Default values for Info Objects in Data Selection Tab  for Info Package
    ex: Fiscal Year Variant  Info Object having values 'K4' 'Y2' etc  in Flat file
    Initially  default value(not constant)  for this info Object value should be 'K4'  in Info Package
    If I set data selection value for this info object K4 it will retreive records with this selection only? how to handle
    Rgds,
    CV

    Hi,
    suppose as your ex. if you are having fiscalyear variant in the dataselection tab then specify K4 in the from column, again the ficalyearvariant row and click on insert duplicate row at the bottom . you will get another row . In that enter Y2 in the from column. now you can extract K4, y2 values .
    haritha

  • How to set the LOV value programmatically?

    Hello,
    I have a LOV (select list with submit) the value (displayed and corresponding returned) of which I would like to set by selecting a row in a report.
    What is the event I use to catch the selection of the row in the report and what would be the sample code to set the LOV values?
    Thanks a lot!
    Gabor

    Perhaps a more detailed explanation of the issue helps:
    I am developing an online internet bookmarking application. It basically contains a folder tree and bookmarks within the folders.
    The folder tree is implemented by a table referencing itself (main columns are: ID, NAME, PARENT_ID).
    The LOV lists the NAMEs (actually, the full path of each folder as returned by a function) and returns the IDs.
    When the user selects a NAME, folders and bookmarks contained in that folder are listed in a report (non-recursively).
    The action of the user clicking a folder in the report should simulate the above as if they selected the name manually. This is where I need help!
    I hope this helps. Thanks!
    Gabor

  • [svn:osmf:] 13942: 1. Set the default value of _manualSwitchMode back to false

    Revision: 13942
    Revision: 13942
    Author:   [email protected]
    Date:     2010-02-02 13:02:47 -0800 (Tue, 02 Feb 2010)
    Log Message:
    1. Set the default value of _manualSwitchMode back to false
    2. Remove the setter of client property and change relevant methods/properties.
    Modified Paths:
        osmf/trunk/framework/OSMF/org/osmf/net/httpstreaming/HTTPNetStream.as

    i have tried this but this is not working.
    follwing code working for Null case not for False
    vcr.setAttribute("Marked","is null"); this code display all rows who has null but when i checked any row and then unchecked so that row get value "false" also not display.

  • Cannot set the default value of an item in the detailed table

    Hi,
    I have Master-Detail group, both are Table formats.
    I need to set the default value of an item in the details row to the value of an item in the selected row in the Master table.
    I tried Default Display Value=#{row.MasterItem}, but it seems it is trying to access current details row instead of the Master.
    I tried #{bindings.MasterGroupColumnName.inputValue}, but it does not work.
    Any ideas
    Thanks in advance
    Mohamed

    I think I now what I'm doing differently, I had the "New Rows" JHS property of the detailed table group "empty" instead of the default "2" value.
    It seems that "Default Display Value" expression works only for the new records specified in the "New Rows" property. But when I try to "Add" new record using the "Add Row" button, the new record inserted does not have the default values generated, only has values populated for the items of the FK (in the view link) but not the ones set through the property.
    I guess in a nutshell, how I can get the details item to behave like the FK columns?
    Thanks much
    Mohamed

  • Setting the first page in a mobi file

    Hello,
    I am exporting from indesign cs5 to mobi through a plugin. I was wondering if it's possible to manually set the first page that the document opens to. I'd like it to be the cover or the TOC, but my kindle just skips all that and goes straight to the editor's note. I am using a manually created TOC in the indesign document, so that could be why my kindle is skipping it, but I'd like to change that "default" if at all possible. Thanks SO much for your help!

    If you want to use the Acrobat SDK, which is a tool for automating
    Acrobat, you need to buy and install Acrobat on each client.
    Adobe's PDF Library, which doesn't require Acrobat and has a different
    (negotiated) licensing model based on royalties might be a better fit.
    In either case, this would be written in C/C++.
    Aandi Inston

  • Configuration of FP-Modules. In the catalog is something written about sending data on data change. There is a checkbox in the FP-Explorer but I can�t find a configuration menu in FP-Explorer to set the threshold value at which the data will be send.

    Configuration of FP-Modules. In the catalog is something written about sending data on data change. There is a checkbox in the FP-Explorer but I can�t find a configuration menu in FP-Explorer to set the threshold value at which the data will be send.

    : Configuration of FP-Modules. In the catalog is something written about sending data on data change. There is a checkbox in the FP-Explorer but I can�t find a configuration menu in FP-Explorer to set the threshold value at which the data will be send.The FP-1600 modules automatically send data on-change only. The change threshold is by default 0%. Any change, even a single least significant bit change, is sent back to the computer. If the FP-1600 firmware revision supports deadbanding (firmware revision 3.0.x and later, can be downloaded from ftp://ftp.ni.com/support/fieldpoint/Update/FPEthernet0320.zip ). Then on each analog channel or count channel you can specify a percentage change for deadbanding in FieldPoint Explorer. This is done on a channel by channel basis, by right-clicking on the particular IO module and choosing Edit this Device, then choosing Channel Configuration. Each channel (if it supports deadbanding) will have a deadband entry box on the middle right side of the screen).
    The FP-1000/1001 seri
    al network modules do not support deadbanding. The checkbox in FieldPoint Explorer is simply for how FieldPoint Explorer displays the data to the user and does not effect client programs nor the behavior of the network module itself.
    Regards,
    Aaron

Maybe you are looking for

  • Handling BOR events in our ABAP program

    Hi Experts, Can any share an idea/code on how to trap events of BOR object "KNA1" & 'KNB1'? In Tcode : XD01, These events are triggered when we click on SAVE action of new Customer Creation or changes to customer. Any help would be apprecited by awar

  • Playing video clips within Photos app

    I have a pile of video clips taken with a compact Sony player that outputs in MPEG1. Using MPEG Streamclip I converted a number of them into MPEG4 so I could view them on my iPad along with the photos taken at the same time. The problem I have is tha

  • Drawing Diagonal Line

    Hi All, I am new to flex. Can anybody please guide in how to draw a diagonal line in flex? Regards, Gopal

  • Comparative Pricing in IS Retail

    Hi Gurus, I have activated the Contents tab in MARA, Which has four fields net weight, gross weight, comparative unit and comparative unit price, can anyone suggest how to send these details in Assortment List Idoc. Example scenario is, price of 330

  • Can't see my purchases in my library

    My computer recently had to be reset and everything was erased... Shortly after, my iPod stopped working and I had to get a new one. Now I am unable to get my purchases into my iTunes library. Can anyone help me?