How to add raw HTML tags inside JSF tags...

Hi
I would like to use <input type = text > inside my project in some area..The following code hides the input = type html tag and forwards the click event to jsf command button...After selecting the file,it should forward the value to jsf textfield....
My code seems as below.
<h:form id="detailForm" onsubmit="printElements(detailForm,this)">
<f:verbatim>
<input id="uploadFile" type="file" style ="dispaly:none"size="100" />
</f:verbatim>
<h:inputText id="docName" style="width:650px;" maxlength="100"/>
<h:commandButton id="visibleBrowseButton" value="Select File..." onclick="'detailForm:uploadFile'.click();callClick();">
</h:commandButton>
</h:form>
<script type="text/Javascript">
function callClick()
var val = document.detailForm.uploadFile.value;
document.getElementById('detailForm:docName').value = val;
</script>
While running this page it works fine in IE but in Mozilla firefox it troubles me during detailForm:uploadFile'.click().
I suspect the jsf page cannot able to detect the raw html tag inside jsf tags...Eventhough i tried using inside<f:verbatim> it wont works..
I would like to know
1.Whether the code is right,,if the code goes wrong why it got runned in IE not in firefox....
2.How can raw html tags can be integrated inside JSF tags....

First of all, why are you ignoring valuable answers about a JSF fileupload component in your previous topic?
Second, you can just nest raw HTML anywhere in your JSF page. Your problem is rather related to JavaScript. It has completely nothing to do with Java nor JSF. Learn JavaScript -there is a nice tut at w3schools.com- and look for a JavaScript forum if you still stucks. There are ones at webdeveloper.com and dynamicdrive.com.
The f:verbatim is only required if you was using JSF 1.1 or older, which is not the case. You would have occurred completely different problems.

Similar Messages

  • How to add my html title tag and html meta name and meta keywords

    how to add my html title tag and html meta name and meta keywords in iweb 09

    Like you will see on Roddy's page iWeb SEO Tool will do the job very easily:
    Click to view full size
    Click to view full size
    It remembers what tags went to which pages so they are easily reapplied when you have to republish.
    OT

  • YouTube - How to add videos from youtube on jsf-adf

    YouTube - How to add videos from youtube on jsf-adf.
    when i using iframe i can't send data from beans.

    you can use a <f:verbatim> tag in your page and in it just write the HTML code for embedding a video.
    and can i send data from beans class in html components?
    i wrote this
    <af:iterator id="i2" var="row"
    value="#{MyBean.src_items}"
    varStatus="st">
    <af:showDetail disclosed="false" id="sd1"
    styleClass="AFStretchWidth"
    disclosedText="#{row}">
    <f:verbatim>
    <iframe id="ifv" src="#{row}"/>
    </f:verbatim>
    </af:showDetail>
    </af:iterator>
    but that were not worked .
    Edited by: Vakhushti on May 9, 2011 12:40 PM

  • How to add a validator to a custom tag

    Hello,
    I would like to know how to add a validator to my custom tag as an attribute.
    <mytags:custom validator=???/>
    Thanks.
    Sebastien

    Are you wanting to use one of the JSF validators or a home brewed one?

  • How to add a html file into JEditorPane

    Hi
    I am doing an aplication on swing.But I don't know how to add a html file to the JeditorPane keeping the html file on the source code. i.e my html file is in my source code.Then how to add this html file to Jeditor pane.
    Thanks
    Srikant

    QuickTime requires player and plugins that most people don't have.  You'll reach a much wider audience if you use HTML5 <video> with mp4, webm and ogg files.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 with Video</title>
    <!--help for older IE browsers-->
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    </head>
    <style>
    video {
        max-width:100%;
        display:block;
        margin:0 auto;
    </style>
    <body>
    <h2>Use 3 File Types to support all browsers &amp; mobile devices:  MP4, WEBM and OGV.</h2>
    <h3>Online Video Converter
    http://video.online-convert.com/</h3>
    <!--begin video-->
    <video controls poster="Your_poster_image.jpg">
    <!--these are 6 sec sample videos for testing purposes. Replace sample-videos with your own files-->
    <source src="http://techslides.com/demos/sample-videos/small.webm" type="video/webm">
    <source src="http://techslides.com/demos/sample-videos/small.ogv" type="video/ogg">
    <source src="http://techslides.com/demos/sample-videos/small.mp4" type="video/mp4">
    If you're seeing this, you're using an
    outdated browser that doesn't support
    the video tag. </video>
    <!--end video-->
    </body>
    </html>
    Nancy O.

  • Converter for converting all HTML tags to JSF tags

    hai all,
    i am new to JSF. i need a suggestions to convert all my HTML pages to JSF pages bcoz i was already created more pages in HTML and now i want to convert all the pages to JSF. can u give any suggestion plz post it here or send me a mail to [email protected]
    thanks in advance,
    regards,
    V.Sabarish

    hi roman,
    thanks for ur reply. it converts the file but the links r not converting....so can u suggest me another way for converting a HTML tags to JSF tags.

  • How to use HTML tags inside JSF pages

    I am creating a Menu using dataTable and outputLink in a JSF page.
    <div class="bodyarea">
    <div id="location">
    <ol>
    <h:dataTable value="#{menuItem.breadCrumb}" var="bread" >
    <h:column>
    <li>
    <h:outputLink id="crumbID" value="#{bread.menuLink}">
    <h:outputText id="crumpName" value="#{bread.menuLabel}" style="width: 165px;"/>
    </h:outputLink>
    <li>
    </h:column>
    </h:dataTable>
    </ol>
    </div>
    </div>
    I want to use <li> HTML tag as shown in code above before and after every <tr> tag formed, but when i run it and see view source, this is how it shows:
    NOTE: you can see it has thrown out of <table> tag itself.
    <div class="bodyarea">
    <div id="location">
    <ol>
    <li>
    </li>
    <table>
    <tbody>
    <tr>
    <td><a id="_id0:0:crumbID" href="/eApps/admin/loginPage.jsp?MenuItem=-1"><span id="_id0:0:crumpName" style="width: 165px;">Home</span></a></td>
    </tr>
    <tr>
    <td><a id="_id0:1:crumbID" href="/eApps/admin/loginPage.jsp?MenuItem=3~-1"><span id="_id0:1:crumpName" style="width: 165px;">HIM Admin</span></a></td>
    </tr>
    </tbody>
    </table>
    </ol>
    </div>
    </div>
    Can some one help me, how do i use HTML tags inside <h:dataTable>.
    Or is their any other way i should form my Menus, to fully utilize to HTML tags.
    Thanks
    Ravi

    Hello,
    You can embed the verbatim elements in your datatable, ie,
    <h:dataTable value="#{menuItem.breadCrumb}" var="bread" >
      <h:column>
        <f:verbatim><li></f:verbatim>
        <h:outputLink id="crumbID" value="#{bread.menuLink}">
          <h:outputText id="crumpName" value="#{bread.menuLabel}" style="width: 165px;"/>
        </h:outputLink>
        <f:verbatim></li></f:verbatim>
      </h:column>
    </h:dataTable>

  • How to add properties to a custom JSF component?

    Hello, everybody!
    I've just developed my first custom JSF component. It's a data pager and it is working pretty well. But now I want to be able to use some of it attributes in my backing beans at runtime. I mean, I want to bind it to component in the JSF page. It already has a binding attribute in the tld file, but I want to be able to accesss two values that the renderer of my custom component calculate inside it, which would relieve me from calculating these values manually in the backing beans. So, I would like to know how to make these values external to the component.
    By now this is my custom pager class:
    import javax.faces.component.UICommand;
    public class UIPaginadorDados extends UICommand
    }You can see that it has no logic because all the logic is in the renderer class:
    import javax.faces.render.Renderer;
    public class PaginadorDadosRenderer extends Renderer
        // logic here
    }As I said I want to be able to do the following in my backing beans:
    private UIPaginadorDados pager = new UIPaginadorDados();
    // and later...
    pager.getCurrentPage();
    pager.getPageCount();In the JSF page:
    // I already can do this, because I have a binding attribute
    <urca:paginadorDados binding="#{backingBean.pager}" />I suppose that I'll have to create the properties getCurrentPage() and getPageCount() in the component class, UIPaginadorDados, but I don't know how to get the values to the properties from the renderer class. I don't even know if this is how I should do it.
    So I would appreciate a lot your help about this subject.
    Thank you.
    Marcos

    Marcos_AntonioPS wrote:
    RaymondDeCampo wrote:
    I neglected to mention: do not forget to implement the methods in StateHolder to preserve the properties you added to your component.Hello, Raymond. Could you elaborate a little more on that? If you could give a short example, it would be helpful.
    MarcosNo problem. I have already found out how.
    Thank you very much, Raymond.
    Marcos

  • How to add a html region for all pages ?

    Hi,
    How do i put a html text box with submit (Search this site) and a "select list" on all pages in my application.
    Something similar to creating a list in shared components and then put that list on all pages.
    Thanks in advance,
    Girish

    Create a page number 0. Any components you put on Page 0 are rendered on all pages in the application (You can conditionally exclude them from certain pages using the appropriate condition on the component)

  • How to add some html text between check boxes choices in SharePoint list?

    I'm customizing "New Form" of a share point list using SharePoint Designer.
    One of column is check boxes, and I need to add some break lines and text between choices, so the choice doesn't become cluttered.
    e.g.
    Choice 1 ^n
    Date
    Location
    Choice 2 ^n
    Date 
    Location
    and so on...
    Is that possible?
    Thanks 

    I think your best option would be using InfoPath if you can.
    Andy Wessendorf SharePoint Developer II | Rackspace [email protected]

  • How to add xyz.html page to swing container?

    Hi,
    can any one help me to embed a html file in swing container. i am new to swings.
    Thanks,
    Sai.

    It's called "Swing", we have a forum dedicated to that, and try JEditorPane.

  • How can add raw plugins to photoshop cs

    any answer

    If you mean a ".8li" or ".plugin" file instead of ".zxp" file, you could copy it to "<PS installation folder>/Plug-ins" folder.

  • JSTL tag inside Struts tag

    Hello
    Why this statement doesn�t work?
    <html:form action="<c:out value="${actionPath}"/>">
    thanks

    Because you can't have tags as attributes to other tags.
    You can read all about a potential solution here
    http://forum.java.sun.com/thread.jspa?threadID=628786&tstart=0

  • Using a custom tag inside another tag's attribute value?

    Hi all,
    I have a custom tag, mytag:link, whose use currently looks like this:<mytag:link path="/images/logo.gif"/>Nevermind what the tag does. Here's its TLD:<?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
        <tlib-version>1.1.1</tlib-version>
        <jsp-version>1.2</jsp-version>
        <short-name>My custom tags TLD</short-name>
        <tag>
            <name>link</name>
            <tag-class>test.MyLinkTag</tag-class>
            <body-content>empty</body-content>
            <description>...</description>
            <attribute>
                <name>path</name>
                <required>true</required>
                <rtexprvalue>true</rtexprvalue>
            </attribute>
        </tag>
    </taglib>I want to replace the path argument of the mytag:link tag to the result of the evaluation of another tag (a SiteMesh decorator tag) like this:<mytag:link path="<decorator:getProperty property="meta.logo"/>"/>This, of course, doesn't work, as I get the following error:org.apache.jasper.JasperException: /decorator.jsp(34,92) equal symbol expected
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
         org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:86)
         org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:193)
         org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:143)
         org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1328)
         org.apache.jasper.compiler.Parser.parseElements(Parser.java:1564)
         org.apache.jasper.compiler.Parser.parse(Parser.java:126)
         org.apache.jasper.compiler.ParserController.doParse(ParserController.java:211)
         org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
         org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:146)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
         org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
         org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         com.opensymphony.module.sitemesh.filter.PageFilter.applyDecorator(PageFilter.java:156)
         com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:59) If I replace the call to the other tag with
    <mytag:link path="<%=someVariable%>"/>then it all works fine. This behavior seems correct, as the SiteMesh getProperty tag is writing its output to the Writer returned by pageContext.getOut() as it should. As such, this seems to be a design question, then. How are you supposed to do this?
    Thanks in advance,
    Matthew

    Note that I've also posted a question to the SiteMesh user forums about this. It has more information about the motivation of this question.
    See http://forums.opensymphony.com/thread.jspa?threadID=8561
    I'm still looking for an answer, though.
    --matthew                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to add new column inside ME28 PO Approval Screen?

    Hi Abapers,
    Can u please explain and give sample code to me,  how to add new customise column inside standard Layout ME28 PO Approval Screen.
    Waiting for yours reply.
    Tks,
    S.Muthu.

    Hi
    Don't need a code or customize.
    1- Execute ME28
    2- select a line in the ALV
    3- type 'F1'
    4- Go to technical information
    5- Go to Table name 'MEREP_OUTTAB_PURCHDOC_REL' it is a structure
    6- Append the new field into that structure using SE11
    7- return to ALV in ME28 and change Layout
    8- you will find at right your new field, deplace it to left part and it's OK.
    REM :your new field will be filled only if the ME28 program is reading your field and passing it to the ALV structure (MEREP_OUTTAB_PURCHDOC_REL)
    It worked for me with EKPO-AFNAM
    cordially,
    Faycel MOSLAH.

Maybe you are looking for

  • External SATA RAID no longer works after 10.5.5 update

    After updating to 10.5.5, my external RAID (Sbox) (RAID 10) is no longer recognized – The SATA card is functioning correctly – I can attach a single external SATA drive without problem – all ROM has been updated (working with Sonnet) and we confirmed

  • Enormous data overages / not sure how

    Hi- I was billed nearly $1000 for data overages in one month - my normal bill is around $100. This has never happened before and I have no idea how it happened. In the past, I got several texts every single time we were about to go over. We only got

  • Usages of Vendor Accounting Group in FI

    Hi, Greetings! Could you explain me the Functionality of Vendor Accounting Group in FI Side in Detail. Rgs, PRIYA.

  • How to display context-sensitive help in  frameset?

    When the help is generated by Robohelp, there is a primary file named by default as 'Web_Interface_On_Line_Help.htm" that opens the entire help window, with a left pane and a right pane. The left pane has the TOC and Index, and the right pane has the

  • Namespace-URI is wrong in the metadata.xml??

    Dear Captivate-Community, I am running into troubles importing SCORM packages from Captivate 6 into our LMS. Our LMS  (Viversa 7.1 from VIWIS) interprets SCORM 1.2 very strict. It seems that the namespace-URI is wrong in the metadata.xml! wrong is...