Writing HTML code in groovyscript.

Hello,
af:table has following line:
emptyText="#{bindings.CountrySetupVO1.viewable ? 'No data to display.' : 'Access Denied.'}"
I'm required to display 'No data to display' in RED color.
So tried using <span class="AFErrorText">No data to display</span>
However, Groovy script did not allow me to enter <span> tags for specifying color. Tried different ways. even using \ as the excape sequence. But could not achieve.
Please suggest the correct way.
Thanks,

Hi,
Sorry! my mistake about referring EL as groovy
When I use the following, even the column headers get shown in Red
inlineStyle="#{bindings.TreasuryDepartmentVO1.estimatedRowCount eq 0 ? 'color:Red;':''}"
Requirement is to jsut display the message in Red
Regards,
Amar

Similar Messages

  • How to write html code in narrative

    Hi,
    How to write html code in narrative to get following format
    desc value1 Value2 totalvalue
    a 10 20 30
    b 20 30 50
    Totalvalue 30 50 80
    Total % 0.3 0.5 0.8
    Can any one help guide on writing HTMl code for above table format in narrative type of display data at report level
    Thank you
    Manu

    Hi Balu,
    If you are using the Web Application server (WEBAs), Then you can create applications using BSP( Bussiness server pages). Which is some what luike JSP.
    Or
    In SE80 , Try to create internet service files uisng BHTML. In the dropdown select internet service. And then try to create the HTML templates
    Thanks,
    Sarayoodharan.K

  • Writing HTML data in TEXT File

    I am writing HTML content in TEXT file ...I read it in a string and then write using PrintStream...
    But it writes all content on one line ..I want to write it as it was in source HTML file...

    Perchance, the OP is referring to the lack of carriage returns in his outputted data, and querying where they have absconded to? An analysis of his posts to date reveals that he has read the contents of a File into a String variable, and wants to write the (presumably modified) String back to a file (uncertain as to whether this is the same file or a different one) In the process of outputting to said file, carriage returns previously contained in the original input file are not present in the output. I would hazard a guess that the OP does not want said carriage returns in the String to disappear.
    Is my analysis of the situation correct?
    An example of the code that you have written to date would be of extreme usefulness to us in aiding you in your noble quest.
    Without such a resource, I must rely on my intuition instead.
    Possible places that the carriage returns are being "dropped"
    1 - On reading in. Are you discarding carriage returns while building up your variable?
    2 - On manipulating. Are you processing this line by line, or reading it all into one large variable?
    3 - On output - are you using "print" or "println" in the output?
    I look forward to further correspondence with you sir
    kind regards,
    evnafets

  • Writing java code in JSP

    Hi All
    I dont know which one of the following is more effective in JSP
    writing java code like <% out.println("Hellooo "); %>
    OR
    writing like <%="hello" %>
    I shall be very much thankful to all those who spare their valuable time to clarify my doubt. I hope my question is not a stupid one.
    Thanks
    Elisha

    when both gives the same out put, why there are two for the same out put?Because it is easier to do this:
    Hello <%= userName %>
    than this:
    Hello <% out.println("userName"); %>
    Also there is a BIG difference in readability and maintainability of the JSP page. JSP pages are all about having html, and a few "fill in the blank" spots. The less <% scriptlet code %> you put on your JSP page, the better. If you want to run java code, do it in a servlet/bean.
    With the advent of JSTL, scriptlet code in JSPs should be a thing of the past.

  • Writing web code on a Mac???? And FTP Programs?

    Alright, so bear with me on this one. I've been using mac's for years for my graphic design and graphic pieces of my web sites, but I still use my PC to write the code (HTML, JavaScript, CSS, mostly) that the sites run on. I write it, in true old-fashioned sense, in Notepad.
    However, now my overglorified word processor (PC) is being totally, ridiculously, slow and acting weird... I think it did this before my last Blue Screen of Death, so luckily I've backed up everything important. Anyway, I thought I'd give writing code on the Mac (a gorgeous 20" imac, in all its wondrous glory) a shot. Here's what I've done:
    - Open TextEdit, type in a few lines of test code.
    - Save As : select HTML as the file type, with a file name of "Test" or something.
    - Open the file in Safari, expecting to see a real, webpage. Instead? I see my code. Black text, white background, flaunting every little
    and tag like a defiant child smearing raspberry jam all over my couch.
    I just can't switch to a WYSIWYG editor and lose the (tyrannical) control I've had over my web pages from writing the code in notepad. So what should I be doing to write code on a mac? I need to know soon, since my PC will be exploding any day now. Any help would be GREATLY appreciated.
    P.S. I'd prefer not to have to spend any money to purchase a text editor for web code. Am I being cheap? I don't really know. But if I can use a program that's already on my mac, I'm all for it.
    P.P.S. Also, I've been uploading code/images/etc. to my hosts via the WinSCP FTP software, on a PC. Can anyone recommend good FTP software for OSX (10.4.10).

    Both of iFelix's suggestions are great free apps and I would recommend them also.
    If you don't mind shelling out some money for the apps (after a trial of course), I myself use Panic's Coda (http://www.panic.com/coda/) for coding. A lot of people also prefer apps like TextMate (http://macromates.com/).
    CSSEdit (http://macrabbit.com/cssedit/) is a really nice combination of a WYSIWYG and source editior strictly for CSS also (Coda has this sort of functionality built in also).
    As far as FTP, if you arent happy with the free options, Panic makes an app called Transmit (http://www.panic.com/transmit/) that is excellent, and is also basically built into Coda.
    Message was edited by: shadeDream

  • Writing html file in a jeditorpane

    I have read one of your threads titled as "How to insert a string in a JEditorPane (Urgent)". according to this thread I am using insertString() method to write in an jeditorpane. what I am writing is an html file. when I used insertString() method it doesn't show the html content in my jeditotpane. it displays the source code of my html file. I have setContentType("text/html"); moreover I used setText() and it shows the html file correctly but it over writes the previous content of jeditorpane. please help me to be able to
    write to a jeditorpane without overwriting and displaying html file properly not its source code.
    following is my code:
             fr = new FileReader("myfile.html");
         BufferedReader br = new BufferedReader(fr);
         while ((lineread = br.readLine()) != null)
              find.append(lineread);
                       do{
                             last = find.lastIndexOf("str");
                          Integer index = myJEditorPane.getSelectionEnd();
                   String temp = index.toString();     
                   start=find.indexOf(temp, end);
                   end=find.indexOf("str", start);
                            Document doc = mynewContentPane.getDocument();
                   try{
                        doc.insertString(doc.getLength(),find.substring(start, end),null);
                   catch(BadLocationException exc){
                        exc.printStackTrace();
                   }Edited by: nasi on May 7, 2010 8:59 PM
    Edited by: nasi on May 8, 2010 12:09 AM
    Edited by: nasi on May 8, 2010 1:37 AM

    Welcome to the Sun forums.
    Subject: writing html file in a jeditorpane
    If you mean a JEditorPane then please use the correct case, so we can be confident you refer to the J2SE class, as opposed to a 3rd party jeditorpane that we neither know, nor support.
    nasi wrote:
    I have read one of your threads titled as "How to insert a string in a JEditorPane (Urgent)". ..I guess you mean [How to insert a string in a JEditorPane (Urgent)|http://forums.sun.com/thread.jspa?threadID=282569] from 2002. A lot has changed since 2002, but I suspect the basic way of appending text to a Document has not.
    BTW - Good to see you arrive with some Google-foo. ;-)
    ..according to this thread I am using insertString() method to write in an jeditorpane. what I am writing is an html file. when I used insertString() method it doesn't show the html content in my jeditotpane. it displays the source code of my html file. I have setContentType("text/html"); moreover I used setText() and it shows the html file correctly but it over writes the previous content of jeditorpane. I've not played much with changing existing documents, but try this source (adapted from code nabbed from the thread you mentioned).
    import javax.swing.text.*;
    import javax.swing.*;
    public class InsertStringTest {
        public static void main(String[] args){
            Runnable r = new Runnable() {
                public void run() {
                    //set GUI
                    JFrame f = new JFrame();
                    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    JEditorPane editorPane = new JEditorPane();
                    editorPane.setContentType("text/html");
                    editorPane.setText("<html><body><h1>Test!</h1><p>");
                    f.getContentPane().add(new JScrollPane(editorPane));
                    String testStr = "This is a test string. " +
                        "This is a test string. This is a test string. \n";
                    f.pack();
                    f.setSize(400,300);
                    f.setVisible(true);
                    //test with insertString()
                    long diff;
                    long startTime = System.currentTimeMillis();
                    Document doc = editorPane.getDocument();
                    for(int i=0; i < 500; i++){
                        try{
                            doc.insertString(doc.getLength(),testStr,null);
                        catch(BadLocationException exc){
                            exc.printStackTrace();
                    diff = System.currentTimeMillis() - startTime;
                    System.out.println("Time spent with doc.insertString() : " + diff);
                    editorPane.setCaretPosition(0);
            SwingUtilities.invokeLater(r);
    }

  • Writing Html Content into PDF using JSP

    Dear All,
    I am using JSP to generate Employee payslip dynamically. Presently i am diplaying payslip as on-screen display.
    Here i want to give option "Save as PDF". I am able to create PDF file using IText Libraries. i want to integrate HTML code into the PDF file.
    Writing HTML Content (using HTML Tags) into PDF.

    Well it is a difficult ask and i believe we are trying to re-invent the wheel
    Just to make my life simple i could have choosen either sample API given below to serve my cause
    1).[http://xmlgraphics.apache.org/fop/] (Apache FOP one can simply write an XSL template of their and then substitute the values from respective DTO's by using XSL - XML transformations and can generate content in different formats which includes PDF aswell)
    2).[http://jasperforge.org/plugins/project/project_home.php?group_id=102] (Just design a simple report template using iReport and create a jrxml files and write a small code snipett such that you can pass few details at the runtime and can export the report in different formats which includes PDF aswell)
    3).[http://www.object-refinery.com/jfreereport/] (Is much similar to what jasper offers in order to compile these you can either use pentaho product IDE or BEA/Oracle Actuate report tools)
    You can simply try searching for different examples for getting more help on using the respective API's
    Hope that helps :)
    REGARDS,
    RaHuL

  • ADF generated HTML code performance issue

    ADF generated code has lot of unnecessary html tags (when you check in Firebug). browser takes time to load the page . It means performance low.
    As a Front end engineer . My aim is to give end user good browsing feeling , he doesn't like to weighting till page loads.
    So from end user perspective page should load faster.
    Normal Html pages and other applications i have full control over html code.
    But in ADF , i don't have full control over all html tags ,which is generated by server dynamically.
    So, can anyone suggest how i can improve my page loading performance ?

    Anil,
    so in real - world terms, what you are saying is that a Ferrari 360 which has a weight of 1,350 kg is slower than a FIAT Panda, which only weights 840 kg. There is a catch to this theory of yours:
    1. ADF Faces is based on JavaServer Faces, which is a component based framework for writing web based applications. Renderer classes are used to build the user front end. It is not the intention of JSF to allow application developers - but component developers - to tweak the generated component output. If you want something lean, use the default JSF HTML component set, which comes extremely light (but also with less functionality - like a Fiat Panda)
    2. Performance is not alone defined by the HTML downloaded to a client - especially given that static HTML can be cached in browsers and ADF supports page templating for this. There are other factors that play in to this like network bandwidth, latency, query time, business logic execution time, image sizes, CSS and JavaScript
    3. The real load in ADF Faces, as in other AJAX frameworks, is JavaScript. Most of the ADF Faces functionality is created dynamically on the client side using JavaScript objects
    4. ADF Faces has more complex components than HTML. If you compare a HTML table with the table rendered in ADF, you see a difference in the look and behavior
    Btw, here's the tuning guide for ADF: http://download.oracle.com/docs/cd/E21764_01/core.1111/e10108/adf.htm#CIHHGADG . You also may want to test and consider partial page navigation, which speeds up page to page navigation big times.
    Frank

  • HTML Code

    I am learning to write code and am starting with HTML.  When writing in TextEdit and opening up a brower, why does it continue to show the HTML code.  Also, I am saving it correctly and putting the correct opening and closing tags.

    TextEdit is a poor not html editor. Try TextWrangler.
    Upload your code to a server to view it,   not a browser window.

  • How to keep HTML code in the applet source (.java) file itself?

    Hi,
    How to keep HTML code (APPLET tag) in the applet source (.java) file itself?
    Please give an example?
    thank you,

    R6i wrote:
    ...What I mean is without writing external HTML file, how to run an applet (during practice)?'Practice'? What does that mean? During development? If that is what you are referring to, add an applet tag at the top of YourApplet.java inside a Java comment area. Then AppletViewer (in recent SDKs) can then run it with just..
    prompt:javac YourApplet.java
    prompt:// the '.java' extension is not a mistake
    prompt:appletviewer YourApplet.javaIf you do not mean 'during development', then that brings us back to +"What advantages do you see that is bringing to the end user?".+

  • HTML code displayed in browser

    when viewing the jsp pages from remote network, we are having a problem. The page ends abruptly and the html tags like <td width="30" > are displayed on the browser. the content of the page also ends at the point of html code display. the server console shows no error. Not sure if it is some network or server issue. Please help.

    posting & quot(no space between & and quot) its getting replaced by " so everywhere there is a space between & and <quot/lt/gt/amp) strip that while using.
    HTML reserved characters are & quot; & amp; & lt; & gt; for ", &, <, > respectively.
    while writing such characters, do not directly put < , > &, " use the chars shown above.
    for help here is the utility method that will put the desired chars:
         public static String escapeHTML(String value)
            if (value == null) return "";
            StringBuffer strval = new StringBuffer();
            for (int i = 0; i < value.length(); i++)
                  char ch = value.charAt(i);
                  switch (ch)
                       case '"': strval.append("& quot;"); break;
                       case '&': strval.append("& amp;"); break;
                       case '<': strval.append("& lt;"); break;
                       case '>': strval.append("& gt;"); break;
                       default:
                            if (ch > 126)
                                 strval.append("&#" + String.valueOf(ch) + ";");
                            else
                                 strval.append(ch);
                            break;
             return strval.toString();
         }

  • How this piece of html code is encoded from commandLink?Help!

    Hi, this is the jsf code:
    <h:panelGrid columns="1">
                         <h:dataTable value="#{temp.nameFile}" var="myL"
                             rendered="#{temp.show1}">
                             <h:column>
                                  <h:commandLink actionListener="#{temp.create}" value="#{myL.name}"
                                       immediate="true">
                                       <f:param name="name" value="#{myL.name}" />
                                       <f:param name="path" value="#{myL.path}" />
                                  </h:commandLink>
                             </h:column>
                        </h:dataTable>
                   </h:panelGrid>And this is the html code it generates:
    <table>
         <tbody>
              <tr>
                   <td>
                   <table>
                        <tbody>
                             <tr>
                                  <td><a href="#"
                                       onclick="document.forms['_id0']['_id0:_idcl'].value='_id0:_id2:0:_id4';
                                                             document.forms['_id0']['name'].value='ISO-3166';
                                                             document.forms['_id0']['path'].value='D:/Tomcat5.0/webapps/test/WEB-INF/iso3166.xml';
                                                             document.forms['_id0'].submit(); return false;">ISO-3166</a></td>
                             </tr>
                             <tr>
                                  <td><a href="#"
                                       onclick="document.forms['_id0']['_id0:_idcl'].value='_id0:_id2:1:_id4';
                                                              document.forms['_id0']['name'].value='NAICS';
                                                              document.forms['_id0']['path'].value='D:/Tomcat5.0/webapps/test/WEB-INF/naics.xml';
                                                              document.forms['_id0'].submit(); return false;">NAICS</a></td>
                             </tr>
                             <tr>
                                  <td><a href="#"
                                       onclick="document.forms['_id0']['_id0:_idcl'].value='_id0:_id2:2:_id4';
                                                             document.forms['_id0']['name'].value='UNSPSC';
                                                             document.forms['_id0']['path'].value='D:/Tomcat5.0/webapps/test/WEB-INF/unspsc.xml';
                                                             document.forms['_id0'].submit(); return false;">UNSPSC</a></td>
                             </tr>
                        </tbody>
                   </table>
                   </td>
              </tr>
         </tbody>
    </table>there is a line of html code like this:
    document.forms['_id0']['_id0:_idcl'].value='_id0:_id2:1:_id4';I know that "_id0" is the form ID, and "_id0:_idcl" is the clientID,but what is the value part "_id0:_id2:1:_id4" and what is the meaning of each part?I am writing my custom renderer, so i need to know how it is encoded,please help:)
    Best Regards:)
    Robin

    _id0 - id of the form
    _id2 - id of the datatable
    1 - row index
    _id4 - id of the commandlink                                                                                                                                                                                       

  • Writing HTML to Netscape w/ Servlet isn't working

    I am writing a servlet program that resides on port 8080, after there is an input from a form on a HTML page the servlet take the input and then sends HTML.
    The problem is, that it just shows the HTML code and not the formatted page. I use a PrintWriter to write the HTML code to the web browser. The code works fine in Internet Explorer, but in Netscape 4.xx and 6.xx it doesn't work at all.
    Does anyone have any idea what could be causing this or how I could fix it?

    You use the next Content Type?
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    out.println("<html>");
    out.println("<body bgcolor=\"white\">");
    ...

  • Writing HTML for Safari

    I've seen one question related to this, but the suggested solution did not work for me. I have just bought a Mac Pro, the first Mac upgrade in many years and a leap into OS X. On my iMac using SimpleText, I could pound out web pages faster than I could do them in Dreamweaver.
    Safari is showing the code. Per the previous suggestion, I renamed the file, including .html in the name. Safari now displays the page with the one sentence, but is also showing code above that is unrecognizable to me.
    Can someone direct me to the BEST SOURCE to learn the quirks of writing simple html code for Safari, like a white page with some pictures and some text -- nothing fancy. I'll move on to "fancy" later!
    Thanks

    Thanks to you as well. I appreciate the link and will go there and check it out. I'm really not heavy into creating web pages at the moment, but instantly missed SimpleText because I am so accustomed to using it for copy/pasting important stuff from websites, emails, and just notes to myself. While I was looking for an app to use for such situations, all I could find was TextEdit, and after making a note doc for myself, I was just piddling to see how it would behave with simple code. I'll check preferences, as suggested above, and also follow your link.
    Thanks again. I've spent the entire day just getting acquainted with the new machine.

  • To avoid writing database code in the front end

    Hello,
    I am working on a database application using 10g database as backend and dotnet as front end. I wish to execute only oracle stored procedure for all the select (to avoid hard parse and use of bind variable), DDL and DML operations; just to avoid writing database code in the front end. Can anyone please give me a little examples of :
    1.Select query's output to be return as resultset by stored procedure.
    2.DML example by stored procedure.
    3.Any DDL example by stored procedure.
    using scott.emp, so that i would just call the stored procedure, rather than giving select,DML and/or DDL commands in the front end. Even though i have read in the documentation, but a clear cut examples will help me to get into clear concept as well.
    Thanks & Regards
    Girish Sharma

    Hi...
    -->Select example
    create or replace procedure get_emp(rc out sys_refcursor)
    is
    begin
    open rc for select * from emp;
    end;
    -->DML example
    create or replace procedure do_dml_emp(pempid in number,
    pempname varchar2,
    result out number)
    is
    begin
    insert into emp(empid,empname) values(pempid,pempname) returning empid into result;
    exception
    when others then
    result:=-1;
    end;
    -->DDL example
    create or replace procedure ddl_emp(colname varchar2,
    coltype varchar2,
    result out number)
    is
    begin
    result:=-1;
    execute immediate 'alter table emp add column ' || colname || ' ' || coltype ;
    result:=1;
    end;

Maybe you are looking for

  • How to make file playable on DVD-player

    Hello all, I am new to Premiere Pro CS4. I have to make a videofile of approximately 13 minutes, which is playable on a DVD-player (type LG DV9900). The source format is 1440x1080p, and I really wish to keep this quality. There will be no sound or mu

  • Replacing a lost or stolen pre-paid sim card

    Please call us on 13 22 00 to arrange a replacement. Any credit on your Pre-Paid account will remain, but credit expiry periods will still be applicable. If your credit is about to expire, you can recharge your account to retain the credit balance un

  • ITunes error in Windows (Vista)

    I am constantly getting the following error: "The itunes library file cannot be saved. An unknown error occurred (-48)." I am running on a Vista Ultimate machine connected to a small business server. My library is stored on a redirected My Documents

  • Tabbed Panels - Returning to last "active" tab?

    Let's say I have 4 tabbed panels and a user is currently on Tab 2.  Upon submitting a form (that spans all four panels), what's the best method to bring them back to the tab they were on when they clicked the submit button - in this case Tab 2?

  • Non-support for SQL LIKE command

    I understand from poking around in this forum that the rowset visual Query Editor does not suppor the LIKE command. I also discovered that if I just put it in anyway, then tell the editor to "continue" when it complains, that it works fine at runtime