Access client DOM id of current JSF component via an EL statement

Is it possible to access the client-side DOM id of a JSF component from within an EL statement?
For example:
<a4j:commandLink id="marketNameLink" action="#{testAction.myFunction( 'some how get client DOM id' )} />
I could use rich:clientId('marketNameLink'), except I think that this is a bit wasteful in processing time to search the complete DOM tree to access the id of the current component.
Any ideas?
Philip

EL are evaluted at server side and DOM id are generated for the client side
I advice you to read this article :
[http://balusc.blogspot.com/2009/05/javajspjsf-and-javascript.html|http://balusc.blogspot.com/2009/05/javajspjsf-and-javascript.html]
and also this on :
[http://weblogs.java.net/blog/2009/07/22/say-sayonara-spal|http://weblogs.java.net/blog/2009/07/22/say-sayonara-spal]

Similar Messages

  • Rendering HTML JSF Component via java code

    Hey,
    I was wondering,
    I want to build sort of HTML generator (for a very specific process),
    I thought about taking the advantage of JSF components instead of writing an HTML generator,
    Is it possible to render Html JSF Components via simple java class?
    For instance, assuming I built an 'HtmlDataTable' object with columns, inputs, etc...
    I'd like to render the dataTable as HTML and get the HTML tags via a simple java class,
    Thanks.

    the sample JAVA codes are provided for sending SPML requests, HTTPClient and one more (i dont remember rite now) within the OIM installation folders itself. It's in the 'SampleHttpClient' folder. Check it once. WSDL, sample XML's and the JAVA codes all are there. You just need to set the classpath and run it.
    - oidm.

  • 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.

  • Client side event for h:outputText... and other JSF component

    Hello friends...
    I need client side (to use Java script ) event for change in <h:outputText /> or <h:inputText...>.
    I want to open a popup window when there is a change in there. I donot want to use onblur() for this. Is there any thing for achiev it.
    Thanks.
    Regard
    Roshan Lal ( I don't know why there is "DOG" display in LIST )
    :-)

    Hi Jacek,
    Unfortunately I think you may be stuck extending Renderer. Another possibility is creating your component via a template, which will be available in JSF 2.0. However, as JSF 2.0 won't be out for a while... you can use JSFTemplating in the meantime:
    http://java.sun.com/developer/technicalArticles/J2EE/jsf_templating/
    http://www.theserverside.com/tt/articles/article.tss?l=JSFTemplateComponent
    Good luck!
    Ken Paulsen
    https://jsftemplating.dev.java.net

  • Custom JSF Component tags ignored after converting to Facelets layout

    I am currently using JDeveloper 10.1.3.3.
    I have a project consisting of .jspx pages. These pages mainly use components from ADF faces core. I also created my own custom JSF component that I use in several of these pages.
    Then, I needed to use Facelets so that I could apply a standard layout to all my .jspx pages. I looked at all the tutorials, and I created a layout.xhtml for my .jspx pages to use. This worked great for my .jspx pages that don't have my custom JSF component.
    Now, when I run my page with my custom component <img:newimage ...etc >
    the tag is ignored and it appears in the page's source as is when it should render as <img.src=...etc>. Attributes of newimage are changed on the page appropriately like width and height, but my component's tag, component, and servlet java files are never accessed.
    How can I fix this? Please help!
    Thanks.

    Hi,
    did you post this issue to the Facelets open source site ? Sounds like an issue with using Facelets
    Frank

  • Login to Jabber Client (Windows/Mac) with current logged in user account.

    We are deploying Jabber Client for Windows and will eventually be deploying for Macintosh.  I have no problem building the thinapp deployment package for the Jabber client.  However, when the thinapp is ran, it always shows the account that was used to initially login to the client and setup the server connection.
    Is there a way for the client to use the current logged in user in the sign in field?  I am trying to automate or SSO the process of logging into Jabber.
    Any and all ideas, tips, and/or tricks are greatly appreciated!
    Thank you,
    Wes

    This is nothing to do with the TC. This is your user issues on the Mac.
    I would do a major fix on the computer.. copy your user files to another location.. create a new administrator account.. login with the new admin account and delete the old one. Delete all the files associated with that account, so you are effectively starting with a clean Mac.
    I have just sold off a couple of computers and that is how I prepared it for the next person.. it seemed to work easily and removed all my stuff from the computer whilst still giving them full admin access.
    Please I am far from expert in doing this kind of stuff in OSX so just look up deleting original user accounts in whatever OS you run.

  • How to load a class dynamically (via reflection) in a jsf-component

    Hi all,
    I am writing my own jsf component and I would like to do it generically. Therefore I have an attribute, where the developer can pass a fully qualified classname, which I want to use to instantiate. But I have a Problem with the classloaders, everytime I get a ClassNotFound-Exception during debugging.
    Does anybody know how it is possible, to to get the most parent classloader?
    Currently I am even not able to load a class, which is in the same package like all other compontent-classes.
    Thank you very much in advance
    Thomas

    Within web applications, I believe it is recommended to use Thread.getContextClassLoader(). Keep in mind that web applications require different classloader semantics than regular Java applications. The class loader which gets resources from the WAR is favored over others, even when this violates the normal class loading conventions.

  • How to get the current JSF phase in backing bean?

    How to get the current JSF phase in backing bean?
    Edited by: jimmy6 on Nov 27, 2007 7:27 AM

    I am using phasetracker to trace it also.I want to know whether it is it render response phase. I know FacesContext.getCurrentInstance().getRenderResponse() work for normal jsf component but it will not work for qiupukit datatable. FacesContext.getCurrentInstance().getRenderResponse() will not return true in the following phase. Why?
    [ INFO] 27-11-07 16:20:21 : BEFORE RENDER_RESPONSE(6) (http-80-Processor23)
    I want the 'get' method of datatable being called in response phase to reduce the number of calling because i put the query in 'get' method there. Actually i still straggling with the best practice to code the datatable...

  • Installing ST-A/PI Addon : "OCS package SAPKITAB9L does not match the current software component vector"

    Dear Gurus,
    When i try to install ST-A/PI Addon from SPAM and select queue : OCS package SAPKITAB9L does not match the current software component vector
    My downloads ;
    1 - SAPKITAB9J ==> CSN0120061532_0073055.PAT  (ST-A/PI , 01Q_731 , Package Level=0000) downloaded from
    ST-A/PI 01Q_731 (INSTALLATIONS AND UPGRADES)
    2 - SAPKITAB9K==> CSR0120031469_0081131.PAT  (ST-A/PI , 01Q_731 , Package Level=0001) downloaded from
    ST-A/PI 01Q_731 (SUPPORT PACKAGES AND PATCHES)
    3 - SAPKITAB9L==> CSR0120031469_0076956.PAT   (ST-A/PI , 01Q_731 , Package Level=0002)
    ST-A/PI 01Q_731 (SUPPORT PACKAGES AND PATCHES)
    I placed them under EPS and uploaded succesfully when i "Load Packages" from " "from Application Server"
    What could be problem ?
    Here is system components ;
    SAP_BASIS
    740
    0005
    SAPKB74005
    SAP Basis Component
    SAP_ABA
    740
    0005
    SAPKA74005
    Cross-Application Component
    SAP_GWFND
    740
    0005
    SAPK-74005INSAPGWFND
    SAP Gateway Foundation 7.40
    SAP_UI
    740
    0006
    SAPK-74006INSAPUI
    User Interface Technology 7.40
    PI_BASIS
    740
    0005
    SAPK-74005INPIBASIS
    Basis Plug-In
    ST-PI
    2008_1_710
    0007
    SAPKITLRE7
    SAP Solution Tools Plug-In
    BI_CONT
    757
    0001
    SAPK-75701INBICONT
    Business Intelligence Content
    BI_CONT_XT
    757
    0001
    SAPK-75701INBICONTXT
    Business Intelligence Content for Bobj I
    SAP_BW
    740
    0005
    SAPKW74005
    SAP Business Warehouse
    CPMBPC
    801
    0005
    SAPK-80105INCPMBPC
    CPM Business Planning and Consolidation
    POASBC
    100_731
    0005
    SAPK-10205INPOASBC
    POA Shared Business Components

    in 000 client but now i am getting DUMP ;
    Category               ABAP Programming Error
    Runtime Errors         CALLBACK_REJECTED_BY_WHITELIST
    ABAP Program           SAPLSTPA
    Application Component  BC-CTS
    What happened?
        An RFC callback has been prevented due to no corresponding whitelist
        entry being configured. The original RFC called function module "RFC_TP" in
        the target system with destination "CALLTP_WindowsNT". The callback called
         function
        module "TRINT_PROGRESS_INDICATOR" in its own system.
    Error analysis
        Function module "RFC_TP" was called. This execute an RFC callback via ABAP
        statement CALL FUNCTION 'TRINT_PROGRESS_INDICATOR' DESTINATION 'BACK'
        . This action resulted in this ABAP short dump.
        This action was triggered explicitly by the application in transaction
        "SAINT               " and in ABAP main program "SAPLSAINT_UI".

  • Can i use one JSF component's value for other component in the same page.

    Can i use one JSF component's value for other component in the same page.
    For example
    I have a <h:selectBooleanCheckbox id="myChk"> in my jsf page, i want to access its value for another component like:
    <h:commandButton disabled="#{myChk.checked}" action="myAction" value="myValue" />
    ** "myChk.checked" >> I am just asuming "checked" property is available...

    Bind the checkbox to a UIInput myChk property. Then you can reference this property from the page, e.g.
    <h:selectBooleanCheckbox binding="#{myBean.myChk}" onchange="submit();" />
    <h:commandButton disabled="#{myBean.myChk.value}" action="myAction" value="myValue" />

  • Sun Desktop Access Client - Language Settings Windows Logon Screen

    Dear All,
    i have a little problem with the language setting of my Sun Desktop Acces Client if i try to connect to Windws 2003 Server.
    First some configuration details:
    PC:
    Win XP (german version)
    keyboard layout: german
    Sun Desktop Access Client 1.0
    Server:
    Win 2003 Server (german version)
    The Problem is that if connect the server via the SDAC the laguage setting of the logon screen has changed to EN
    instead of DE. Using a german keyboard layout causes some trouble.
    If i connect to the server via a sun ray dtu (kiosk mode) it works properly.
    Has anybody a clue to get rid of this??
    Thanks in advance.
    Best regards
    Ha-Pe

    Okay, after a bit of investigation...
    You can't have the locale used change automatically according to the local used on the client, the best you can do is assign a default locale for most users and create alternative kiosk sessions with different locales (as a uttsc option) which you can assign to DTUs or SDACs (or to smartcard token ids but SDAC doesn't currently support smartcards).
    At least this is what I understand, I'm sure someone will comment if this isn't the case.
    If this is good enough you can do this using the utkiosk and the utkioskoverride commands.

  • GetStyle() of JSF component before render

    Hey guys,
    I'm hoping this is an easy one, here goes...
    For one reason or another, I need to modify the CSS of certain components in a JSF page before it is rendered to the browser. The JSF pages are going to be laid out in Netbeans 6.0 (beta right now) using mostly Woodstock components and will have the 'style' attribute filled in for each component. However, like I said, I want to modify the CSS style value of some components prior to rendering.
    Looking through the Javadocs for Woodstock (javadocs are included with plugin) I see that many components do indeed give you access to this attribute ('style'), com.sun.webui.jsf.component.Field.getStyle() returns "CSS style(s) to be applied to the outermost HTML element when this component is rendered" for example.
    I figured this would be straight forward enough and attempted to retrieve the style using the prerender() method. Unfortunately, getStyle() returned null. After playing around with it for a while, it appears as though the components do not get these properties set (by the Netbeans attribute) until DURING the renderResponse phase. I say this because I tried setStyle() during prerender() and my changes were ignored. I then went back to Netbeans and removed my 'suggested style', now my setStyle() call during prerender() holds showing that somewhere in the renderResponse phase (after prerender()) the style is being set if one is given.
    Obviously making any changes after prerender() [like in afterRenderResponse()] will not cut it.
    To sum up:
    Even as late in the lifecycle as prerender(), the CSS style attribute of a Woodstock component is not yet set (getStyle() returns null and setStyle() ends up being overwritten). Any suggestions on how to modify the style?
    Thanks in advance (and I hope this is an applicable forum),
    Sean

    Solved:
    Once I wrapped my head around the problem I found a much more elegant solution.
    What I wanted to do was relatively position page fragments but was having trouble as the Netbeans IDE positions components within fragments absolutely. To make my page dynamic I was taking the style="position: absolute" attribute out of the <div> tag that was holding the <jsp:directive-include>. The components within the fragments were then being positioned absolutely on the resulting page, ending up strewn all over the place. This led me off on the tangent to reposition the components when the page was called (original post above).
    The weekend did me well I suppose. I came up with the bright idea to CHANGE the style attribute on the <div> tag rather than remove it. Making the <div> component "position: relative" passed its positioning down the the containing components and now my fragments are displayed correctly while being dynamically repositionable.
    Hope this helps anyone coming across the same problem.

  • Triggering a reRender of a JSF component from a Javascript function

    Hi
    I am using a javascript calendar component(JQuery +JCal) to allow the user to select a date for which they want to see events displayed for. When the user selects the date I was planning on outputting the events in a rich:dataTable or something similar.
    Is there anyway that I can trigger a reRender of the dataTable from the javascript, i.e. when someone selects a particular date I would like to trigger a reRender of the rich:dataTable.
    I know I can do it easily from another JSF component, e.g. if I had a commandLink I could set the reRender property to be the id of the dataTable. But I am wondering can I trigger the reRender of the dataTable from a Javascript function, i.e. can I submit an AJAX request
    Thanks

    If you are using the the Richfaces components then you should look at the a4j:jsFunction component, which is provided by Richfaces.
    Follow the following format using the a4j:jsFunction:
    <a4j:jsFunction name="functionName" reRender="targetCompoentId"/>So in the component that the event should be triggered...like the 'onclick' or 'onmouseover' or whatever the legal event is use the following format:
    onclick="functionName();"Richfaces renders the a4j:jsFunction as a javascript function. The a4j:jsFunction name attibute becomes the name of the javascript function; You just have to remember to add the "()" parenthesis to the end of the function name.
    You could technically call the function also inside a javascript that has page access to the javascript generated from the a4j:jsFunction component.
    Hope this helps!

  • Sequencing the IBM iSeries Access Client 7.1

    Hey All,
    I was wondering if anybody has experience in sequencing the IBM iSeries Access Client 7.1...
    We're currently trying to sequence this application under Windows 7 Enterprise (x86) with the App-V4.6 SP1 Sequencer. We've checked the Windows 7 compatibility of this version and it is supported. Every function of the application is working during the monitoring
    phase of the sequence process. The main function we're (currently) interested in is the Emulator with the SSL encryption to our AS400 mainframe. This function requires the SSL-option to be installed. We've installed this with the rest of the application during
    our sequencing and during the monitoring phase, we're able to connect to the mainframe.
    However, when we transfer the finished sequence to a test system, the Emulator pops up with an error message "SSL option is not installed". After some repackaging and investigation, we've managed to eliminate all the file exclusion that occured during our
    sequencing process. This includes a lot of "dirt" into the sequence but at least gave us the confidence that everything that was installed by the setup was also included in the Sequence. We've also excluded the Windows CA store as one of the possible causes.
    The IBM iSeries Access Client uses it's own SSL encryption methods.
    My question to you all is. Has anyone ever succesfully packaged the IBM iSeries Access Client V7R1 on Windows 7 Enterprise and has anyone encountered/solved the issue we're currently facing?
    Thanks in advance for your time and effort!
    Microsoft Exchange Server enthousiast. "This is your M drive. This is your M drive after a virus scan. Get the picture?" "Friends don't let friends virusscan the M-Drive"

    The option installs the ability to use encrypted connections to your AS400 mainframes. The IBM client installs an extra program in %CSIDL_PROGRAM_FILES%\ibm\gsk7.
    Unfortunately there's no exclusion in the Sequence that would point to anything crucial. The IBM client creates a folder in the "My Documents" folder which is (ofcourse) excluded from the Sequence. Other then that only the following is excluded:
    <MOREINFO DESCRIPTION="The unsupported shell extensions detected are as follows:">
    <ITEM DESCRIPTION="HKLM\SOFTWARE\Classes\AS400System\ShellEx\ContextMenuHandlers"/>
    <ITEM DESCRIPTION="HKLM\SOFTWARE\Classes\AS400System\ShellEx\PropertySheetHandlers"/>
    <ITEM DESCRIPTION="HKLM\SOFTWARE\Classes\Drive\ShellEx\DragDropHandlers"/>
    <ITEM DESCRIPTION="HKLM\SOFTWARE\Classes\Printers\ShellEx\ContextMenuHandlers"/>
    But in my oppinion this should not be something that will block the functions of the application itself (since this is drag/drop handler for the seperate file transfer client...)..
    But correct me if i'm wrong ofc.
    Microsoft Exchange Server enthousiast. "This is your M drive. This is your M drive after a virus scan. Get the picture?" "Friends don't let friends virusscan the M-Drive"

  • 6800 Host Ports, Access Clients and Stacking Limitations

    In regards to the 6800 Instant Access Solution, it's my understanding that the current OS (Release 15.1(2)SY) will support 1008 host ports across 21 Instant Access clients and that the Instant Access clients will support stacking up to three clients.
    http://www.cisco.com/c/en/us/products/collateral/switches/catalyst-6800ia-switch/white_paper_c11-728265.html
    Is there a forecast as to when the client stack size will be increased?

    Vzambo,
    If you have c6880 or sup 2T you can run newer version 15.2(1)SY. This suuport up to 2000 ports, fabric link 42 and stacking up to 5.
    Tony

Maybe you are looking for

  • IWeb Domain and backing up

    I want to ensure I have properly copied my iWeb Files to another hard drive for backup and know how to do that. Problem I have is that when I look in my iWeb folder it shows the Domain.sites2 file plus a folder under my name and within the folder sub

  • How To Restore If You Never Bought Lion?

    After an update my screen is now grey upon start up. The trouble I have is when I "CMD R" to go into recovery it wants me to put in the email address that downloaded Lion.  Well I never downloaded Lion, it was on the installation disc (which I dont h

  • Download of pdf to our local system by using classes in webdynpro abap

    hi, I createa an application ,in that i converted Smartform to Pdf.I want to download the generated pdf to our local system by using "cl_wd_runtime_services" because we cant directly use FM GUI_DOWNLOAD directly.So can any one please tell me the proc

  • Animation different in simulator and device?

    Hi, I have an application that uses the UIViewAnimationCurlUp and UIViewAnimationCurlDown that in the simulator appear to be like a fade in and fade out. However, when I test my app in the device (iPod Touch) the animation is not like in the simulato

  • Disk Warrior (DW) 4.1 won't startup on 10.5.5 MacPro

    Anyone else out there try DW on 10.5.5? Performance was a little shaky so I decided to try DW. When I hold the C key down the grey screen shows up but then it just restarts the computer. Sounds like a lot of users are experiencing poor performance fr