Showing checkbox that stores string or integer values in db

Dear All I am working on JDev 12c. I tried to show a checkbox in the interface that stores Integer value in database but it raises an error in 12c. Here is the sample that does not work http://husaindalal.blogspot.com/2010/01/displaying-checkbox-based-on-database.html I think it could be a bug in 12c Regards

What does not work?
What error duo you get.
Not all samples from 11g run without changes in 12c. Some samples use code which was activity uses errors in 11g which are now fixed and break the sample under 12c
Timo

Similar Messages

  • Can anyone tell me the best way to store same key & different value pairs?

    Hi,
    I have a set of string elements & corresponding to them i have values. The only problem i have is that one string element can occur multiple times but with different values. I want to store this in a linked passion. Because i have to read it again to get the same order. Any ideas???

    > If you don't mind, can you elaborate a little more. I
    am a little confused.
    Here's a small demo:
    import java.util.*;
    public class Test {
        private Map map;
        public Test() {
            map = new HashMap();
            this.addSomethingToYourMap("A", new Integer(1));
            this.addSomethingToYourMap("B", new Integer(2));
            this.addSomethingToYourMap("C", new Integer(3));
            this.addSomethingToYourMap("A", new Integer(11));
            this.addSomethingToYourMap("B", new Integer(22));
            this.addSomethingToYourMap("C", new Integer(33));
            System.out.println(map);
        private void addSomethingToYourMap(String key, Integer value) {
            // The key exists, so get the List from your map and add the value in the List.
            if(map.containsKey(key)) {
                List values = (ArrayList)map.get(key);
                values.add(value);
            // The key does not exist, add a new List with the value in it to your map.
            else {
                List newValues = new ArrayList();
                newValues.add(value);
                map.put(key, newValues);
        public static void main(String[] args) {
            new Test();
    }

  • Help with passing integer value in A.S.S

    I get an NSinternal script error while trying to pass this value can anyone help?
    Also I wonder if it is possible to pass the value to a matrix
    on clicked theObject
    tell button "checkbox" of window 1
    if integer value = 1 then
    set button "checkbox2" of window 1 to integer value = 1
    else
    set integer value to 0
    end if
    end tell
    end clicked
    I also tried:
    if state of button "checkbox" of window1 is 1 then
    set the state of button "checkbox2" of window1 to 1
    end if
    Message was edited by: Doug Bassett

    I've been following this thread and trying to figure out how to make this work. I was getting inconsistent results or errors with most of the code that has been posted. But I finally got it working... at least on a Leopard machine (not sure if this could have changed between Tiger and Leopard so your mileage may vary).
    What I found was that a checkbox button that's located directly in a window seems to have a state that's equal to 0 when it's unchecked and 1 when it's checked. But a checkbox cell that's contained within a matrix seems to have a state that's set to either _off state_ or _on state_. Trying to set a cell's state to 0 or 1 simply wasn't working right for me. So I get the state of the "selectall" checkbox button (which is a 0/1) and transform it to either "off state" or "on state" before setting the states of the checkbox cells in the matrix.
    Here's my code:
    on clicked theObject
    set n to name of theObject
    if n = "selectall" then
    set s to state of theObject
    log "state: " & s
    if s = 0 then
    set newState to off state
    else
    set newState to on state
    end if
    repeat with i from 1 to count of cells of matrix "directories" of window "main"
    tell cell i of matrix "directories" of window "main"
    set state to newState
    end tell
    end repeat
    return
    end if
    if n = "logStatesBtn" then
    logStates()
    return
    end if
    end clicked
    on logStates()
    log "Logging states:"
    set s to state of button "selectall" of window "main"
    log "selectall checkbox: " & s
    repeat with i from 1 to count of cells of matrix "directories" of window "main"
    tell cell i of matrix "directories" of window "main"
    set s to state
    end tell
    log "Cell " & i & ": " & s
    end repeat
    end logStates
    Note the "logStates" handler is just something I connected up to a "logStatesBtn" button in my window that lets me spit out the states of all the checkboxes into the console log. This is how I actually discovered that the cells were set to "off state" or "on state".
    Steve

  • Convert an integer value that was created with the Excel DATEVALUE formula to a valid date?

    Hello everyone,
    How can I convert an integer value that was created with the Excel DATEVALUE formula to a valid date in SSIS?
    Is this even possible?
    For example:
    =DATEVALUE("8/22/2008") will format the cell to display 39682.
    Reading the column as a string to get the int value (39682) - how can I turn this into a valid date using SSIS and then importing the real date to sql server?
    Thank you!

    You can use Script component for this and convert your integer values to Date. An example here is following:
    CultureInfo provider = CultureInfo.InvariantCulture;
    string dateString = "08082010";
    string format = "MMddyyyy";
    DateTime result = DateTime.ParseExact(dateString, format, provider);
    Source: http://stackoverflow.com/questions/2441405/converting-8-digit-number-to-datetime-type
    Vikash Kumar Singh || www.singhvikash.in

  • Change integer value to string?

    Hi all,
    I was wondering if it is possible to change an integer value to a string. I saw in this forum that a string can be changed to an integer using parseInt and I was wondering if there is a similar method for going the other way.
    Regards.

    try this
    Integer.toString(intvalue);
    where intvalue is an int like 5.
    hope this helps.
    Takis

  • How to select and store the dynamically clicked values in the checkboxes?

    Hi Gurus
    How to select and store the dynamically clicked values in the checkboxes?
    Scenario:-
    I am having a tree structure but I am not getting that user has clicked the which nodes.
    So how to do it.
    Pls.

    Hi,
    Once again, this is dependent on what your implementation expects. It would seem that your implementation is expecting all of the API to be coded in Java Card so it would make sense that you would load these packages like any other package. Loading an applet is not a special case, it just has an extra step of installing instances of it (and can actually be installed). Any other Java package just needs to be loaded. As such, just load your CAP files for each package of the API before loading any code that depends on it.
    Cheers,
    Shane

  • How to get the value of String in integer type

    how to get the value of String in integer

    {color:#0000ff}http://java.sun.com/javase/6/docs/api/java/lang/Integer.html#parseInt(java.lang.String)
    http://java.sun.com/javase/6/docs/api/java/lang/Integer.html#valueOf(java.lang.String){color}

  • Tables that store the "Personalization" values in Demantra CWB

    Hi All,
    Can some tell me, which tables stores the basic "personalize information" on CWB Demantra.Like i am looking for tables that stores "MY worksheets" information in the home page of CWB.
    Thanks,

    as far as i know...we dont have any table to show the below requirement
    "Like i am looking for tables that stores "MY worksheets" information in the home page of CWB."
    you can only view the list of available worksheets in queries table

  • When I bought things from games, the game always show me that please connect iTunes Store to complete this trancation. I think my visa has enough money!

    When I bought things from games, the game always show me that please connect iTunes Store to complete this trancation. I think my visa has enough money!

    These are user-to-user forums, you can contact iTunes support via this page and ask them why the message is appearing (we won't know why) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page

  • A php search engine that only shows results that match entire serch string

    I have set up a dreamweaver search engine through php and a fulltext search (WHERE MATCH (....) AGAINST (...). However, when someone inputs more than one word into the search form, the search engine churns out results that only have one of those words. How do I get it to only show results that have all the search string words inside? (or, at least, how do I get those results to show up at the top?)
    I have seen some advice (here) that uses php code to process the search query, divide up the words, and place a BOOLEAN '+' between each of the words. By doing this, the search engine will only show results that fully match all the terms.
    My problem is that I do not know how to put this code into my Dreamweaver-created code.
    My dreamweaver created code:
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $form_rsSearch = "-1";
    if (isset($_get['search'])) {
      $form_rsSearch = $_get['search'];
    mysql_select_db($database_dataConnect, $dataConnect);
    $query_rsSearch = sprintf("SELECT title, content FROM encyclopedia WHERE MATCH (title, content) AGAINST (%s)", GetSQLValueString($form_rsSearch, "text"));
    $rsSearch = mysql_query($query_rsSearch, $dataConnect) or die(mysql_error());
    $row_rsSearch = mysql_fetch_assoc($rsSearch);
    $totalRows_rsSearch = mysql_num_rows($rsSearch);
    $input_rsSearchResults = "-1";
    if (isset($_GET['search'])) {
      $input_rsSearchResults = $_GET['search'];
    mysql_select_db($database_EMdataConnect, $dataConnect);
    $query_rsSearchResults = sprintf("SELECT title, content FROM encyclopedia WHERE MATCH(title, content) AGAINST(%s)", GetSQLValueString($input_rsSearchResults, "text"));
    $rsSearchResults = mysql_query($query_rsSearchResults, $dataConnect) or die(mysql_error());
    $row_rsSearchResults = mysql_fetch_assoc($rsSearchResults);
    ?>
    and the code the website (link above) gives is:
    function search(String $search_string) {
         //strip Boolean search characters out of search string
         $search_string = string_replace($search_string,"+","");
         $search_string = string_replace($search_string,"-","");
         $search_string = string_replace($search_string,"*","");
         //split the search string up into an array of words
         Array $tokenized_search = split($search_string, " ");
         //init an empty final search string
         String $processed_search = "";
         //for each word in the search, wrap it
         //with an + and * character and then append
         //it to the processed_search variable
         foreach($tokenized_search as $token) {
              $processed_search+="+"+$token+"* ";
         //build the sql for the query and query the DB
         String $db_query = "select id, description
              from product_descriptions
              where MATCH(description)
              AGAINST ('"+$processed_search+"' IN BOOLEAN MODE)";
         Array results = execute_database_query($db_query);
         return results;
    If anyone can instruct me on the correct way to go about this, I would be very much obliged.
    Thank you,
    YWSW

    Don't use the Search bar, type the address in the Location bar.

  • ITunes store shows "accessing iTunes store..." for few seconds and after that its blank with an apple logo inside the status bar.

    Hi,
        I have recently installed iTunes latest version (10.5.1.42) on Win XP SP3.
    The problem is, when accessing iTunes, It connects to the internet, I can sign in (It shows my username in sign in bar), But nothing is shown in the iTunes store window in iTunes. It shows "accessing iTunes store..." for few seconds and after that its blank with an apple logo inside the status bar.
    ANU SUGGESSION???

    Sorry, no. The screen image you see is specifically saying you need to connect it to a computer. You could take it to an Apple retailer for help.

  • Parsing strings with Unicode values 16 bits

    How can I get the Unicode value for a character in a String when the value is greater than 16 bits?
    I need to extract a supplemental plane Unicode value from a string. However,  String.charCodeAt(index) truncates the Unicode value to 16 bits,  returning what should be 0x02F91A  as  0xF91A.  I see discussions that show that earlier versions of Flex stores such char codes as the two code points of a surrogate pair, but  in Flex 4, the string length is just 1 when I put only this character in the string.

    Does it work in JavaScript?  Could send it over via externalInterface.

  • Concatenate 0 to an Integer value.

    hello experts..
    i want to check the length of the variable if the length of the variable is equal to 1 then i want to concatenate 0 to that
    number.
    i tried like this, i took the value into string variable then cheked the length of the string. and concatenat the 0 to that string and i used the Integer.parseInt() to convert string into integer. when 0 is concatenate to that string then is show correctly but when use Integer.parseInt() then it shows number without concatenated.
    so please help m experts.

    If you are in java code, then the class java.text.DecimalFormat will be useful.
    Giving the jsp solution:
    <fmt:formatNumber value="${numberToDisplay}" minIntegerDigits="2"/>Heres a jsp page to try it out with:
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
    <h2>Number format tag</h2>
      <table>
      <c:forEach begin="1" end="25" var="i">
        <tr>
          <td>${i}</td>
          <td><fmt:formatNumber value="${i}" minIntegerDigits="2"/></td>
          <td><fmt:formatNumber value="${i}" pattern="00"/></td>
        </tr>
      </c:forEach>
      </table>cheers,
    evnafets

  • How to sort a Vector that stores a particular object type, by an attribute?

    Hi guys,
    i need help on this problem that i'm having. i have a vector that stores a particular object type, and i would like to sort the elements in that vector alphabetically, by comparing the attribute contained in that element. here's the code:
    Class that creates the object
    public class Patient {
    private String patientName, nameOfParent, phoneNumber;
    private GregorianCalendar dateOfBirth;
    private char sex;
    private MedicalHistory medHistory;
    public Patient (String patientName, String nameOfParent, String phoneNumber, GregorianCalendar dateOfBirth, char sex) {
    this.patientName = patientName;
    this.nameOfParent = nameOfParent;
    this.phoneNumber = phoneNumber;
    this.dateOfBirth = dateOfBirth;
    this.sex = sex;
    this.medHistory = new MedicalHistory();
    Class that creates the Vector.
    public class PatientDatabase {
    private Vector <Patient> patientDB = new Vector <Patient> ();
    private DateFunction date = new DateFunction();
    public PatientDatabase () throws IOException{
    String textLine;
    BufferedReader console = new BufferedReader(new FileReader("patient.txt"));
    while ((textLine = console.readLine()) != null) {
    StringTokenizer inReader = new StringTokenizer(textLine,"\t");
    if(inReader.countTokens() != 7)
    throw new IOException("Invalid Input Format");
    else {
    String patientName = inReader.nextToken();
    String nameOfParent = inReader.nextToken();
    String phoneNum = inReader.nextToken();
    int birthYear = Integer.parseInt(inReader.nextToken());
    int birthMonth = Integer.parseInt(inReader.nextToken());
    int birthDay = Integer.parseInt(inReader.nextToken());
    char sex = inReader.nextToken().charAt(0);
    GregorianCalendar dateOfBirth = new GregorianCalendar(birthYear, birthMonth, birthDay);
    Patient newPatient = new Patient(patientName, nameOfParent, phoneNum, dateOfBirth, sex);
    patientDB.addElement(newPatient);
    console.close();
    *note that the constructor actually reads a file and tokenizes each element to an attribute, and each attribute is passed through the constructor of the Patient class to instantiate the object.  it then stores the object into the vector as an element.
    based on this, i would like to sort the vector according to the object's patientName attribute, alphabetically. can anyone out there help me on this?
    i have read most of the threads posted on this forum regarding similar issues, but i don't really understand on how the concept works and how would the Comparable be used to compare the patientName attributes.
    Thanks for your help, guys!

    Are you sure that you will always sort for the patient's name throughout the application? If not, you should consider using Comparators rather than implement Comparable. For the latter, one usually should ensure that the compare() method is consistent with equals(). As for health applications it is likely that there are patients having the same name, reducing compare to the patient's name is hazardous.
    Both, Comparator and Comparable are explained in Sun's Tutorial.

  • Getting integer values from a JTable

    Hello
    The table's cells contain integer values. I would like to save each one of theme them in an array of integers.
    The problem is, I don't know how to do so. I tried to use the getValueAt method, but I always get error messages.
    I tried something like:
    Object o = table.getModel().getValueAt(i, j);
    a[x]=Integer.parseInt(o.toString());Please help.
    Thank you. :)

    WalterLaan wrote:
    The next line in the exception stacktrace contains a class name and a line number. So go to that class source file and that line number and fix the problem there.Yes, guenouni, we're not mind readers. You need to be clearer and give precise details. The single best way to get the most useful possible help is to take a few minutes and write and post a SSCCE . If you do that, it will show your serious.

Maybe you are looking for

  • How can use my songs as my ringtone...???

    How can use my songs as my ringtone...???

  • How can I make "grunge text" ?

    Using PS cs5 extended with win 7 pro.  I've been trying to figure out how to make grunge (sp?) text.  I figured  I would need to make some type of layer with lines on it, put it above the text and then use a clipping mask.  I don't know how to make t

  • Dispatch purchase orders using PORDCR1

    Dear all, we have to send POs to an external logistics service provider. We first tried to use Idoc ORDERS but there are several fields missing in this idoc: - overdeliv.tol. - underdel.tol. - delivery completed - accounting information concerning th

  • User exit during VF04 background process

    Hi , I am creating billing through the background run of VF04. Before a billing document is created I have to check the following condition. If the payment terms of the relevant billing item not equal to 'X' then system shoudl check the billing date

  • Niggly problem with Hotmail - Sending from a third party email address

    I need true push email on my BlackBerry, but also need access from a PC and need to send from my own email address. The easiest way I've found to do this is to forward all emails to my own address to a Hotmail address and use Hotmail as my main provi