How to make Javascript access standard JSF component

Hello all,
I'm in need of a proper javascript code that access standard jsf component.
Like we do for html tags;
if( el.tagName.toLowerCase() != 'select')
I need to do the same thing for a jsf tag i.e; <h:selectOneMenu>. How to make javascript access <h:selectOneMenu> like it does with <select> tag ? Please let me know asap. Extremely sorry if the question is kind of stupid....cause I'm a beginner for JSF environment.
Any sort of help, suggestion or advice would highly be appreciated.
Thanks in advance.

Ummmm, I may be off the beaten path, but by the time your javascript is called the h:selectOneMenu would be a select tag within the dom. You should be able to reference that tag as you normally would.

Similar Messages

  • How to make changes in standard transaction ME51N.

    Hi,
       Can anyone tell me how to make changes in standard transaction ME51N.
       I want to call transaction AS01 by clicking on standard button create asset. Please do the needful.
    Regards.
    Aniruddha

    Hi anirudda
              As i understood from your question is that you want to add a new field 'CREATE ASSET' on me51n screen.
    If i am correct you can use 'MEREQ001' enhancement for this purpose and you can write you code in the exits available in this enhancement.
    Please check the documentation of this enhancement for more info.
    (Use Smod for this purpose)
    I hope it is helpful.
    Reward points
    Thanks,
    Prasanna

  • How to make changes to standard UWL WebDynpros?

    Hi,
    We are faced with the problem to make changes to the standard UWL Person Search Dialog. But couldn't find any documentation, blog or anything else how to achieve this. We strongly believe, that we have to create a new track in nwdi, import uwl development components, make changes to them, transport and so on.
    So, how can we make changes to standard uwl WebDynpro components?
    Thanx,
    Gerald

    After investigating hours of hours i have come to the following conclusion concerning uwl customization:
    uwl can be customized following this documenation https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a3461636-0301-0010-3787-978f5ac8bd45
    I have tried to check out the sap standard software component (sap.com/UWLJWF), put them into a nwdi track and try to change it. Just the same way as you have to do it using ess/xss.
    But it didn't work out, because source codes are not included. I have also got the info from sap that the uwl webdynpros are not designed for custom changes.
    So, there is no way.

  • Tutorial on how to create an Ajax-enabled JSF component in Creator?

    Is there a tutorial on how to create (not use/import existing) an Ajax-enabled JSF component using Creator 2? I read somewhere that it was done during a presentation in 3 minutes! Now that I really want to see ;-
    thanks,
    -nikita

    As far as I remeber, Edwin Goei's examples are the
    closest thing to the info you are looking. He has an
    example component, but don't remember if they're
    AJAX enabled. Check it on
    http://wiki.java.net/bin/view/Javatools/CustomCompone
    tLibraries.
    Best regards
    Antonio.Thanks for the plug. I've been meaning to update that article. Writing an AJAX component is similar to writing other kinds of components but the developer uses AJAX techniques. The latest version of the popup calendar which is checked into the bpcatalog project of java.net uses Dojo which also has some support for AJAX. I haven't yet had time to update the article yet, unfortunately.
    -Edwin
    http://blogs.sun.com/edwingo/

  • How to make Firefox access the internet from Oracle Ent. Unbreakable Linux?

    Hello
    I have a Dell Duo Core x86 laptop that multiboots Windows 2003 Server, Windows XP and Oracle Enterprise Unbreakable Linux. I use Internet Explorer to
    access my email while at the library so I know my laptop can access the internet. I just installed the Oracle Enterprise Unbreakable Linux in text mode and
    I can still access the Internet but only if I use one of the Windows operating systems which is why I am keeping them for now. The reason is because when I
    use Oracle Enterprise Unbreakable Linux, when I select Firefox to access the internet I get these messages:
    "Server not found
    Firefox can't find server at www.hotmail.com
    -check address for typing errors
    -if unable to load pages check network connection
    -if computer or network protected by firewall make sure Firefox permitted to access
    web"
    None of those reasons are true for not gaining access to the internet. I want to use Oracle Enterprise Unbreakable Linux from now which is why I installed
    but I need to know:
    1) Why do I get the "Server not found" and the other error messages when I try to access the internet using Firefox and what do I have to do to make Firefox
    access the internet successfully?

    Hi,
    First you must confirm your laptop with Oracle Enterprise Unbreakable Linux can access internet.
    Please open a terminal, input the following command
    1.ifconfig
    2.cat /etc/resolv.conf
    Regards
    Jason

  • How to do Javascript validations in JSF

    Hi ,
    I want to know about the javascript validation in JSF. I want to know simple validations like field should not be empty.
    I have a problem with my code can any one suggest me on this. for your reference here i'm attaching my code.
    <%@ 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/jstl/core" prefix="c"%>
    <f:view>
         <%@ include file="../includes/header.jsp"%>
         <h:form id="createForm">
              <script>   
             function validate() { 
                 if((document.createForm.courseId.value=='') ||(document.createForm.courseId.value==null))
                    alert("Please Enter Course Id");     
                     return false; 
                 if(document.createForm.fileName.value=='')
                    alert("Please Enter File Name");     
                     return false; 
                   retutrn true;
                         </script>
              <table width="768" height="100%" border="0" cellpadding="0"
                   cellspacing="0">
                                  <tr>
                                                      <td width="200" height="25" align="left" class="formtext">
                                                           Course Id:
                                                      </td>
                                                      <td height="25" align="left">
                                                           <h:inputText id="courseId"  value="#{bean.courseId}"  required="true"  />
                                                      </td>
                                                 </tr>
                                                 <tr>
                                                      <td width="200" height="25" align="left" class="formtext">
                                                           File Name:
                                                      </td>
                                                      <td height="25" align="left">
                                                           <h:inputText id="fileName" value="#{bean.fileName}" />
                                                      </td>
                                                 </tr>
                                            </table>
                                  <tr>
                                       <td colspan="2" align="center" class="formtext">
                                            <h:commandButton value="Create"
                                                 action="#{control.getSelectedItems}"
                                                 onclick=" return validate();" />
                                       </td>
                                  </tr>
                             </table>
                        </td>
                        <td width="12" valign="top" background="images/tile_left_right.jpg">
                             <img src="images/tile_left_right.jpg" width="6" height="1" />
                        </td>
                   </tr>
              </table>
         </h:form>
         <%@ include file="../includes/footer.jsp"%>
    </f:view>

    Have you checked the element ID's? Maybe you have overlooked the woodstocked ID's. Look in the generated HTML source and base your Javascript on this.

  • How to set property(variable) of jsf component in javascripts

    Hi, i have a jsf page which has an outputText component and its value is bound with its backing bean. I want to set its value in a javascripts written in the same jsf page. i'm using the following code: but its not working....can anybody help me out ...
    *document.getElementById('form:clicked').innerHTML   = ' value ' ;* 
    *<h:outputText id="clicked" value="#{bean.outputText property}"*
    *style="display: none"></h:outputText>*

    Hi, i have a jsf page which has an outputText component and its value is bound with its backing bean. I want to set its value in a javascripts written in the same jsf page. i'm using the following code: but its not working....can anybody help me out ...
    *document.getElementById('form:clicked').innerHTML   = ' value ' ;* 
    *<h:outputText id="clicked" value="#{bean.outputText property}"*
    *style="display: none"></h:outputText>*

  • How to set focus on a jsf component of portlet based web page ?

    Hi,
    I have a jsf based portlet in a Websphere Portal environment. I have seen the javascript code document.getElementId(form.component).focus for the attribute onLoad in body tag of a page
    But in a portlet page, the body tag is somewhere in the Head page of the portal.
    How do I achieve this in another way? Is there that accesskey attribute for a component help me to set the focus on itself? HOw do I do that? Any help is appreciated
    Thanks

    Don't put it in the body. Put it below in the code, right before the closing body tag.
    Example<f:verbatim>
        <script>
            setFocus('</f:verbatim><h:outputText value="#{myBean.elementIdToFocus}" /><f:verbatim>'); // load on every view
            function setFocus(elementId) {
                var element = document.getElementById(elementId);
                if (element && element.focus) {
                    element.focus();
        </script>
    </f:verbatim>Where MyBean.getElementIdToFocus() returns the UIComponent.getId().

  • How to use javascript in visual jsf

    I have a web project and I am using visual jsf in netbeans. My problem is I cannot with javasciprt.
    When I clicked to a button I want to make some check with javascipt and then run server side java code. With jsp I used to add onclick javascipt and if it is ok, I just submit to servlet and run the java code in servlet. How can I do this with visual jsf

    If you are trying to display total number of pages in a report, Add the below formula in the column of the report and hide that column in the report.
    FX = sum(count(1))/25
    You can then reference the column in the narrative view like this: "Total pages in the report are @5" and out put may be "Total Pages in the report are 30".
    Or
    You can also use something like the below:
    To calculate them use fi:
    CEILING(CAST(RCOUNT("FactColumn In the Report (Sum All)") as DOUBLE)/ 25) for the page number
    CEILING(CAST(COUNT("FactColumn In the Report (Sum All)") as DOUBLE)/ 25) for the total pages
    Put the above formula in the column and reference it in the narrative view like I mentioned in the previous example.
    If you are report view is pivot, then please refer to this link: http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-pagination-in-pivot-tables/
    Hope this helps.
    Thanks,
    -Amith.

  • How to make CC 2014 standard for opening photos in Bridge

    I keep getting PS CC when I open a photo - but I would like to make CC 2014 the standard - how to do that?

    The filter panel is a shortcut for the content panel and it only effects the content of that window. So if you have a folder it will only see this as a folder and not with its content. (a Stack behaves about the same, being different in only counting the first file in the filter panel criteria but not what is in the stack itself)
    You have a view work arounds, first is use menu view / show items from subfolders (this can take some time especially if you have not used caching before on this content) and this builds visible thumbs for all content and that can be used for filtering.
    Or use the find command (Edit / find) and inhere specify the source and fill in the criteria include subfolders and this will give you the correct result.
    When you create a smart collection the find command also pops up given you the same opportunity to get the results in a collection, but since a collection is only a bunch of aliases referring to the originals you might be a bit careful with editing and deleting.

  • How to make a simple polynomial calculating component

    Hi all,
    I am looking for a component which could calculate a polynomial formula like shown in the attached picture. I think I must make my own component but I don't know how to do that.
    Best,
    Antoine
    Attachments:
    component.jpg ‏23 KB

    In Multisim, you can use ABM components. "ABM_CURRENT" or "ABM_VOLTAGE" works in the form of current or voltage, respectively.

  • How to make the Access Gate SDK work with Web Gate

    When we want control the display of one area in one page, we can define this area as one resource then control the access of it. But when the user has been authenticated in the application, how can we get the user session and then call Access Gate SDK to check if the user is authorized? The following is one utility class to archive it.
    * $Id: CreateUserAction.java,v 1.1 2005/10/11 23:19:34 jason Exp $
    * $Revision: 1.1 $
    * $Date: 2005/10/11 23:19:34 $
    * Copyright (C) 1972 - 2005, Oracle Co. All Rights Reserved
    * The program(s) herein may be used and/or copied only with
    * the written permission of Oracle Co. or in accordance with
    * the terms and conditions stipulated in the agreement/contract
    * under which the program(s) have been supplied.
    package oblix.view;
    import com.oblix.access.ObAccessException;
    import com.oblix.access.ObConfig;
    import com.oblix.access.ObResourceRequest;
    import com.oblix.access.ObUserSession;
    import javax.servlet.http.Cookie;
    import javax.servlet.http.HttpServletRequest;
    * @author zhoujian
    public class OblixUtil {
    private static String ObSSOCookie = "ObSSOCookie";
    private OblixUtil() {
    * Check if the user is Authorized
    * @param request
    * @param rescourceUrl
    * @return
    public static boolean isAuthorized(HttpServletRequest request,
    String rescourceUrl) {
    return isAuthorized(request, "http", rescourceUrl, "GET");
    * Check if the user is Authorized
    * @param request
    * @param resourceType
    * @param rescourceUrl
    * @param resourceMethod
    * @return
    private static boolean isAuthorized(HttpServletRequest request,
    String resourceType, String rescourceUrl, String resourceMethod) {
    try {
    ObConfig.initialize();
    ObResourceRequest resource = new ObResourceRequest(resourceType,
    rescourceUrl, resourceMethod);
    ObUserSession session = getObUserSession(request);
    return session.isAuthorized(resource);
    } catch (ObAccessException oe) {
    oe.printStackTrace();
    ObConfig.shutdown();
    return false;
    * Get the Oblix user session from the request.
    * @param request
    * @return
    * @throws ObAccessException
    private static ObUserSession getObUserSession(HttpServletRequest request)
    throws ObAccessException {
    String token = getCookieValueByName(request.getCookies(), ObSSOCookie);
    if (token != null) {
    return new ObUserSession(token);
    return null;
    private static String getCookieValueByName(Cookie[] cookies, String name) {
    for (int i = 0; i < cookies.length; i++) {
    if (cookies[i].getName().equalsIgnoreCase(name)) {
    return cookies[i].getValue();
    return null;
    }

    Couple of options. You seem have to taken the Access Gate based approach. I will throw this in any way and you can make a call which one you want to use.
    If its a web application you can control authorization based on Resource by defining policy in the Access Manager.
    You mentioned aout display of one area in one page. That should be driven off of User attribute or custom logic. If it is driven off of User attribute then you can return header variable and you can check in the code as opposed to writing custom access gate.
    Now if you do want to write custom access gate when the resource is already protected by a Web gate,
    you can get the ObSSOCookie from the users browser session.
    You can pass the URL to the IsAuthorized method and call.
    Now here you have to install the Access Server SDK on the server, create custom access gate and then write the code and deploy it on that server.
    THanks
    Ram

  • How to make the Access Gate work

    have been following the developers guide to write an access gate. my application(simple html) is running on JBoss, want to protect this resouce using the access gate. JAccessGate.java is working fine however the access gate is not intercepting the resource request.
    how do i configure Jboss with the Access Server so that the Access Gate process the request.
    the servlet example isn't working ... constants.REQUEST isn't being recognised despite adding all the pkg's.
    it would be helpful if someone could share the steps to achieve this.
    that apart any idea about how the reverse proxy works ?
    thanks and regards
    Edited by: user642640 on Jun 6, 2009 4:14 AM

    Couple of options. You seem have to taken the Access Gate based approach. I will throw this in any way and you can make a call which one you want to use.
    If its a web application you can control authorization based on Resource by defining policy in the Access Manager.
    You mentioned aout display of one area in one page. That should be driven off of User attribute or custom logic. If it is driven off of User attribute then you can return header variable and you can check in the code as opposed to writing custom access gate.
    Now if you do want to write custom access gate when the resource is already protected by a Web gate,
    you can get the ObSSOCookie from the users browser session.
    You can pass the URL to the IsAuthorized method and call.
    Now here you have to install the Access Server SDK on the server, create custom access gate and then write the code and deploy it on that server.
    THanks
    Ram

  • How to make applet access a local file in intranet?

    I want to have my applet read from and write to a file on the user's PC. This is our company's intranet and security is not a concern so we don't want to go through the complicated certificate procedure.
    Our application server is weblogic. The jsp containing the applet can be accessed at http://10.150.20.100:7001/slfweb/jsp/Home.jsp. According to Core Java (Volume II), I put the following paragragh into java.policy file under jre/1.3.1/lib/security dir of each user's PC, hoping this will grant the permission for the applet to read/write a file in tmp dir:
    grant codeBase "10.150.20.100:7001/slfpweb/" {
    permission java.io.FilePermission "C:\\tmp\\*", "read, write";
    However, it does not work. Can someone tell me what is the simplest way to allow an applet to read/write a local file in intranet system?
    Thank you very much!
    Ming

    I guess the reason you're still running into permission problem is that you have not addressed the required settings in the browser(s) that you're using.
    On everyone's PC, the following must be done:
    1) on IE, click Tools | Internet Options | Security . Under Trusted Sites, add your server's IP address. Under Local Intranet, reset it to Medium or Low and check to see if any of the relavant settings require attention (note that a Java Applet is equivalent to an ActiveX object in IE) . Finally, go into Java Custom Settings and make the appropriate changes.
    2) on NN, to access local files, you can enable Codebase Principals by adding the following line to the user's pref.js file (look for it where NN is installed -- usually under C:\Program Files):
    user_pref("signed.applets.codebase_principal_support", true);
    I have also read Core Java and found that the authors have a way of over-simplifying everything and failure to adequately describe other factors that may potentially affect what they're describing.
    V.V.
    PS: Signing an applet with a self-signed certificate is not all that difficult. Here is a link to my file i/o applet that contains pertinent info that you might want to look into:
    http://home.attbi.com/~aokabc/FileIO/FileIOdemo.htm

  • How to make use of standard content in our SWCV ?

    Hi all ,
    I want to use the Interface , mapping etc., which are available in SAP Basis namespace . But i have added as  dependency to my Software component version in SLD.
    My question is
    1. How can i use that added SAP Baisi objects to  my namespace ?
    2. How it will be useful for us ?
    Please calrify
    Regards.,
    Shiva
    Edited by: shiva s on Feb 11, 2010 10:55 AM

    Hi,
    >>>How can i use that added SAP Baisi objects to my namespace ?
    you can create a message mapping in your own namespace with the use of message interfaces from this
    sap basis SWCV
    >>>2. How it will be useful for us ?
    you can use predefined messages and create your own mappings for example
    let's say you have an SRM proxy (outbound from ERP) but you want to send it to your legacy system
    you import SRM content and the proxy will go via your configuration and your new mapping
    Regards,
    Michal Krawczyk

Maybe you are looking for

  • How to handle iTunes Match with multiple libraries (one account, 5 family members)?

    How would this work, in the situation below ... Everyone has their own iCloud account (for their own syncing purposes). But we (family) ALL share the same iTunes account (for purchasing). How will this work, since we all have our own iTunes libraries

  • Mapping a database formely in 9i to run in 10g

    I have migrated my database from 9i to 10g, have also compiled forms in 10g and configured my formwebs and tnsnames which I suspect am not getting right. how do I point my migrated database in from 9i to run in 10g and still using the former URL that

  • Artifacts In DVD

    I have a I DVD (I DVD 6) project that i have burned to 2 different DVD's ( One Printable & 1 Non Printable- Both Verbatim DVD-R) and i keep getting Artifacts in the 5 same spots. I have checked the Original Mini DV tape and the I Movie project and th

  • Port number of Precalculation Service

    Dear SAP Expert For any security reason, I will implement a firewall program. I have a plan to close all the ports and will make some exception of the application which we use. One of the exeception is Precalculation service. So, Can you tell me what

  • RHX5 showing non-existent style

    We imported two Word docs, using the same style sheet both in the doc and in RH. All the styles are fine in both docs, except for one style. Doc A shows a good style "InstructionIndent", but in Doc B, the RH style field shows that RH has seen the sam