JavaScript problem with JSF

Hi All,
Hi All,
Studio Creator has generated this code
<h:form binding="#{general$forgotpassword0.form1}" id="form1">
<h:inputText binding="#{general$forgotpassword0.txtLogin}" id="txtLogin" styleClass="frmObjects" />
<h:commandButton action="#{general$forgotpassword0.btnSubmit_action}" binding="#{general$forgotpassword0.btnSubmit}"
id="btnSubmit" onclick="alert('hello'); return checkLogin();" styleClass="frmObjects1" title="btnSubmit" value="Continue"/>
</h:form>
now after compilation, I get form1:txtLogin for txtLogin
Now how can I perform client side JavaScript Validation on form1:txtLogin??
Thanks
Sudhakar

The Id 'form1:txtLogin' is valid in SUN RI implementation but with myfaces, the ID can be different (the id generation depends on the implemented algorythm).
I use the j4j.jar containing the component 'proxytag' to get the client Id generated by JSF engine. See http://www.jsftutorials.net/proxyTag.html
Afterwards, you can manipulate the component via javascript by using document.getElementbyId("");

Similar Messages

  • JavaScript problems with JSF or Studio Creator

    Hi All,
    Studio Creator has generated this code
    <h:form binding="#{general$forgotpassword0.form1}" id="form1">
    <h:inputText binding="#{general$forgotpassword0.txtLogin}" id="txtLogin" styleClass="frmObjects" />
    <h:commandButton action="#{general$forgotpassword0.btnSubmit_action}" binding="#{general$forgotpassword0.btnSubmit}"
    id="btnSubmit" onclick="alert('hello'); return checkLogin();" styleClass="frmObjects1" title="btnSubmit" value="Continue"/>
    </h:form>
    now after compilation, I get form1:txtLogin for txtLogin
    Now how can I perform client side JavaScript Validation on form1:txtLogin??Thanks
    Sudhakar

    Hi Sudhakar,
    There are code clips available which demonstrate how to make use of javascript. These are available at:
    http://developers.sun.com/prodtech/javatools/jscreator/reference/codesamples/codeclips.html
    The codeclips that would be of interest to you in particular are titled Set focus, Select on Mouse over and Javascript template. Using these you should be able to do the client side validation using javascript.
    Hope this helps
    Cheers
    Giri :-)
    Creator Team

  • Very big problem with JSF about FORM and "id=" for HTML form's elements and

    I have discovered a very big problem with JSF about FORM and "id=" for HTML form's elements and java instruction "request.getParameterNames()".
    Suppose you have something like this, to render some datas form a Java Beans :
    <h:dataTable value="#{TablesDb2Bean.myDataDb2ListSelection}" var="current" border="2" width="50%" cellpadding="2" cellspacing="2" style="text-align: center">
    <h:column>
    <f:facet name="header">
    <h:outputText value="Name"/>
    </f:facet>
    <h:outputText id="nameTableDb2" value="#{current.db2_name_table}"/>
    </h:column>
    </h:dataTable>
    Everything works fine...
    Suppose you want to get the name/value pairs for id="nameTableDb2" and #{current.db2_name_table} to process them in a servlet. Here is the HTML generated :
    <td><span <span class="attribute-name">id=<span class="attribute-value">"j_id_jsp_1715189495_22:0:nameTableDb2">my-table-db2-xxxxx</span></td>
    You think you can use the java instructions :
    Enumeration NamesParam = request.getParameterNames();
    while (NomsParam.hasMoreElements()) {
    String NameParam = (String) NamesParam.nextElement();
    out.println("<h4>"++NameParam+ "+</h4>);
    YOU ARE WRONG : request.getParameterNames() wants the syntax *name="nameTableDb2" but JSF must use id="nameTableDb2" for "<h:outputText"... So, you can't process datas in a FORM generated with JSF in a Servlet ! Perhaps I have made an error, but really, I wonder which ?
    Edited by: ungars on Jul 18, 2010 12:43 AM
    Edited by: ungars on Jul 18, 2010 12:45 AM

    While I certainly appreciate ejb's helpful responses, this thread shows up a difference in perspective between how I read the forum and how others do. Author ejb is correct in advising you to stay inside JSF for form processing if form processing is what you want to do.
    However, I detect another aspect to this post which reminds me of something Marc Andreesen once said when he was trying to get Netscape off the ground: "there's no such thing as bad HTML."
    In this case, I interpret ungar's request as a new feature request. Can I phrase it like this?
    "Wouldn't it be nice if I could render my nice form with JSF but, in certain cases, when I REALLY know what I'm doing" just post out to a separate servlet? I know that in this case I'll be missing out on all the nice validation, conversion, l10n, i18n, ajax, portlet and other features provided by JSF".
    If this is the case, because it really misses the point of JSF, we don't allow it, but we do have an issue filed for it
    https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=127
    If you can't wait for it to be fixed, you could decorate the FormRenderer to fix what you want.
    I have an example in my JSF book that shows how to do this decoration. http://bit.ly/edburnsjsf2
    Ed

  • Problems with JSF and included subviews

    Hi everybody,
    I' ve got a problem with JSF and included subviews which makes me going
    crazy. I've got no clue why my web-pages are represent wrongly. The only
    tip I've got is that it must be connected with the kind I do include my JSF-pages.
    When I use <%@file="sub.jsp"%> my pages are are represent right. When I use <jsp:include page="Sub.jsp" /> or <c:import url="Sub.jsp" /> ( mark: the usage of flush="true" or flush="false" doesn't matter )
    my pages are represent wrongly.
    The usage of tags like f:facet or f:verbatim were also included but didn't point to an solution.
    I searched the whole Sun Developer Forum and some other web-sites for any solution for my problem but the given hints and clues didn't help. Now I'm trying to post my problem directly in Sun's Forum in hope to get help.
    My environment is the following:
    JAVA JDK 1.5 Update 4
    Tomcat 5.5.9
    JSLT 1.1
    Sun JSF 1.1
    Win 2K
    Here's my code:
    Main.jsp
    <%@ page language="java"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <%
              String path = request.getContextPath();
              String basePath = request.getScheme() + "://" + request.getServerName()
                        + ":" + request.getServerPort() + path + "/";
    %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
         <base href="<%=basePath%>">
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache">
         <meta http-equiv="expires" content="0">   
         <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
         <meta http-equiv="description" content="This is my page">
         <link rel="stylesheet" href="stil.jsp" type="text/css" />
    </head>
    <body>
         <f:view>
              <h:form>
                   <div class="table">
                        <div class="tr">
                             <h:outputText styleClass="tdleft" value="value 1"/>
                             <h:outputText styleClass="tdinfo" value="value 2"/>
                        </div>
                        <div class="tr">
                             <h:outputText styleClass="tdleft" value="value 3"/>
                             <h:outputText styleClass="tdinfo" value="value 4"/>
                        </div>
                   </div>
              </h:form>     
              <jsp:include page="Sub.jsp" />
         </f:view>
    </body>
    </html>Sub.jsp
    <%@ page language="java"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    <f:subview id="subview">
         <h:form>
              <div class="table">
                   <div class="tr">
                             <h:outputText styleClass="tdleft" value="value 11"/>
                             <h:outputText styleClass="tdinfo" value="value 22"/>
                   </div>
                   <div class="tr">
                        <h:outputText styleClass="tdleft" value="value 33"/>
                        <h:outputText styleClass="tdinfo" value="value 44"/>
                   </div>
              </div>
         </h:form>
    </f:subview>stil.jsp
    <%@page contentType="text/css"%>
    <%
        String  schwarz     = "#000000",
                grau1       = "#707070",
                grau2       = "#c0c0c0",
                grau3       = "#e0e0e0",
                grau4       = "#e8e8e8",
                grau5       = "#fdfdfd",
                blau        = "#0000dd",
                tuerkis     = "#00cfff";
        String  liniendicke = "1px",
                linienart   = "solid";
        String allgemeineTextFarbe           = schwarz;
        String allgemeineHintergrundFarbe    = grau3;
        String infoTextFarbe                 = blau;
        String fieldsetRandFarbe             = blau;
        String fieldsetRandDicke             = liniendicke;
        String fieldsetRandArt               = linienart;
        String hrLinienFarbe                 = blau;
        String hrLinienDicke                 = liniendicke;
        String hrLinienArt                   = linienart;
        String inputAktivHintergrundFarbe    = grau5;
        String inputReadonlyHintergrundFarbe = grau4;
        String inputPassivHintergrundFarbe   = grau4;
        String inputPassivFarbe              = schwarz;
        String inputRandFarbe1               = grau1;
        String inputRandFarbe2               = grau5;
        String inputRandDicke                = liniendicke;
        String inputRandArt                  = linienart;
        String inputButtonHintergrundFarbe   = grau3;
        String legendenFarbe                 = blau;
        String linkFarbe                     = blau;
        String linkAktivFarbe                = tuerkis;
        String linkBesuchtFarbe              = blau;
        String linkFocusFarbe                = tuerkis;
        String objectGitterFarbe             = grau5;
        String objectGitterDicke             = liniendicke;
        String objectGitterArt               = linienart;
        String tabellenGitterFarbe           = grau5;
        String tabellenGitterDicke           = liniendicke;
        String tabellenGitterArt             = linienart;
    %>
    <%-- ----------------------------------------------- --%>
    <%-- Textdarstellung mittels der Display-Eigenschaft --%>
    <%-- in den Tags div und span                        --%>
    <%-- ----------------------------------------------- --%>
    *.table {
        display:table;
        border-collapse:collapse;
    *.tbody {
        display:table-row-group;
    *.tr {
        display:table-row;
    *.td,*.tdright,*.tdleft,*.tdinfo,*.th {
        display:table-cell;
        padding:3px;
        vertical-align:middle;
    *.td,*.th {
        text-align:center;
    *.tdright {
        text-align:right;
    *.tdleft {
        text-align:left;
    *.tdinfo {
        color:<%=infoTextFarbe%>;
        text-align:right;
    *.th {
        color:<%=infoTextFarbe%>;
        font-weight:bold;
    }thanks in advance
    benjamin

    Hello Zhong Li,
    many thanks for your post, but it didn't work.
    My problem is that the JSF-Components im my included or imported
    JSP-Pages does not accept any kind of style or styleClass for
    designing. The components take over the informations for colors
    but not for alignment.
    When I take a look at the generated JAVA-Source in $TOMCAT/WORK/WEBAPP for my sub.jsp ( sub.java )
    it seems that the resulting HTML-page would be presented correctly.
    But later when I start the application via Firefox or Mozilla the html-sourcecode is totally wrong.
    In my example I create a simple grid with 2 rows and 2 columns.
    Both columns contains JSF-Outtext-Components and are included with div-tags.
    The generated Sub.java shows that the text would be setted in the div-tags. Unfortunately the html-sourcecode represented by my browser shows that jsf-text is not setted in the tags but in the <h:form> tags. The div-tags are neither rounded by <h:form> nor containing the JSF-OutText-Components.
    Any clue?
    Many thanks Benjamin
    Here is the html-code from Firefox:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
         <base href="http://polaris21:8080/webtest/">
         <meta http-equiv="pragma" content="no-cache">
         <meta http-equiv="cache-control" content="no-cache">
         <meta http-equiv="expires" content="0">   
         <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
         <meta http-equiv="description" content="This is my page">
         <link rel="stylesheet" href="stil.jsp" type="text/css" />
    </head>
    <body>
         <form id="_id0" method="post" action="/webtest/Main.faces" enctype="application/x-www-form-urlencoded">
              <div class="table">
                   <div class="tr">
                        <span class="tdleft">value 1</span>
                        <span class="tdinfo">value 2</span>
                   </div>
                   <div class="tr">
                        <span class="tdleft">value 3</span>
                        <span class="tdinfo">value 4</span>
                   </div>
              </div>
              <input type="hidden" name="_id0" value="_id0" />
         </form>     
          <form id="SUB:_id5" method="post" action="/webtest/Main.faces" enctype="application/x-www-form-urlencoded">
               <span class="tdleft">value 11</span>
              <span class="tdinfo">value 22</span>
              <span class="tdleft">value 33</span>
              <span class="tdinfo">value 44</span>
              <input type="hidden" name="SUB:_id5" value="SUB:_id5" />
         </form>
         <div class="table">
              <div class="tr">
              </div>
              <div class="tr">
              </div>
         </div>
    </body>
    </html>

  • Problem with jsf DataTable

    when data is fetch using user criteria:
    i have a problem with jsf DataTable. I use e request bean to populate the datatable and i insert a commandButton column. The data dispay successfully into the datatable, but when a push the button on the row...the page simply refresh and notinhg else
    when data is fetch using constants:
    The data dispay successfully into the datatable, when a push the button on the row...the action execute OK

    Hi,
    I don't think that with this description only anybody on this list is able to help you.
    I use e request bean to populate the datatable and i insert a commandButton column
    What is a command button column and what does it do ?
    but when a push the button on the row...the page simply refresh and notinhg else
    What did you do to debug the problem ?
    when data is fetch using constants
    What does this mean ?
    Frank

  • Javascript problem with "opener" object

    Hello again,
    In my quest to reuse some automatic generated bsp code to my own advantage, i encounter a problem with the javascript "opener" object.
    I open a new window(win2) for a value help, this should return a value to the calling window(win1). It does so by calling a function in win1. My problem is that i get an error, stating that access to win1 is denied.
    opener.focus() works: it sets focus on win1
    so the opener object seems fine, pointing to the richt window
    opener.functionWin1() does not work:
    when i want to call a function from win1 i get the message "access denied", this also happens when i want for instance call a propertie of win1 with for example alert(opener.location);
    Does anybody know if there is a special parameter i should set, before i can call functions on the opener page? Or has anybody encountered the same pronlem?
    Kind regards,
    Martijn de Jong.

    If you want to set a input field value from a value help page you can write a JS function in the value help page itself, which will take of populating the field in the root page.
    See this example script:
    <head>
    <script language="JavaScript" type="text/javascript">
              function fun()
                   s=window.opener;     
                   txt=s.document.getElementById("<input filed id of the parent page>");
                   if ( document.form1.row_sel1.value )
                   txt.value = document.form1.row_sel1.value;
                   window.close();
        </script>
    </head>
    Refer this thread for further details:
    Re: F4 help using javascript
    Regards,
    Ravikiran.

  • Javascript problem with Internet Explorer 6

    Hi together
    I have a problem with IE6 on a JSP page. I want to disable a HTML button calls
    'fehlerdetails' if one of radiobutton list has a value "FIID NOK".
    This Java script sample below is running with Netscape 7.0 but Internet Explorer get no objects back.
    Has everyone a idea how can I read a value from list:
    document.GetFailedPostingPositionListW3InBean.checked[i]
    with Internet Explorer 6??
    HTML Radiobutton (Struts):
    <html:radio styleClass="radioButton" name="GetFailedPostingPositionListW3InBean" onclick="checkAccountNr();" property="checked" value="<%= String.valueOf(j) %>">
    </html:radio>
    HTML Button:
    <td><input class='pushbuttonlarge' type="button" value="fehlerdetails" onClick="document.GetFailedPostingPositionListW3InBean.submit();" name="fehlerdetails"/></td>
    Javascript:
    function checkAccountNr() {
         document.GetFailedPostingPositionListW3InBean.fehlerdetails.disabled = false;
         var radioButtons = document.GetFailedPostingPositionListW3InBean.checked;     
         if(document.GetFailedPostingPositionListW3InBean.checked > 0) {     
              for(i=0; i < radioButtons.length; i++) {
                   if(radioButtons.checked) {
                        radioButtonAccountNr = radioButtons[i].AccountNr;
                        radioButtonFiidText     = radioButtons[i].FiidText;
                        if (radioButtonAccountNr == "ABACUS-NR NOK" || radioButtonFiidText == "FIID NOK") {
                             document.GetFailedPostingPositionListW3InBean.fehlerdetails.disabled = true;                                                  
    Thank you very much for you help.
    Cheers Robert

    first, this is a Java forum, not Javascript, and aside from the first 4 letters, the two have nothing in common.
    Second.. if there's more then 1 radio button named 'GetFailedPostingPositionListW3InBean', this:
    var radioButtons = document.GetFailedPostingPositionListW3InBean.checked;
    will be an error.
    var radioButtons = document.GetFailedPostingPositionListW3InBean;      
    for(x=0; x < radioButtons.length; x++) {
       if(radioButtons[x].checked) {
          ... check the value and disable
    }

  • How to solve problem with JSF table's border (style) ??

    Hi, I would like to create table in JSF like this
                   <table  align="center"
                             width="250"
                             style="border-collapse: collapse; border: 1px black solid;" >
                   <tr>
                        <td align="center"
                             colspan="2"
                             style="border: 1px black solid;">
                             Header A
                        </td>               
                   </tr>
                   <tr>
                        <td> a1 </td>
                        <td> a2 </td>
                   </tr>
                   <tr>
                        <td> b1 </td>
                        <td> b2 </td>
                   </tr>
                   <tr>
                        <td align="center"
                             colspan="2"
                             style="border: 1px black solid;" >                          
                             <BUTTON value="12" > button1 </BUTTON>
                             <BUTTON value="12">  button2 </BUTTON>
                        </td>
                   </tr>
                   </table>I don't know how to create borders like this with JSF's components.
    I know how to create table and collspan, but I have a problem with
    border and style.
    below is example that I creat it, but borders are not OK
    IF ANYONE FIND SOLUTION I WILL BE TANKFUL
    JSF:
    <hx:panelBox id="box1"
               layout="pageDirection"
               bgcolor="silver"
               align="center"
               style="border: 1px red solid;"
               border="0">
              <hx:panelBox id="box2" layout="pageDirection" width="100%" bgcolor="#aec74e" height="100%" align="center" style="border: 1px black solid;">
                   <center>
                        <h:outputText styleClass="outputText" id="text9" value="Prazniki"></h:outputText>
                   </center>                         
              </hx:panelBox>
              <h:panelGrid styleClass="panelGrid" id="grid1" columns="3">
                   <h:outputText styleClass="outputText" id="text4" value="#{msgs.planDan}">
                   </h:outputText>
                   <h:inputText styleClass="inputText" id="text3" value="#{pc_Koledar.praznikBean.dan}">
                   </h:inputText>
                   <f:verbatim></f:verbatim>
                   <h:outputText styleClass="outputText" id="text5" value="#{msgs.planMesec}">
                   </h:outputText>
                   <h:selectOneMenu styleClass="selectOneMenu" id="menu1" value="#{pc_Koledar.praznikBean.selectedMesec}">          
                    <f:selectItems value="#{pc_Koledar.praznikBean.meseci}" />          
                   </h:selectOneMenu>
                   <f:verbatim></f:verbatim>
                   <h:outputText styleClass="outputText" id="text6" value="#{msgs.planLeto}">
                   </h:outputText>
                   <h:inputText styleClass="inputText" id="text2" value="#{pc_Koledar.praznikBean.leto}">
                   </h:inputText>
                   <f:verbatim></f:verbatim>
                   <h:outputText styleClass="outputText" id="text7" value="#{msgs.nazivPraznika}">
                   </h:outputText>
                   <h:inputText styleClass="inputText" id="text1" value="#{pc_Koledar.praznikBean.nazivPraznika}">
                   </h:inputText>
                   <f:verbatim></f:verbatim>
              </h:panelGrid>
              <hx:panelBox id="box3"           
                         align="center"
                         layout="lineDirection"
                         width="100%"
                         style="border: 1px black solid;" bgcolor="#aec74e">
                        <center>
                          <hx:commandExButton type="submit" value="Dodaj" id="button1" action="#{pc_Koledar.doButton1Action}" lang="CP1250">
                          </hx:commandExButton>
                           <hx:commandExButton type="submit" id="button3" action="#{pc_Koledar.doButton3Action}" value="Prika�">
                          </hx:commandExButton>
                        </center>
              </hx:panelBox>
    </hx:panelBox>

    Couldn't you use styleClass or id for CSS?

  • OBIEE10G - Javascript problems with graphs

    Hi,
    Is there any known problem with using javascript and the display of graphs? I have a report where i have a pivot table where i use some javascript to format that table. Below that table i have 2 graphs that are different reports from the one with the pivot table (see images below).
    Version working well
    http://imageshack.us/f/41/graphworkingok.jpg/
    Version with problems
    http://imageshack.us/f/220/graphwithproblems.jpg/
    I guess the problems may be related with javascript because when i remove the javascript from the pivot table (i have it in a static text view) the graphs seem to work ok.
    I'm not an expert (far from that) with javascript and i was playing around with it so i could format the pivot table the way i wanted but i don't have enough knowledge of it to understand what may be causing the problem.
    Thanks

    I didn't do that because the line i want to format is a "manually" built line. I want to format the last line (total line) but that line wasn't made using the total feature of OBIEE but built by myself. What i do in that line is changing the background color of all the cells in that last line and changing the font-size as well.
    Would i be able to do this just by using CSS? From what i read i think i can't that's why i used JS.
    Btw, what i did is related to this other thread i created where i explained my problem, this may help:
    OBI10G - Format a specific cell of a pivot table
    Edited by: Pedro F on 19/Mar/2012 4:15

  • Netflix having JavaScript problem with Firefox 7

    FireFox was working fine with 6 before the update to 7 with Netflix, and after the update Netflix no longer plays which Netflix tells me to enable JavaScript which it is with FireFox 7.

    Can you detect any pattern to it, whether related to messages with attachments, or particular advertising on the page, etc.?
    When you have a problem with one particular site, a good "first thing to try" is clearing your Firefox cache and deleting your saved cookies for the site.
    1. Clear Firefox's Cache
    orange Firefox button ''or'' Tools menu > Options > Advanced
    On the Network mini-tab > Offline Storage : "Clear Now"
    2. If needed, delete the site's cookies here
    While viewing a page on the site, right-click and choose View Page Info > Security > "View Cookies"
    (Usually the dialog will refer to live.com rather than hotmail.com, that's normal.)
    Then try reloading the page and logging in again. Does that help?

  • Problem with JSF AJAX portlets

    I am seeing the following issues with JSF portlets
    1) When you AJAX enable the portlet, they will not work. There are some javascript errors on the component we are using. They work fine if we don't AJAX enable them
    2) I had 2 portlets. 1 JSF and 1 pageflow portlet. If I click on a link in pageflow portlet and after the page gets refreshed, nothing will work in JSF potlet. Again javacript errors
    If we had only 1 portlet on the page, JSF portlet works fine
    Do you think the prototype javacript library used in the portal causing any issues?

    I tried with <naming:namingContainer> immediatly after the f:view tag , but still getting same errors
    I am psoting the generated html and javascript error
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
         <head>
    <title>New Portal Desktop</title><meta name="bea-portal-meta-skeleton" content="/framework/skeletons/default"><meta name="bea-portal-meta-skin" content="/framework/skins/default"><meta name="bea-portal-meta-skin-images" content="/framework/skins/default/images"><link rel="stylesheet" type="text/css" href="/sampleWeb/framework/skins/default/css/body.css"><link type="text/css" href="/sampleWeb/framework/skins/default/css/button.css" rel="stylesheet"><link href="/sampleWeb/framework/skins/default/alert/css/window-alert.css" rel="stylesheet" type="text/css"><link href="/sampleWeb/framework/skins/default/css/window.css" rel="stylesheet" type="text/css"><link type="text/css" rel="stylesheet" href="/sampleWeb/framework/skins/default/plain/css/window-plain.css"><link type="text/css" rel="stylesheet" href="/sampleWeb/framework/skins/default/css/portlet.css"><link type="text/css" rel="stylesheet" href="/sampleWeb/framework/skins/default/css/book.css"><link type="text/css" rel="stylesheet" href="/sampleWeb/framework/skins/default/css/layout.css"><link href="/sampleWeb/framework/skins/default/css/form.css" rel="stylesheet" type="text/css"><script src="/sampleWeb/framework/skins/shared/js/console.js" type="text/javascript"></script><script src="/sampleWeb/framework/skins/shared/js/cookies.js" type="text/javascript"></script><script src="/sampleWeb/framework/skins/shared/js/state.js" type="text/javascript"></script><script src="/sampleWeb/framework/skins/default/js/util.js" type="text/javascript"></script><script type="text/javascript" src="/sampleWeb/framework/skins/default/js/skin.js"></script><script src="/sampleWeb/framework/skins/default/js/menu.js" type="text/javascript"></script><script src="/sampleWeb/framework/skins/default/js/delete.js" type="text/javascript"></script><script src="/sampleWeb/framework/skins/default/js/float.js" type="text/javascript"></script><script type="text/javascript" src="/sampleWeb/framework/skins/default/js/menufx.js"></script>
         </head>
    <body
    class="bea-portal-body"
    onload="initSkin();"
    ><div class="bea-portal-body-content">
    <div
    class="bea-portal-body-header"
    >
    </div>
    <div
    class="bea-portal-book-primary"
    >
    <div class="bea-portal-ie-table-buffer-div">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
    <td class="bea-portal-book-primary-menu-single-container" align="left" nowrap="nowrap">
    <ul
    class="bea-portal-book-primary-menu-single"
    ><li class="bea-portal-book-primary-menu-single-item">Page 1</li><li class="bea-portal-book-primary-menu-single-item">New Book</li><li class="bea-portal-book-primary-menu-single-item-active"><span>New Book</span></li></ul>
    </td>
    </tr>
    </table>
    </div>
    <div
    class="bea-portal-book-primary-content"
    >
    <div
    class="bea-portal-book-invisible"
    >
    <div class="bea-portal-ie-table-buffer-div">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
    <td class="bea-portal-book-menu-single-container" align="left" nowrap="nowrap">
    <ul
    class="bea-portal-book-menu-single"
    ><li class="bea-portal-book-menu-single-item-active"><span>New Page</span></li></ul>
    </td>
    </tr>
    </table>
    </div>
    <div
    class="bea-portal-book-content"
    >
    <div
    class="bea-portal-book-page"
    >
    <table
    class="bea-portal-layout-grid"
    cellspacing="0"
    >
    <tr>
    <td class="bea-portal-layout-placeholder-container"
    width="30%"
    >
    <div
    class="bea-portal-layout-placeholder"
    >
    <div
    class="bea-portal-window"
    width="100%"
    >
    <div
    class="bea-portal-window-titlebar"
    >
    <div class="bea-portal-ie-table-buffer-div">
    <table class="bea-portal-window-titlebar-container" cellspacing="0">
    <tr>
    <td class="bea-portal-window-titlebar-title" nowrap="nowrap">Untitled</td>
    <td class="bea-portal-window-titlebar-buttons" nowrap="nowrap">
    </td>
    </tr>
    </table>
    </div>
    </div>
    <div
    class="bea-portal-window-content"
    >
    <html>
    <head>
    </head>
    <body>
         <p>Beehive NetUI-JavaServer Faces Page - /sampleWeb/sample1/index.faces</p>
    <form id="portletInstance_6:_id1" method="post" action="http://localhost:7001/sampleWeb/sample.portal?_nfpb=true&_windowLabel=portletInstance_6&_nffvid=%2FsampleWeb%2Fsample1%2Findex.faces&_pageLabel=defaultDesktopLabel_page_2" enctype="application/x-www-form-urlencoded">
    <a href="# onclick="document.forms['portletInstance_6:_id1'['portletInstance_6:_id1:_idcl'].value='portletInstance_6:_id1:_id2'; document.forms['portletInstance_6:_id1'].submit(); return false;">sample</a>
    <input type="hidden" name="portletInstance_6:_id1" value="portletInstance_6:_id1" /></form>
    </body>
    </html>
    </div>
    </div>
    </div>
    </td>
    <td class="bea-portal-layout-placeholder-container"
    width="70%"
    >
    <div
    class="bea-portal-layout-placeholder"
    >
    <div
    class="bea-portal-window"
    width="100%"
    >
    <div
    class="bea-portal-window-titlebar"
    >
    <div class="bea-portal-ie-table-buffer-div">
    <table class="bea-portal-window-titlebar-container" cellspacing="0">
    <tr>
    <td class="bea-portal-window-titlebar-title" nowrap="nowrap">Untitled</td>
    <td class="bea-portal-window-titlebar-buttons" nowrap="nowrap">
    </td>
    </tr>
    </table>
    </div>
    </div>
    <div
    class="bea-portal-window-content"
    >
    <html>
    <head>
    </head>
    <body>
         <p>Beehive NetUI-JavaServer Faces Page - /sampleWeb/sample1/index.faces</p>
    <form id="portletInstance_5:_id1" method="post" action="http://localhost:7001/sampleWeb/sample.portal?_nfpb=true&_windowLabel=portletInstance_5&_nffvid=%2FsampleWeb%2Fsample1%2Findex.faces&_pageLabel=defaultDesktopLabel_page_2" enctype="application/x-www-form-urlencoded">
    <a href="#" onclick="document.forms['portletInstance_5:_id1']['portletInstance_5:_id1:_idcl'].value='portletInstance_5:_id1:_id2'; document.forms['portletInstance_5:_id1'].submit(); return false;">sample</a>
    <input type="hidden" name="portletInstance_5:_id1" value="portletInstance_5:_id1" /><input type="hidden" name="portletInstance_5:_id1:_idcl" /></form>
    </body>
    </html>
    </div>
    </div>
    </div>
    </td>
    </tr>
    </table>
    </div>
    </div>
    </div>
    </div>
    </div>
    <div
    class="bea-portal-body-footer"
    >
    </div>
    </div></body>
    </html>
    Javascript error
    Line: 292
    Char: 1
    Error: 'portletinstance_6_id1:_idcl' is null or not an object
    Code: 0
    URL: http://localhost:7001/sampleWeb/sample.portal?_nfpb=true&_windowLabel=
    portletInstance_5&_nffvid=%2FsampleWeb%2Fsample1%2Findex.faces&_pageLabel=
    defaultDesktopLabel_page_2

  • Problem with JSF components

    I am having problem with myfaces tomhawk components in a portal environment
    They work fine as a standalone web application
    When we make it a portlet, they render properly, but the pagination and links in the calendar components are not working
    They submit the page to the server, but does nothing

    Hi,
    WLP 9.2 will be using the Sun RI for JSF portlets. We are going to certify with Apache MyFaces post GA.
    The Beta drop of WLP 9.2 is coming soon and you will be able to do more around development.
    We appreciate you taking the time to review the product and provide feedback.
    Regards,
    --alex                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Problem with JSF

    Hello,
    I have a problem with finishing my project which is based on JSF, Hibernate and EJB technologies. The matter is that I�ve built the application which manages a group of reports and assign sections and reports to the single user. I have two types of users, simple users and administrators. Simple user log in to the system and is able to generate reports which were assigned to him by admin. In the system can be more than just a one administrator. The problem is when one administrator is on-line and another log in to the system. Then both of them are working on the same instances of classes. In JSF files I�m working on created session beans which are defined in faces-config file. I�m new in JSF so maybe my attitude to this technology is not correct. If anyone know how to solve my problem please help me �
    Regards
    krabu

    Akash_Ganga wrote:
    The same instance of LoginBean.class is used by both of administrators and this is the problem ...The above statement is wrong. There are two different sessions for the two users. You are probably seeing data because its persisted in the database by one user and when the next user logs in, the application fetches data from the DB and displays it. Its more of a design problem if you do not want the second user to see the data which the first user has entered.Akash,
    I think we do not understand each other. My application is really simple. Simple user is able to see some links to reports when log in to the system or not. It depends on administrator which is able, in the form I've mentioned before, to assign the right to see a report by a user or not. I don't know what do you mean by saying "There are two different sessions for the two users".
    To explain you what the problem is try to follow such a situation. Let say we have two classes : LoginBean.class and EditForm.class. Based on that classes we create two session beans : loginBean and editForm in faces-config file as follows:
            <managed-bean>
              <managed-bean-name>
              loginBean</managed-bean-name>
              <managed-bean-class>
              log.LoginBean</managed-bean-class>
              <managed-bean-scope>
              session</managed-bean-scope>
         </managed-bean>
         <managed-bean>
              <managed-bean-name>
              editForm</managed-bean-name>
              <managed-bean-class>
              log.EditForm</managed-bean-class>
              <managed-bean-scope>
              session</managed-bean-scope>
         </managed-bean> We have also created two JSF files, one login.jsf which include authorization component based on loginBean and second: editForm.jsf which include a SelectOneMenu component to choose a user and a form to assign selected user a report based on editForm bean.
    We log in to the system as a administration. We are after authorization and enter the editForm.jsf file. We choose a user from SelectOneMenu component and make some changes in the form. But we do not submit anything and do NOT send it to the database. In this moment another administrator log-in, go to the editForm.jsf file and after that he sees that in his selectOneMenu component a user is chosen and the form is filled with data entered by prevoius administrator.
    I'm new in JSF but I've thought that when I create a session bean a new instance of bean ( new instance of class ) is created for all users which try to use it, or maybe I'm doing something wrong or should write some additional code to achieve such a function ...

  • Problem with JSF nad sessionid in URL

    Hello,
    I'm useing NetBeans with Tomcat (JSF), and I have a problem with URL. I don't know how to remove the following part of ULR: ";sessionid=#ED..." form my browser. It is a big problem with security.
    Thanks for Your answers

    are you using the GET method? try using POST

  • Struts \ POI \ Javascript Problem with IE 7

    Alright folks, I'm having a problem migrating my application from IE 6 to IE 7. We have search functionality in the app that triggers off of javascript calls when a button is pressed in the search. Once the data is retrieved, an export button becomes enabled that allows the user to export those results to Excel using POI. On the back end, we're using struts running in WAS 6. When the results are exported, the action class manually writes the excel workbook to the output stream as below:
         protected void print(HSSFWorkbook a_wb, HttpServletResponse a_response)
              throws IOException, ServletException {
              // generate output
              a_response.setContentType("application/vnd.ms-excel");
              ServletOutputStream out = a_response.getOutputStream();
              a_wb.write(out);
    Then the action returns null to signify to struts that the response has already been handled manually.
    Everything works perfectly in IE 6. In IE 7, however, everything is not so great. The search works to retrieve the results and I can export them to Excel. The problem is that after I export them to Excel, all the Javascript on my page ceases to work. Basically, what I've been able to determine is that upon receiving the Excel document response something is causing the document Javascript variable to become undefined. This causes all my javascript -- things like:
    document.getElementById('actionIndicator').value ="Clear";
    to completely fail because document is undefined. Mind you, the page is still sitting there rendered in IE, and I can do things like window.frames and programmatically see a list of the frames defined on the page -- but the document variable is completely gone.
    At this point I'm kind of at a loss as to what to check or test next, so I'm open to any suggestions. Thanks!

    Hey Gina
    we have not seen broken images like you did, but have seen dramatic reduction in respose time with IE 7 (~20 times slower than normal). A bunch of IT folks tried various settings and configurations, with no success. Finally, we figured that different versions of IE 7 acd differently. Version 5700 was running fine. Version 5713 (or something like that, the latest one) was slooooow.
    Our Office of Information Resources does not "support" any other browser than IE. So, in addition to problems with Office 2007 I described previously, we may get a double whammy from Microsoft. Don't get me started.
    Vojin

Maybe you are looking for

  • Calling Report from Menu (Oracle Forms 10g)

    We have the applications in Forms6i & Reports 6i (Client Server) and migrating to Forms 10g and Reports 10g. We have the menu, from that menu we are calling all the forms and Reports. For especially Reports earlier we user RUN_PRODUCT but now 10g it

  • Open periods

    I have facing the following problem during production order confirmationm 1] posting date not possible in your s& g/l account. 2] period 010/2007 is not open in s&g/l account pl.resolve the same

  • I need recommendations in purchasing an external hard drive, to back up everything in my computer. What brand and Size?

    I have a mid 2010 iMac, version 10.8.2, memory 4GB, 1TB sata disk. Apple sent me an e-mail last year stating that my imac maybe affected to a recall. They said I have to back up my computer before sending it in to them. So its a great excuse to purch

  • Aumatic Payment Configuration FBZP  F110

    Hi, Folr the  scenario I need to configure APP: Comapny Code Currency = USD Conutry Currency = EUR Document Currency = USD House Bank  , Account, GL Currency = EUR Invoice to be paied in USD. I am getting following error: Payment method selection for

  • Updating Read Only Entities

    Is there any way we can update an entity if its maintenance object only allows read only option. I tried updating the status of deposit control using an algorithm but it gave an error like "Illegal attempt to modify read only entity". Can I update th