How can I use jbo:InputSelect for a char type filed?

How can I use <jbo:InputSelect for a char type filed?
I have two tables. One is room (primary key is room(type is char)), another table is responsibility (foreign ker is room(type is char)). Both tables have same length for room column.
There is a problem:
If I use (in the "DataEditComponent.jsp" file)
<jbo:InputSelect multiple="false" datasource="dsEdit" displaydatasource="roomData" displaydataitem="ROOM" displayvaluedataitem="ROOM" ></jbo:InputSelect>
to get the room input for responsibility from combobox(Datasource roomData is from room table). In the form the room field cannot bind the data in combobox, alway select the first item. And if I select one item and click the update button.There is an error message:
Error Message: JBO-27010: Attribute set with value H409 for Room in Responsibility has invalid precision/scale
I found If I changed the field type from char to varchar2 in database also change the entity objects, it works well. I wonder if there are any diffrence using <jbo:InputSelect tag in char and varchar2 type. How can I use <jbo:InputSelect for a char type filed as i don't want to change my datatype in database at this stage.
I try this in JDeveloper 9.03, 9.034, 9.04. The result is the same.

If I were in your shoes, here's how I would do it:
<%-- Assuming you have dsRoom and dsResponsibility --%>
<%-- Select is an HTML tag --%>
<select name="ROOM" size="1">
<% char roomID =""; // Init your character var
// Open a rowsetIterator to get the records and add them to the LOV
<jbo:RowsetIterate datasource="dsResponsibility" changecurrentrow="true" >
<% roomID = (char)dsResponsibility.getRowSet().getCurrentRow().getAttribute("ROOM"); // Grab the char value
// add the value to the LOV
%>
<option value="<%=roomID%>"><%=roomID%></option>
</jbo:RowsetIterate>
</select>
If you are using this as part of an edit page you may want to utilize the "selected" option of the <option> tag. In one instance I am doing this on an edit page because the use may open an existing record. If I don't account for it, then it will change the DB to contain the first value from the list! You can do a simple check like:
//Set the current record's char
char curRecord = (char)rowEdit.getAttribute("ROOM");
// inside the iterate:
if (curRecord == roomID) {
<option value="<%=roomID%>" selected><%=roomID%></option>
} else {
<option value="<%=roomID%>" ><%=roomID%></option>
Hope that helps!

Similar Messages

  • How can I use jbo:ShowValue for some columns and bc4juix:RenderValue for other co

    Using a UIX/JSP page, how can I get the <jbo:ShowValue> tag to work in the following situation? I've ditched the "AttributeIterate" so that I can manually select the columns I want.
    --- snip ---
    <uix:form name="form1" method="GET">
    <bc4juix:Table datasource="ds1" >
    <uix:columnHeaderStamp>
    <uix:styledText textBinding="LABEL"/>
    </uix:columnHeaderStamp>
    <%--
    <jbo:AttributeIterate id="dsAttributes" datasource="ds1" hideattributes="UixShowHide">
    <bc4juix:RenderValue datasource="ds1" dataitem="<%=dsAttributes.getName()%>" />
    </jbo:AttributeIterate>
    --%>
    <bc4juix:RenderValue datasource="ds1" dataitem="FacilityDesc" />
    <bc4juix:RenderValue datasource="ds1" dataitem="LocationId" />
    <bc4juix:RenderValue datasource="ds1" dataitem="LocationDesc" />
    <%-- ** THE FOLLOWING DOES NOT DISPLAY ON THE BROWSE_EDIT_PAGE ** --%>
    <jbo:ShowValue datasource="ds1" dataitem="Notes" ></jbo:ShowValue>     
    <%-- ** THE FOLLOWING DOES NOT DISPLAY ON THE BROWSE_EDIT_PAGE ** --%>
    <uix:rawText>
    <jbo:ShowValue datasource="ds1" dataitem="Notes" ></jbo:ShowValue>     
    </uix:rawText>
    <%-- ** THE FOLLOWING DOES NOT DISPLAY ON THE BROWSE_EDIT_PAGE ** --%>
    <uix:contents>
    <uix:rawText>
    <jbo:ShowValue datasource="ds1" dataitem="Notes" ></jbo:ShowValue>     
    </uix:rawText>
    </uix:contents>
    --- snip ---
    What am I doing wrong and how can I fix this?
    Bill G...

    This will not work inside of the bc4juix:table, this tag pulls the data from the data source, it doesn't allow you to add ShowValue tags inside of the table. Take alook at the UIX Developer Guide for more information on the Table tag. The ShowValue tag can be used in a uix hierarchy outside of the tabel tag.

  • HT204053 Dear Support Team, every time i tried to logon Icloud its gives me wrong user name or password and at the end it show me error " This Apple ID is valid but is not an ICloud Account" then how can i use one account for same Apple ID and ICloud???

    Dear Support Team,
    Every time i tried to logon Icloud its gives me wrong user name or password and at the end it show me error " This Apple ID is valid but is not an ICloud Account" then how can i use one account for same Apple ID and ICloud?
    Thanks

    It is not possible to create a new iCloud account using a Windows machine. You must create the account using a Mac (10.7.5 or more) or an IOS device (iPhone etc). Once that is done you can sign into and use the account on your Windows machine.

  • HT3354 how can i use one table for reference to another

    how can i use a table for a referance to another eg when i type a word in a cell, i will like it to match the word with another table then return the information in the cell i am using

    you can use vlookup() (or any of the lookup family of functions) to locate an item based on a key value:
    Here is an example of something you can do with two tables:
    The table on the right is title "Data" and stores a list of names with age and favorite color.
    The table on the left uses the value in the first column to lookup up information in the table Data
    in the table on the left:
    B2=IFERROR(A2&" is " & VLOOKUP(A2, Data :: A:D, 2, 0)&" years old and likes the color "& VLOOKUP(A2, Data :: A:D, 3, 0), "NOT FOUND")
    I know this look complicated.  so I'll break it up into smalled pieces:
    first the "&" is called the concatenate operator and joins two strings.  like this:
    a string is a set of characters between double quotes.
    so "string 1" & "string 2" becomes "string 1string2"  or "Sam " & "Jones" becomes "Sam Jones"
    you can use cell references instead of strings directly in which case the concatenation is performed on the contents of the cells.
    so if cell A1 contains "Hi " and the cell A2 contains "There"  then A1 & A2 will result in "Hi There"
    so you could add the formula
    A3=A1 & A2
    this is short hand for select cell A3 then type everything including the A3 so that A3 contains "=A1 & A2" (omit the double quote)
    OK.  So the formula I provided concatenates several items together:
    it concatenates A2, then the string " is " then a formula, then the string " years old and likes the color " then a formula
    the two formulas (highlighted in blue) perform a lookup of the value in cell A2 in columns A thru D of the table named "Data".  If if finds the value in cell A2 in the first column of the lookup range in the table Data (column A) then it returns the value from the same row but in the second or third column.
    all that is in a function calld iserror() to trap the condition where the calue you enter in A2 does not exist in the table Data:
    You will find the Numbers users guide and function reference helpful.  You can download then from Apple here:
    http://support.apple.com/manuals/#productivitysoftware

  • HT204053 Hello, I have two iphones but one Apple ID. How can I use localization apps for a dedicated device? Tx

    Hello, I have two iphones but one Apple ID. How can I use localization apps for a dedicated device? Tx

    On the iPad open Settings/iCloud and delete the account using the button at the bottom. Once deleted log in using the other account. For iTunes Stores use Settings/iTunes & Apps Stores, tapp on the Apple ID at the top then sign out. Once done sign in using the other account. Once you are happy with the changes plug your iPad into your computer to update the backup.

  • TS3988 It seams that i have another Apple ID, how can i use only one for everything?

    It seams that i have another Apple ID, how can i use only one for everything?

    http://support.apple.com/kb/HT5622?viewlocale=en_US
    -The specific point:
    Apple IDs cannot be merged. You should use your preferred Apple ID from now on, but you can still access your purchased items such as music, movies, or software using your other Apple IDs.
    If you are wondering how using multiple Apple IDs relate to iCloud, see Apple IDs and iCloud.

  • How can i use diffrent database for same file in same project?

    I want to use two database. First normal environment, second for budget. Second copy from first environment. For example 1. database name = "MRP" , 2. database name = "MRPBUDGET".When program is start, users can select database. My question how can i use which selected database name in program.
    Thanks a lot for your help,

    Hi giri,
    I test it. When i change
    cocukRowSet.setDataSourceName("java:comp/env/jdbc/mysql_dogum");
    cocukRowSet.setDataSourceName("java:comp/env/jdbc/mysql_dogum1");
    in SessionBean1.java
    i run it. But this page of project is open explorer it didn't change sun-web.xml and web.xml in projetct directory(line
    <resource-ref>
    <res-ref-name>jdbc/mysql_dogum</res-ref-name>
    <jndi-name>jdbc/mysql_dogum</jndi-name>
    </resource-ref>
    When i close this page of project from explorer , i clean and build project and then find in project "dogum1", i saw true value in sun-web.xml and web.xml. Project is running true.
    How can i change xml file when project running. Can i use drop down list for database name(which change run time)
    Thanks,

  • How can I use flash builder for php?

    Hello! I saw a flash banner maker website http://ideal-banners.com/. My question that how can I use a flash builder for php?

    Hi Michael,
    Thanks for your two helpful replies.  The article by V. Brossier looks very useful, and I managed to use SDK 3.3 with FB.  But I had misdiagnosed my problem.  The problem was that the compiler was targetting Flash Player 9 instead of 10.  I've managed to fix that.
    Thanks again,
    Francisco

  • How can I use phonetic fonts for cursors name

    Hi all!
    I need to use phonetic characters in cursors names. Does somebody know wich font I have to use for this ?
    One other problem is that I need to use Vietnamese characters at the same time. Is it possible to change the font of the cursors names run-time (in the diagram)?
    Last quetion: Does LabVIEW support unicode? If yes,how can I use it?
    Thank you for your help!
    Nico

    > Effectively, dual-byte encodind is allright to support Vietnamese and
    > Western languages. But how did I get the phonetics characters? With
    > shortcut key ?
    > As I need the user to change the cursor name run-time without using
    > the frontpannel cursor legend, I'm using property node and a subVI
    > asking for this name. (The user will enter the name in a string
    > control).
    > Moreover I would like the user to have the possibility to choose a
    > character in a pannel (something similar to the menu 'insert symbol'
    > in MS Word). Is it possible to do this ? With Active X maybe, but I
    > don't know which activeX objet I can use....(I am not very familiar
    > with ActiveX).
    Unfortunately, I don't know what the phonetic characters look like, so I
    can't
    tell you what to type to enter them. If you find them in Word,
    you should be able to copy them to the clipboard, they will be in
    Unicode, and paste them into LV -- where they will be converted to dual
    byte. If it doesn't work, try to find out if they are exist in the
    locale of your machine, or more importantly, the target machine.
    If you can display them, you can build a simple ring with short strings
    containing the phonetic characters. When the user picks something from
    the ring, use the strings property and value to index out the string and
    replace/append to the string the user is editing. You will want to pay
    attention to the string's selection if this is supposed to act like a
    character palette and either do an insert or replace.
    If you want a more compact grid menu, you will need to convert the
    strings to images and paste them in a pict menu. That value can be used
    to index a constant array that matches the order in the pict ring.
    Greg McKaskle

  • HT4009 I would like to make an in app purchase using my $20.00 credit that I have on I tunes. I am using my  i phone5. It does not give me the choice of using the credit that I have, only a credit card. How can I use the credit for the purchase??

    I would like to make an in app purchase using the $20.00 credit that I have on itunes. I am using my i phone5. It does not give me the option of using the credit that I already have, only of using a credit card. How can I use the credt that I already have instead of a credit card?

    Is Settings > General > Restrictions > In-App Purchases: ON (green)?
    Some In-App Purchases works only with credit card.

  • How can I use Family Sharing for Store purchases if I use a different Apple ID for purchases?

    A key feature of Apple's iCloud Family Sharing is the ability to share store purchases with invited family members. However, like many people, I use a different Apple ID for iCloud and Store purchases (ironically, primarily for the exact purpose of sharing among family).
    Can I use iCloud Family Sharing to share purchases if I use a different Apple ID for Store (iTunes, App Store, etc.) purchases?

    Sorry, let me clarify. I have two Apple IDs A and B:
    A: Used for iCloud. All my calendar, mail, contacts, and other iCloud features are here. This is the ID I use as "the" iCloud on my iOS devices and OS X machines.
    B: Used only for purchases, on all my devices and machines. This is what I used to log into iTunes, or to buy apps for iOS or OS X.
    The issue is that the only way (currently) to set up Family Sharing is to invite from an iCloud ID (A, in my case) on an iOS 8 device. That's not the ID (B) I use for purchases. The question is whether there's a way to share those purchases given that I'm configured on all my devices with A for iCloud. (Clearly if I somehow send invitations from B, I can share purchases; but that's not the question.)
    It sounds like the answer to that question is 'No'.
    If that's the case, how do I invite from B? Do I have to configure an iOS device with B as the iCloud ID? My problem isn't that I want to ("willy nilly") avoid inviting form B; it's that there seems to be no way (certainly no convenient way) to do that.

  • XCode: How can I use dictionary controllers for 2 dict's with a common key?

    I have two dictionaries, both with the same key. Using Interface Builder I can build for each dictionary a two-column table, but I did not find out how to connect their keys so that selecting a line in one table automatically selects the corresponding line in the other table.
    Does there exist a binding between the two controllers that solves the problem? If so, how can it be established?
    (First I tried to use only ONE table - with 3 columns. This appeared to me the best way. But again I could not establish the appropriate binding.)

    Hans,
    You may want to post your question in the following group.
    http://discussions.apple.com/forum.jspa?forumID=727

  • How can i use a database for practice in DOS

    i have some problems in the sqlplus.
    My OS is windows2000 server,when i intalled the Oracle 8i
    i type a command 'cmd' go to DOS.and type "sqlplus username/password@database"
    but always the system say that my database name can't be deal with.
    and i want to get a sample database for training SQL statements.How can i get it.
    is Oracle 8i have the sample database.

    It sounds like your database hasn't been started yet so do this:
    Try typing svrmgrl at the c:> -- if it doesn't work you might either have to go to the proper directory or type sqlplus to get an sql:> prompt (I don't remember it's been a while) but the rest I am pretty sure about---
    When you get the svrmgr prompt:
    use (i think) "connect internal"
    and "oracle or Oracle" as password
    once you do this
    it should say connected
    then use: svrmgr:>shutdown -- shutsdown DB
    then use: svrmgr:>startup -- starts DB
    hopefully then you can access your database through SQL Plus

  • How can i use this color for my Application Background ?? Screen Shot Attached

    Hi ,
    I can find only plain colors on to Color Picker , but this is line mixed color
    How can use this attached Color for my Applications Background Color .
    Please find the Screen Shot attached .
    please see the background  color

    Are you trying to apply a gradient background?
    In Flex 3 in Application tag:
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
      backgroundColor="#666666"
      backgroundGradientColors="[#333333, #666666]">
    </mx:Application>
    In Flex 4 you need to set the backgroundColor and apply a skin for the gradient:
    -------------- mySkins/MyAppSkin.mxml -------------
    <?xml version="1.0" encoding="utf-8"?>
    <!-- containers\application\mySkins\MyAppSkin.mxml -->
    <s:Skin xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:mx="library://ns.adobe.com/flex/mx"
            xmlns:s="library://ns.adobe.com/flex/spark">
      <fx:Metadata>
        [HostComponent("spark.components.Application")]
      </fx:Metadata>
      <s:states>
        <s:State name="normal" />
        <s:State name="disabled" />
      </s:states>
      <!-- fill -->
      <s:Rect id="backgroundRect" left="0" right="0" top="0" bottom="0">
        <s:fill>
          <s:LinearGradient rotation="90">
            <s:entries>
              <s:GradientEntry color="0x333333" ratio="0" alpha="1"/>
              <s:GradientEntry color="0x666666" ratio=".66" alpha="1"/>
            </s:entries>
          </s:LinearGradient>      
        </s:fill>
      </s:Rect>
      <s:Group id="contentGroup" left="10" right="10" top="10" bottom="10">
        <s:layout>
          <s:VerticalLayout/>
        </s:layout>
      </s:Group> 
    </s:Skin>
    -------------- test.mxml -------------
    <?xml version="1.0"?>
    <!-- controls\button\PopUpButtonMenu.mxml -->
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark"
                   xmlns:mx="library://ns.adobe.com/flex/mx"
                   height="100%" width="100%">
      <s:SkinnableContainer skinClass="mySkins.MyAppSkin"
        width="100%" height="100%"/>
    </s:Application>
    If this post answers your question or helps, please mark it as such. Thanks!
    http://www.chikaradev.com
    Adobe Flex Development and Support Services

  • How can I use 1 JSP for edit/create functionality?

    Hi All,
    Does anybody have an example of using one JSP for both editing and creating an object? I am pretty sure I can handle most of it, but am not sure about how I can specify different messages from the resource bundle (i.e. modifying the screen title for the different uses, "New Campaign" vs. "Edit Campaign").
    My background is in PHP and DHTML (i.e. more front-end) and I'm just starting with Java and JSF. As such, I want to be sure that I'm using appropriate patterns for my programming.
    Thank you in advance for any help,
    Matt

    I make the difference between modifying an existing object and a new one by the ID in the object. Each object has a unique ID in my app assigned by the database. So if the ID is 0, the user is creating a new object, not stored in the DB yet. I store the object to be edited/modified in the session before displaying the page:
    For the title:
    <h:outputText value="Edit Material" rendered="#{sessionScope.selectedMaterial.materialId != 0}"/>
    <h:outputText value="New Material" rendered="#{sessionScope.selectedMaterial.materialId == 0}"/>For the action buttons:
    <h:commandButton value="Update Material" action="#{MaterialControllerBean.updateMaterial}" rendered="#{sessionScope.selectedMaterial.materialId != 0}"/>
    <h:commandButton value="Create Material" action="#{MaterialControllerBean.createMaterial}" rendered="#{sessionScope.selectedMaterial.materialId == 0}"/>

Maybe you are looking for

  • Flash files not working in Cap 5.5 upgraded from Cap 3 or 4 and Flash 8

    We just upgraded some projects from Captivate 3 and Captivate 4 to Captivate 5.5 and now some of the .swf files we have on certain slides do not play. They play in Flash itself and they play in Captivate when I use F3 for that slide, but when I creat

  • IDVD ONE STEP

    How do I get out of One Step? Somehow I inadvertently opened one step and now when I want to open iDVD 5, it's only one step that opens when I click on the iDVD icon. I might add, that I'm very much the novice when it comes to computers so please, do

  • Create Command using jsp

    Hi all I want to create custom commands and i have achieved to create one by extending AbstractCommand. The thing is that the user interface is built creating the htmlb components from java code. I want to use a jsp for this. ¿How can I redirect to a

  • Anti Virus Soft corrupting Photoshop Elements 4.0

    I recently upgraded my antivirus software from Shield Deluxe 2008 to 2010.  When the antivirus features are running, I get two error messages, "Attempt to access invalid address"  and then, "The action you have requested could not be completed becaus

  • SA owns Agent Jobs but is Disabled

    Many of our Sql Server Agent jobs (2008 r2)  are Owned by SA. This has never presented any challenges and jobs run fine. I just noticed that the SA account is "Disabled" but still owns jobs which are running.  I don't remember disabling the account,