Results 1 to 2 of 2
  1. #1
    Tokajac is offline Member
    Join Date
    Jun 2008
    Posts
    13
    Rep Power
    0

    Default represent Double as "" instead of 0.0 in .jsp page without javascript

    I prepare filling the jsp page with:

    SomeForm someForm = new SomeForm();
    httpServletRequest.setAttribute("SomeForm", someForm);

    SomeForm has the attribute attDoub type double

    in .jsp page i have the text field:
    <td><html:text property="attDoub" styleId="attDoub" size="14"/></td>

    How can i get "" value in stead of 0.0 on loaded page?
    Javascript is not allowed!


    Regards

    P.S.
    I tried with value="" but it permanently changes the value of property

  2. #2
    mtv134 is offline Member
    Join Date
    Aug 2008
    Posts
    22
    Rep Power
    0

    Default

    use the following
    value=<%=bean.getAttDoub()==0.0?"":bean.getAttDoub ()%>
    visit http://www.thejavacode.com
    Muhammad Safwat

Similar Threads

  1. Hwlp with "Open", "Save", "Save as..."
    By trill in forum New To Java
    Replies: 3
    Last Post: 11-02-2010, 10:26 AM
  2. <core:forEach var="" begin="+<%=j%>+">???
    By freddieMaize in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 09-27-2008, 02:20 AM
  3. "Jumble" or "Scramble" Program
    By Shadow22202 in forum Java Applets
    Replies: 8
    Last Post: 04-30-2008, 04:42 AM
  4. Open "Save Page As" Dialog Box
    By Anubha in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 12-12-2007, 10:27 PM
  5. the web site "monitor test page"
    By dubdubdub in forum New To Java
    Replies: 0
    Last Post: 11-28-2007, 08:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •