Fmt:formatNumber when value is blank

<c:catch var="formatError">
<fmt:formatNumber value="${row.pay}" type="currency" currencySymbol="" var="payment"/>
</c:catch>
when the ${row.pay} is "", looks like the formatNumber does not throw the formatError nor creates the variable payment with value "". When i debug I don't see the var in the page context attributes.
Is this right?
Thanks.

Hi,
Please verify the datatype ...Whether you are using char or Integer.
If c ( char)----- it will display space
   i ( integer)---- it will display 0.00.
Regards
Arbind
Edited by: Arbind Prasad on Jan 27, 2010 12:03 PM

Similar Messages

  • Question on Issue with fmt:formatNumber tag of jstl

    Hi,
    We have a web application that uses struts framework. In the action class,i am setting an attribute of request object like
    request.setAttribute("Val",new Double(11.25489));
    I am using jstl fmt:formatNumber function in the jsp page to format the value to 2 decimal places.
    <fmt:formatNumber value="${Val}" maxFractionDigits ="2" />
    When i access the jsp page,there is no display of anything.
    If i access using <c:out value="${Val}"/> ,it does print the value.
    Interestingly,tomcat does not generate any corresponding java file in its work area.
    Any clues...anybody ?
    Edited by: gbhakta on Oct 31, 2007 12:23 PM

    Ok you are setting the value in request scope?
    How does the control transfer from the Struts Action to your JSP page?
    Check the struts-config to see if that forward is configured as a "redirect". If that is so, your request attribute would be lost, because a redirect causes a new request.
    The following code prints out all request attributes that are currently in scope.
    It might help checking to see if your "Val" is in scope or not.
    Request scope attributes:
    <table border="1">
    <c:forEach var="attr" items="${requestScope}">
      <tr><td><c:out value="${attr.key}"/>a</td><td><c:out value="${attr.value}"/></td></tr>
    </c:forEach>
    </table>Cheers,
    evnafets

  • To set default value as blank  in drop down by index

    Hi Experts ,
    I'm using Adaptive RFC model to get data from SAP and I've to create DropDownByIndex  and populate it with the data.
    I am getting data in the drop down but when my screen is displayed , I contains one of the values from the Drop down as default . But I want default value as blank .
    How to set blank value as default.
    Thanks in advance

    Hi
    U shuld Make the Node that Is Bound to the DropDown By Index Ui Element Selection Property as 0..1 and Not 1-1 which says that that it can hold even zero instance
    oh Sorry Valery i did not check ur Post
    Wishes
    Krishna kanth
    Message was edited by: krishna  kanth

  • ORA-01841 Error when value for date col is NULL in .dat (using SQL Loader)

    Hello Gurus,
    I have some data in .dat file which needs to be loaded into oracle table. I am using SQL * Loader to do the job. Although "NULLIF col_name =BLANKS" works for character datatype, but when value for date col is NULL then I get ORA-01841 error. I have to make NULL for all rows withour value for date column
    Early reply will be highly appreciated
    Farooq

    Hi,
    May be this problem is not with the NULLIF. The value for the date column is not in proper date format.
    create table:
    create table kk (empno number, ename varchar2(20), deptno number, hiredate date)
    Control file:
    LOAD DATA
    INFILE 'd:\kk\empdata.dat'
    insert into TABLE kk ( empno position (1:2) integer external,
    ename position(4:5) char NULLIF ename=BLANKS,
    deptno position (7:8) integer external NULLIF deptno=BLANKS,
    hiredate position (10:20) date NULLIF hiredate=BLANKS)
    data file:
    10 KK 01-jan-2005
    20 10
    SELECT * FROM KK;
    EMPNO ENAME DEPTNO HIREDATE
    10 KK 01-JAN-05
    20 10
    Verify the data file.
    Hope it will help

  • How to show indian rupees in fmt:formatNumber

    Hi guys,
    I want to show the price value like Rs. 12,50,500. If I use like this format Rs. *<fmt:formatNumber type="number" value="${stylePrice}" pattern="#,##0.00"/>* it is showing like Rs. *4,240,000.00*. Instead of I want to show Rs. 24,40,000. Is it possible to show like this format. Please help me guys..
    Thanks in Advance
    Regards Pooja

    Hi guys
    I couldn't solve that issue in fmt:numberformat tag. So i have written java code myself. If anyone wants use this..
    Double value=100000;
    String rupees;
              String lastThreeDigits                                   = "000";
              if(value< 100000){
                   DecimalFormat formatter = new DecimalFormat("#,###");
                   return formatter.format(value);
                             }else{
              DecimalFormat formatter = new DecimalFormat("#,##");
              rupeeFormat = formatter.format(value/ 1000) + ",";
              formatter.applyPattern("#,###");
              value= value- value/ 1000 * 1000;
              java.text.DecimalFormat df = new java.text.DecimalFormat(lastThreeDigits);
              rupees+= df.format(value);
              System.out.println(rupees);          
    Regards
    Pooja

  • Fmt:formatNumber and grouping separator

    I want the code below to print 12 900 (with the space) provided the correct pattern off course:
    <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
    <fmt:formatNumber value="12900" pattern="someMagicPattern"/>I've been trying to come up with a pattern for this, but it's more difficult than I first thought. Can someone help me out?

    No one knows?

  • 0ic_c03 storage location wise - Valuated Stock Value is Blank

    Dear Gurus,
    I have successfully loaded Inventory data as per standard document.
    Stock Qty and Value both are matching correctly at Plant Level, Material Level. All scenarios tested okay.
    But as soon as I drill down further by Storage Location, It shows only Stock Qty. Stock Value becomes Blank.
    Please suggest if anything missing in transformation or any assignment or routine.
    10 marks will be given if suggestion works, for hints also I will give some marks.
    Regards,
    Sachin
    Edited by: Sachin Sawant on Jun 26, 2010 5:38 PM

    Hi,
    Please check :
    Reports in BW with storage location and stock type chars.
    SAP Note Number: 589024 
    -Vikram

  • Result row shows min. value as Blank.

    Hi Guru,
    I have following scenario in query,
    Eg.
    1.Values in objects in column,                           10,000
                                                                            Blank (no value)
                                                                            2,000
                                                                            Blank(No value)                     
    Result Row  shows                                         Blank (instead of 2,000)
    2. Values in same object in same column           10,000    
                                                                            2,000
                                                                            3,000
                                                                            1,000
    Result row shows                                          1,000 (which is Correct one)
    If value in column is blank then it is showing me minimum value as blank but in real it has to display min of all row, second if row  is not blank then it is showing correct min. value in result row (As mentioned in second examlp)
    Please suggest me what i have to do to get exact min. of  all values in Result row.
    Thanks,
    Ganesh.

    hi all,
    Thanks for contribution.
    But i want min. values from all rows in my result row.if it is not suppresed by Zero then also it hase to display min value (I MEAN fIGURE LIKE 2,000) from row.
    if i do supress Zero then it is diplaying as Blank hense all resulti row is display blank but i dont want that i want if row value is Zero or Blank it will display as min. of all figure NOT ZERO OR BLANK LIKE ABOVE EXAMPLE IT IS 2,000.
    Thanks,
    Ganesh.

  • Displaying all rows if value is blank

    Hi all trying I am trying to display all the rows from a
    database if the default value is blank
    I have tried to put a * or ? in the php code What could be
    wrong here?
    What do I need to put for the variable section for the
    correct syntax
    As it its
    Name = p
    Type = numeric
    Default value = -1
    Run-Time value $_Get[‘p’]
    Cat = is the Variable to select the rows if a value is
    present
    $p_Recordset_B = "-1";
    if (isset($_GET['p'])) {
    $p_Recordset_B = (get_magic_quotes_gpc()) ? $_GET['p'] :
    addslashes($_GET['p']);
    SELECT Company FROM Table WHERE Cat = %s <> 'NULL'
    ORDER BY RAND() LIMIT 70

    I am also having this problem, except I have a search form with a list that contains 3 options "Select Country", "Canada", and "U.S." and if a user leaves the field as "Select Country" I want the results page to show the records for both Canada and US, is there a value that can be entered into the Default Value field?
    All help is appreciated.

  • Unable to detect any parameter in html (webresource) when value is passed from onload method of form

    Unable to detect any parameter in html (webresource) when value is passed from onload method of form
    I am trying out some stuff. For which I created a simple Entity. In the form of the entity I have added a simple web resource (html). And for the onload of the form I am calling the following function
    function HelpDeskActivityOnLoadhandler()
     var customParameters = encodeURIComponent("first=First Value&second=Second Value&third=Third Value");
        Xrm.Utility.openWebResource("tsi_scriptzz",customParameters);
    Here is the code for the  tsi_scriptzz.html
    <html>
     <body>
      <script type="text/javascript">
        var vals = new Array();
        if (location.search != "") {
         vals = location.search.substr(1).split("&");
         for (var i in vals) {
          vals[i] = vals[i].replace(/\+/g, " ").split("=");
      </script>
     </body>
    </html>
    MY PROBLEM IS -> location.search is always coming back with empty string. So, it not getting the parametrs I am passing from the load method of the form.
    Could someone kindly help me.
    Thanks,
    Hasib

    Hello, I tried it myself. I got a new_test.htm file and a new_test.js file. The loadWebResource function is called on the OnLoad event of an Entity.
    function loadWebResource()
    var params = encodeURIComponent('param1=value one&param2=value two&param3=value three');
    Xrm.Utility.openWebResource('new_test.htm', params);
    <html>
    <head>
    <title>Web Resource Parameter Example</title>
    <!-- Use ../ClientGlobalContext.js.aspx if your webresource is in a deeper folder on CRM -->
    <script src="ClientGlobalContext.js.aspx" type="text/javascript"></script>
    <script type="text/javascript">
    document.onreadystatechange = function () {
    if (document.readyState == 'complete') {
    var params = getParams();
    for(var i=0; i<params.length; i++)
    log(params[i].name + ' ' + params[i].value);
    // this functions puts the params in a 'dictionary format'
    // f.e params[0].name = param1 & params[0].value = 'value one'
    // You could customize this function or find some on the internet to retrieve a param fe by name...
    // This is just an example how to get the name and values
    function getParams(){
    var params = [];
    var querystring = Xrm.Page.context.getQueryStringParameters().Data;
    var querystringparts = querystring.split('&');
    for(var i=0; i<querystringparts.length;i++)
    var split = querystringparts[i].split('=');
    params.push({
    name: split[0],
    value: split[1]
    </script>
    </head>
    <body>
    </body>
    </html>
    Hope it helps now. Kind Regards

  • Removing commas in fmt:formatNumber

    Hi
    just wondering how to remove commas with numbers outputted within a fmt:formatNumber tag.
    So for example instead of showing 1,000 I want 1000 to be outputted.
    Thanks in advance

    I found out after a bit of testing just have to add
    pattern="#"

  • Transfer Rule Routine: Assign Date Value into Blank Field

    Can anyone help me with regards to writing some ABAP code in a transfer rule so that I can assign "99991231" value into a date characteristics if it is blank?
    Many thanks for advance.

    I would like to check if the value of EXPIRYDATE is blank in data source. If its value is blank, assign '99991231' to it. Otherwise, it will get the value of EXPIRYDATE in transfer rule. I have rewritten the routine as follows. But there is no effects on the result.
    if TRAN_STRUCTURE-EXPIRYDATE IS INITIAL.
      RESULT = '99991231'.
    else.
      RESULT = TRAN_STRUCTURE-EXPIRYDATE.
    endif.
    Many thanks in advance.

  • Disable sort when values in grid change (on propertyChange)

    I don't want my grid reordering itself on every propertyChanged event that would cause the sort order to change, can I prevent this somehow?
    I understand this is default behavior but it's not an option for our customer, and it is really annoying when the 1000 row grid is re-ordered every time user changes any values, not to mention slow.
    I tried returning 0 from sortComparer with no luck, grid still seems to reorder itself according to original data provider and not the sorted view when sort() was set.
    Specifically using AdvancedDataGrid and I'm starting to run out of ideas. Do I reset the dataprovider every time I decide to change my sort? I'm already intercepting headerRelease and setting sort explicitly as well as calling sort from controls outside the grid. How would I get the currently sorted list from my ArrayCollection, does the baseclass CollectionView have a current sorted view? Is there really no way to take a snapshot or current view and set it to current? Is there a way to tell sort() to physically move the rows instead of maintaining a view?
    What I found online:
    http://www.actionscript.org/forums/showthread.php3?t=199554
    Not an option since grid is sortable, I just want to suppress the updates AFTER initial sort

    My fix is less than ideal. As far as I can tell, you have 2 options (reimplement ListCollectionView or monkey patch it). The place where all the magic happens is a private method so there is no clean way to extend class.
    Make your own ArrayCollection and ListCollectionView and modify them. You can just copy paste them and use as your own. This is a lot of work if you want to replace them correctly so might be easier to just monkey patch them (copy paste classes exactly into your own project and make folders like mx.collections.aaa) google flex monkey patch for more info.
    Here is what I did.
    I introduced a new variable to ListCollectionView.as
    * Prevents collection from reordering itself when values change, list is only re-ordered on refresh()
    public var enablePostSortReorder:Boolean = true; //this is what framwork does by default, set to false to do what you want but better do this in yoru ArrayColleciton class (see below)
    In private function handlePropertyChangeEvents(events:Array):void
    Change
    if (sort || filterFunction != null)
    to
    if (enablePostSortReorder && (sort || filterFunction != null))
    You will probably also want to extend ArrayCollection. i.e.
    public class CustomArrayCollection extends ArrayCollection
    public function CustomArrayCollection(source:Array = null)
            super();
            enablePostSortReorder = false;
            this.source = source;
    Hope this helps you, I've been using this solution for a while now in a very big ADG.

  • Address book when I let blank the last name?

    Hello,
    In my Address book when I let blank the last name.
    It automatically recopy the last name to the first name.
    If I delete it, it reaper a few minutes later?
    How can I avoid that?

    Sorry I forgot to write what application.  I am printing from Contacts (the address book).

  • BEx Wad 7.0 displays key instead of text when text value is blank

    Hi,
    I have a query which behaves differently in BEx Analyzer and in a Web Template. I have a characteristic which is set to display text and key. The key is "100" and the text field is not filled out in the text table of the characteristic for key value "100".
    In BEx Analyzer, the text field shows a blank value. However, in WAD the text field displays the key which is "100". I need to display the text field as blank in WAD, but it seems like this is not possible. Do you know a way to achieve this?
    I need to export to Excel from WAD, so I guess javascript will not be a proper solution.
    Thanks!
    Best regards,
    Morten

    Hi Angie,
    There is no way to change it by way of system settings...

Maybe you are looking for

  • How do I get rid of the security warning for disc based Flash product

    I have a project that use a program called Articulate to turn powerpoint shows into a more rich flash product with audio, search capacities, quiz etc. There are multiple sections from multiple powerpoint files that generate a dozen or so flash files.

  • Vendor/Customer Age analysis

    hello the std vendor/creditor age analyses reports don't have 30/60/90 day analysis columns. how do you adaapt the reports to analyse by 30 day periods and which reports do you use? this is ecc 6 classic g/l thanks.

  • Unhide a hidden Mac App Store purchase

    Recently I hide a purcahse thinking it would un-install it.  After I discovered it didn't uninstall the program I removed it and re-installed it.  My problem now is that it doesn't show up in purchases page.  Is there any way to unhide a hidden purch

  • Create two logical columns with same LTS mapping but diff filter conditions

    Hi, Problem: How to create two logical columns within same logical table mapped to same physical column but different filter conditions? I have a scenario where in, Physical layer columns      - table1.employee      - table1.emp_city I need a columns

  • Dashboard and the selection screen on same page?

    Hi WAD Experts, How do I assemble selection screen for a Web based bashboard template on the same page. In otherwords, the user wants to see the report and selection screen on same web page. Let me welcome your ideas. So that when they select for exa