BC4J jbo:SetAttribute tag and NULL

Is there a really good reason that jbo:SetAttribute takes input fields and does a case-insensitive comparison with the word NULL and clears the attribute?
I found the code in HtmlServices.java (oracle.jbo.html).
I can see why someone may want it, but in our case, we actually have a person who has the last name, you guessed it, NULL. There may be many data entry fields which have this. It's simple enough to work around in code, but I have to sprinkle it across many fields on many pages.
I guess I could hack HtmlServices.java and eliminate this but:
a) I believe this file is included in the bc4j libraries on 9ias and can not be easily over-ridden
b) mucking with vendor supplied source code has definitely bitten in the past and new versions, etc, will be a pain.
Is this really necessary to handle the word NULL?
Thanks,
Jeff

The formatting routine are currently not available without a Row.
I filed a bug to have that fixed by next release (9.0.3).
Note that the routine will have to check for a formatted value first and set the non-formatted result to the ViewCriteria. But it will also need to work when non-formatted values are entered.
Charles.

Similar Messages

  • How to force simple tags and null attributes to appear when using SQL/XML?

    Hello everybody:
    I'm developing a non-schema based XMLType view.
    When the XML document is generated, i noticed two things I need to manage in order to achieve the desired result:
    1. Oracle generates a <tag></tag> pair for each XMLELEMENT defined; in my case, some tags need to appear as <tag/>... how do I do? Is it possible when using schema based XMLType views? Is it possible while using a non-schema approach?
    2. When using XMLATTRIBUTE('' AS "attribute") or XMLATTRIBUTE(NULL AS "attribute"), no one attribute with label "attribute" and null value appears at the output; how do I force to Oracle DB to render those attributes which are with no values (needed to render those attributes as another parsing code will await for all the items)?
    3. Some tip about how to route the output to an XML text disk file will be appreciated.
    Thanks in advance.
    Edited by: Enyix on 26/02/2012 11:21 PM
    Edited by: Enyix on 26/02/2012 11:22 PM

    Hello odie_63, thanks for your reply:
    Reasons why needed single tags are these two next: Needed to generate a single XML file from 50,000,000 rows, where the XML ouput matches not only row data but another default values for another elements and attributes (not from database but using strings and types with default values); by using start and end tag, the generated file is as much twice bigger than using single tags; second, needed a very precise presentation for all the document.
    For generating that document, currently focus is based on using a batch process relying on Spring Batch with using a single JDBC query where a join happens between two tables. From my point of view, that approach uses: database resources, network resources, disk resources, and processing resources, including the price of making the join, sending to network, creating objects, validating, and making the file (Expending too much time generating that XML file). That processs currently is in development.
    I think possibly another approach is delegating the complete generation of that file to the database using its XML capabilities. My current approach following your recomendations is to generate a clob where I will put all the XML and putting it into a table. It leads me to another issues: Considering limitations on memory, processing and disk space, needed to append a single row-as-xml into the clob as soon as possible, and putting the clob inside the field as soon as possible, or putting the clob inside the field, and appending into it as the data is generated; so How do I manage the process in order to achieve that goals?. Seen these issues aren't related to my original question, so I'll open a new post. Any help will be apreciated.
    Thanks again in advance.

  • Using bc4j jbo tags

    Hot to get the id of a topic added in previous jsp page using bc4j jbo tags

    Do you want to use the value in a Java variable? If so then here's what you do:
    1) Inside your rowset iterate tag, use the <jbo:Row> tag and set action="active". It will look like this:
    <jbo:Row id="rowActive" datasource="ds" action="active" ></jbo:Row>
    2) In script, you can access the attribute you want by calling rowActive.getAttribute(); ... One thing to note is that this returns an Object. You will need to type cast it before assignment. For example, say you are retrieving column Test of type Number...
    <%
    oracle.jbo.domain.Number tempNumber;
    tempNumber = (oracle.jbo.domain.Number)rowActive.getAttribute("Test");
    %>
    Hope that helped!

  • BC4J, jsp data tags, jbo tags , documentation

    Hi everybody
    Would you please advise me where I can find information and documentation preferably in .pdf format about jbo jsp tags for working with BC4J?
    Thanks in advance

    Hello
    .CHM (or "chum") are Microsoft's way of bundling help files, and require Internet Explorer to be installed on your system. If you want to view the chum files without starting up JDeveloper, you can double-click a .chm file (start with jdeveloper.chm to work with the entire set).
    As an additional solution, we've provided HTML versions of the docs which are viewable between the major browsers on the different platforms (you'll need javascript enabled).
    The doc set was not designed to be compiled/distilled into pdf and is not recommended.
    Thanks for your comments!
    orlando

  • Problems with BC4J input select tag when its bounded to a primary key field

    HI..
    I have an jsp BC4J edit form. This form uses a BC4J input select tag. This component is mapping one of the primary key Entity fields.
    When im working with this component and it doesnt map a primary key field it shows the default "none" value when im inserting a record(thats Ok). but when it maps a primary key field the default value is a database value so it is not advisable.. How can i do in order to fix that?
    Thank you

    The none value is only shown when the field accepts null values.

  • Error with bc4j input date tag running a Jsp file.

    when im running the bc4j input date tag in a form, a jscript error comes up (object not found error)-> When i pick the date control. I have already checked the cabo directory and all files is there. The same enviroment in other developers PC�s works well.
    Have you got that error?
    how can i fix it?
    The calendar never comes up.
    Thank u

    The none value is only shown when the field accepts null values.

  • Nesting a BC4J JSP data tag within a Struts tag?

    Has anybody tried nesting a BC4J JSP data tag within a Struts JSP tag? I can't get it to work. For example,
    <logic:equal name="sort" value="<jbo:ShowDefinition datasource='ds' dataitem='CustomerName' definition='ColumnName' />">
    blah blah blah
    </logic:equal>

    Try using single quotes in the value=' ' and double quotes in the jbo tag usage.

  • XMLGEN: Produce XML dump of a table WITH tags for null column values

    I am new to generating XML so bear with me....
    We have a customer who needs an XML extract of data, including tags for any column that is null.
    I created a simple test case below using DBMS_XMLGEN.getXML. The first row (A1) has no null values and thus tags for columns A, BEE and CEE are produced. The second row (A2) has null in column BEE and thus tags for only columns A and CEE are produced.
    Is there a way to force a tag for null column BEE in the second row?
    create table foo (A varchar2(10), BEE number, CEE date);
    insert into foo values ('A1',1,sysdate);
    insert into foo values ('A2',null,sysdate);
    SELECT DBMS_XMLGEN.getXML('SELECT * FROM foo') FROM dual;
    <ROWSET>
    <ROW>
    <A>A1</A>
    <BEE>1</BEE>
    <CEE>27-SEP-12</CEE>
    </ROW>
    <ROW>
    <A>A2</A>
    <CEE>27-SEP-12</CEE>
    </ROW>
    </ROWSET>

    What's the database version? (SELECT * FROM v$version)
    Could you use this instead :
    SQL> select xmlserialize(document
      2           xmlelement("ROWSET",
      3             xmlagg(
      4               xmlelement("ROW",
      5                 xmlelement("A", a)
      6               , xmlelement("BEE", bee)
      7               , xmlelement("CEE", cee)
      8               )
      9             )
    10           )
    11         -- for display purpose only :
    12         as clob indent
    13         )
    14  from foo
    15  ;
    XMLSERIALIZE(DOCUMENTXMLELEMEN
    <ROWSET>
      <ROW>
        <A>A1</A>
        <BEE>1</BEE>
        <CEE>2012-09-27</CEE>
      </ROW>
      <ROW>
        <A>A2</A>
        <BEE/>
        <CEE>2012-09-27</CEE>
      </ROW>
    </ROWSET>
    Or,
    SQL> select xmlserialize(document
      2           xmlquery(
      3             '(#ora:view_on_null empty #)
      4             {
      5               <ROWSET>{fn:collection("oradb:/DEV/FOO")}</ROWSET>
      6             }'
      7             returning content
      8           )
      9           as clob indent
    10         )
    11  from dual;
    XMLSERIALIZE(DOCUMENTXMLQUERY(
    <ROWSET>
      <ROW>
        <A>A1</A>
        <BEE>1</BEE>
        <CEE>2012-09-27</CEE>
      </ROW>
      <ROW>
        <A>A2</A>
        <BEE/>
        <CEE>2012-09-27</CEE>
      </ROW>
    </ROWSET>
    (where "DEV" is my test schema)
    If you want to stick with DBMS_XMLGEN, you're gonna have to use PL/SQL and setNullHandling procedure.
    Edited by: odie_63 on 27 sept. 2012 17:14

  • Oracle tags and JavaScript

    Attention JavaScript and Oracle Guru's,
    My company has come up with a great requirement using JavaScript and dynamic pages to provide end users with a Systems Availability Information portlet, which scrolls text along the screen.
    This is as follows.....
    They want a Portlet which scrolls text along the screen on the users home page. This has been easy enough to implementbut now this information has to be supplied from the database (an Internal Systems Operation team input information into this table via a form)
    HmmmmOracle tags do not work within JavaScript. So I have created a hidden form on the outside of the JavaScript to pass in text.
    This works great with normal text variables, so I thought the addition of Oracle tags would be the next logical step needed to pass data from the database into the scrolling text Portlet.
    With use of the <Oracle> tags and hidden variables I have managed to come up with the following....
    <html>
    <body>
    <form id="hiddenOracleForm">
    <input type="hidden" name="recordset1" value="<oracle> select * from mnunn.matt_ticker_table</oracle> ">
    </form>
    < !-- START OF SCRIPT -->
    <HTML>
    <BODY BGCOLOR="FFFFFF" TEXT="000000" LINK="0000FF" VLINK="800080" ALINK="FF0000">
    <head>
    <script language="JavaScript">
    < !-- begin
    var max=0;
    function textlist()
    max=textlist.arguments.length;
    for (i=0; i<max; i++)
    this=textlist.arguments[i];
    document.write('the variable for rs1 is ' + rs1);
    var rs1 = document.forms['hiddenOracleForm'].recordset1.value;
    tl=new textlist
    rs1
    var x=0; pos=0;
    var l=tl[0].length;
    function textticker()
    document.tickform.tickfield.value=tl[x].substring(0,pos)+"_";
    if(pos++==l) { pos=0; setTimeout("textticker()",1000); x++;
    if(x==max) x=0; l=tl[x].length; } else
    setTimeout("textticker()",50);
    // end -->
    </script>
    <head>
    <body onLoad="textticker()" >
    <center>
    <form name="tickform"><input type=text name="tickfield" size=40></form>
    </BODY>
    </HTML>
    < !-- END OF SCRIPT -->
    <img src="file://hofisintranet1/qualitydocs$/DW/stag bitmaps/monfaq.gif" border="0">
    < !-- START OF SCRIPT -->
    < !-- For more scripts visit http://www.hof.co.uk -->
    <FORM><input type="button" Value="Click here for full details" ONCLICK="window.open('http://www.hof.co.uk', 'Sample', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=635,height=260')"></FORM>
    < !-- END OF SCRIPT -->
    </body>
    </html>
    Now when this scrolls along the screen, I do not get the expected outcome from the database table. Instead it scrolls.<TABLE border=
    I dont know where this information has come from because it should say..
    Enter password:
    Connected to:
    Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
    JServer Release 8.1.7.0.0 - Production
    SQL> select * from mnunn.matt_ticker_table;
    INFO
    This is information taken from the portal database
    SQL>
    Has anybody tried this before or got any ideas on where I could be going wrong??????
    Thanks for any help..Matt.
    null

    I'll try for the repost. This time without the compilation of the code......here goes.
    Attention JavaScript and Oracle Guru's,
    My company has come up with a great requirement using JavaScript and dynamic pages to provide end users with a Systems Availability Information portlet, which scrolls text along the screen.
    This is as follows.....
    They want a Portlet which scrolls text along the screen on the users home page. This has been easy enough to implementbut now this information has to be supplied from the database (an Internal Systems Operation team input information into this table via a form)
    HmmmmOracle tags do not work within JavaScript. So I have created a hidden form on the outside of the JavaScript to pass in text.
    This works great with normal text variables, so I thought the addition of Oracle tags would be the next logical step needed to pass data from the database into the scrolling text Portlet.
    With use of the <Oracle> tags and hidden variables I have managed to come up with the following....
    <form id="hiddenOracleForm">
    <input type="hidden" name="recordset1" value="<oracle> select * from mnunn.matt_ticker_table</oracle> ">
    </form>
    <!-- START OF SCRIPT -->
    <BODY BGCOLOR="FFFFFF" TEXT="000000" LINK="0000FF" VLINK="800080" ALINK="FF0000">
    <head>
    <script language="JavaScript">
    <!-- begin
    var max=0;
    function textlist()
    max=textlist.arguments.length;
    for (i=0; i<max; i++)
    this=textlist.arguments[i];
    document.write('the variable for rs1 is ' + rs1);
    var rs1 = document.forms['hiddenOracleForm'].recordset1.value;
    tl=new textlist
    rs1
    var x=0; pos=0;
    var l=tl[0].length;
    function textticker()
    document.tickform.tickfield.value=tl[x].substring(0,pos)+"_";
    if(pos++==l) { pos=0; setTimeout("textticker()",1000); x++;
    if(x==max) x=0; l=tl[x].length; } else
    setTimeout("textticker()",50);
    // end -->
    </script>
    <head>
    <body onLoad="textticker()" >
    <center>
    <form name="tickform"><input type=text name="tickfield" size=40></form>
    </BODY>
    <!-- END OF SCRIPT -->
    <img src="file://hofisintranet1/qualitydocs$/DW/stag bitmaps/monfaq.gif" border="0">
    <!-- START OF SCRIPT -->
    <!-- For more scripts visit http://www.hof.co.uk -->
    <FORM><input type="button" Value="Click here for full details" ONCLICK="window.open('http://www.hof.co.uk', 'Sample', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width=635,height=260')"></FORM>
    <!-- END OF SCRIPT -->
    Now when this scrolls along the screen, I do not get the expected outcome from the database table. Instead it scrolls.<TABLE border=
    I dont know where this information has come from because it should say..
    Enter password:
    Connected to:
    Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
    JServer Release 8.1.7.0.0 - Production
    SQL> select * from mnunn.matt_ticker_table;
    INFO
    This is information taken from the portal database
    SQL>
    Has anybody tried this before or got any ideas on where I could be going wrong??????
    Thanks for any help..Matt.

  • JSP Data Query tag and case sensistivity

    Hello,
    When using BC4J Data Query tag in JSP apps how to make queries case INSENSITIVE? I undestand that string comparison in Oracle is case sensiteve and hence my dynamic query will be also. However, I would like to do something like
    select * from bla
    where upper(attribute) = upper(string) where the string is from the JSP query form entered by user.
    rade

    Use a standard INPUT tag combined with the DataValue tag. This will allow you to control the input tag while still getting the data from a BC4J attribute.

  • Passing variables between data tag and Java

    Hello all,
    I have a question about using variables between data tag and java.
    Let me explain.
    I would like to populate variable "Test" with
    the information returned by jbo data tag library.
    <code>
    <% String Test = "%><jbo:ShowValue datasource="ds" dataitem="Cod" /><%";%>
    or
    <% String Test = "<jbo:ShowValue datasource="ds" dataitem="Cod" />";%>
    </code>
    This code did not work.
    Some suggestions
    Thanks
    Humberto
    null

    Humberto,
    I'm afraid I do not know the specific answer
    to your question (perhaps Juan the Data Tag
    Wizard will reply ;-). I vaguely recall
    struggling with teh same issue when I was
    playing with the tags for a demo. Here
    is a hack-around lifted from my demo
    that might help:
    <jbo:Row id="privRow" action="CURRENT" datasource="privileges" />
    <%
    String privName = (String)privRow.getAttribute("Privilegename");
    %>
    In other words, I ended up using the Row
    tag to get a local Java variable bound to the
    row instance and then used its methods
    to extract the value. I presume the class
    of the row instance is oracle.jbo.Row
    and you can lookup its supported methods
    in the reference doc.
    I'd be interested to hear if their is a more
    elegant way - the one suggested above is
    pretty tedious.
    Regards,
    Bill
    ----

  • Dbms_xmlgen empty tags for null

    Hi, i would like to know if there is a way of dbms_xmlgen generate closed xml tags when the field as a null value.
    What currently happens to me in my code, is that it doesn't write the tags for null fields, example:
    Person
    | Name | Age | PhoneNumber |
    | Joao | 24 | |
    this would generate
    <persons>
    <person>
    <Name>
    Joao
    </Name>
    <Age>
    24
    </Age>
    </person>
    </persons>
    and i want to generate
    <persons>
    <person>
    <Name>
    Joao
    </Name>
    <Age>
    24
    </Age>
    <PhoneNumber />
    </person>
    </persons>
    Best Regards
    João Lopes
    Edited by: Joao Lopes on 8/Jul/2009 3:59

    Check
    SQL>  DECLARE
       ctx INTEGER
             := dbms_xmlgen.newcontext (
                   'select ''Jao'' "Name", 24 "Age", null "PhoneNumber" from dual '
    BEGIN
       dbms_xmlgen.setnullhandling (ctx, dbms_xmlgen.empty_tag);
       dbms_output.put_line (dbms_xmlgen.getxml (ctx));
       dbms_xmlgen.closecontext (ctx);
    END;
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
      <Name>Jao</Name>
      <Age>24</Age>
      <PhoneNumber/>
    </ROW>
    </ROWSET>
    PL/SQL procedure successfully completed.

  • Nested Tags and Body content

    Hi
    I am working with a set of nested tags to display error messages, but when i try to get the parent class always return null.
    I add comments in the code to "debug" the tags, and the body wrote in the jsp is displayed after the comments added in the doEndTag().
    May be this is way i can't get the parent class, but i can't find how to write the code in the jsp inside the body of the tag.
    Please give me suggestions.
    Thanks in advance

    What does your code look like? Are you catching exceptions?

  • Difference between Null and null?

    What is the difference between null and NULL?
    When is each used?
    Thanks,

    veryConfused wrote:
    There is a null in java, but no NULL. null means no value. However, when assigning value, the following is different:Although the empty String has no special role. Null means, the referential type is not assigned (doesn't refer) to a specific object. The empty String is just another object though, so seeing it or pointing it out as something special when it actually isn't at all (no more special than new Integer(0) or new Object[0]) just adds to the confusion.

  • How to differentiate the EMPTY Records and Null Values in DSO

    Hello....how is everyone here?? Ehehehe!
    I try to load some data from the flat file which contains some EMPTY data and Null Values for the records. The data type for the InfoObjects of the fields "Quantity" is "number". The sample data from the flat file (CSV) are as below:
    Food              Quantity
    Hamburger  -       12
    Cheese        -       0
    Vegetable      -               (Empty)
    When I try to load the above sample data to the DSO, I get the results of the data as follow:
    Food              Quantity
    Hamburger     - 12.000
    Cheese           -  0.000
    Vegetable         - 0.000
    In this case, how can the user differentiate whether the records is contain empty value of null values in DSO? This is kinda of hard to differentiate the both scenarios above. Is there any way to differentiate the scenarios described here?
    Thanks alot =)

    Hi Fluffy,
    It depends on the initial values of the data type
    The inital values For quantity/Currency/ Numbers it takes spaces as 0
    for char it is SPACE
    We cannot differeniate between space and null values.
    IF you have to force this then define quantity as char and load the data. we will not have units and aggregation in this case.
    Hope this helps.
    PV

Maybe you are looking for

  • View for music on itunes

    I found an album that I have been looking for on itunes. I wish to buy this album, but itunes dos not give an option to but the whole album. Instead there is a tab with the word "view" on it. When I click the tab, A list of all of the tracks comes up

  • How to update my ibook G4 with out itunes

    how to update my ibook G4 with out itunes

  • Saved Documentary with Art Filter

    The dark as-taken photo was improved to a completely pixelated (even after Noiseware)version. And, the photo was then a throw out for sure. However, I "saved" it by making it strictly a documentary (of my family), happily an artistic one. I used the

  • B2c link for end user

    Hi, AS a end user for ISA, what link i have to access to see product catalogs in b2c scenario. priya

  • Creating SWCV in SLD for downloaded repository objects?

    I want to download some SRM xi content from market place, but i guess on download i get the tpz files for repository, my concern is, if i import these tpz files into the repository, what are the prerequisites? 1. do i need to have these SWCV already