Jpanel kind of onload event in HTML tag body

I have a swing app, with many panels in tabbedpanes or in containers with cardlayout, etc...
When a panel is active,shown,visible... , I want to catch this event
and do something. How can this be done?
Thanks in advance
Gabi

Add a Componentlistener to your frame..
void componentShown(ComponentEvent e)
Invoked when the component has been made visible.
hth

Similar Messages

  • OnLoad event on Body tag locked by template

    I have a behavior that needs to be called with an OnLoad event. The page I need it on is attached to a template, so the Body tag is not available for editing. What are my options? Thanks!

    If you are using DW>4 (that's DW4, not DWCS4), then investigate using Template Editable Attributes.
    Alternatively you could use some custom javascript in the editable region of the head of the page or even below the </html> tag to create an onload event, e.g.,
    <script type="text/javascript">window.onload=whatever();</script>

  • How to add events to a ordinary html tag

    How can i add a event to ordinary tag
    Ex:
    public void encodeBegin(FacesContext context) throws IOException {
    ResponseWriter writer = context.getResponseWriter();
    writer.startElement("div", this);
    writer.writeAttribute("id", getClientId(context), null);
    String width = (String)getAttributes().get("width");
    String height = (String)getAttributes().get("height");
    String style = (String)getAttributes().get("style");
    style= (style!=null) ? style + ";" : "";
    if (width != null) style += "width:" + width + ";";
    if (height != null) style += "height:" + height+ ";";
    writer.writeAttribute("style", style, null);
    String styleClass = (String)getAttributes().get("styleClass");
    if (styleClass!=null)
    writer.writeAttribute("class", styleClass, null);
    String title = (String)getAttributes().get("title");
    if (title!=null)
    writer.writeAttribute("title", title, null);
    public void encodeEnd(FacesContext context) throws IOException {
    ResponseWriter writer = context.getResponseWriter();
    writer.write("<input type=\"button\" name=\"but\"/>");
    writer.endElement("div");
    i want to add event and bean for the <<< writer.write("<input type=\"button\" name=\"but\"/>"); >>>line of code, which is nothing but a button. I can added using JSF concept. but the requirement is like this. I have to add normal html tag for which i have to use bean and events as well.
    Can anyone give suggestion for this

    I will give a clear example
    writer.write("<h:outputText id=\"txt\" value=\"Just a Display\" />");
    writer.write("div");
    this 2 lines is in endcodeEnd method. The output text wont display the msg.
    even i am writing before the end tag
    Here is the full code
    ================
    public void encodeBegin(FacesContext context) throws IOException {
    ResponseWriter writer = context.getResponseWriter();
    writer.startElement("div", this);
    writer.writeAttribute("id", getClientId(context), null);
    String width = (String)getAttributes().get("width");
    String height = (String)getAttributes().get("height");
    String style = (String)getAttributes().get("style");
    style= (style!=null) ? style + ";" : "";
    if (width != null) style += "width:" + width + ";";
    if (height != null) style += "height:" + height+ ";";
    writer.writeAttribute("style", style, null);
    String styleClass = (String)getAttributes().get("styleClass");
    if (styleClass!=null)
    writer.writeAttribute("class", styleClass, null);
    String title = (String)getAttributes().get("title");
    if (title!=null)
    writer.writeAttribute("title", title, null);
    public void encodeEnd(FacesContext context) throws IOException {
    ResponseWriter writer = context.getResponseWriter();
    writer.write("<h:outputText id=\"txt\" value=\"Just a message\" />");
    writer.endElement("div");
    writer.write("<h:outputText id=\"txt\" value=\"Just a message\" />");
    This line is not executing
    kindly reply me..
    my mail id is [email protected]

  • Onload event after all images are loaded in an updateContent area

    Hi Spry Folks!
    I load a template into a page with a lot of img tags inside
    it. Everything works fine.
    Spry.Utils.updateContent (...HTML wit lots of img tags...)
    But the loading takes a while so I would like to hide it
    until all the images are loaded. Now I need an event which fires
    after the loading bar in the browser is gone.
    The onPostLoad observer fires much to early, cause the code
    is long loaded bevore all the images
    (...addObserver({onPostLoad:...)
    Same with the window.onload event (...window.onload =
    showContent();...) fires much to early.
    The only thing which is working is placeing the function in
    the onload event of the body tag.
    Like:
    <body onload="showContent();">
    But there I can't use it. And there is now body.onload
    handler as far as I know there is only the windows.onload handler
    and I thought always this is the same event than onload in the body
    tag.
    Has anyone an idea? Is there a spry event I haven't found for
    exact this problem?
    Thanks for your help!
    regrads
    marcus

    Hello,
    U might want to look in to the SpryImageLoader.js that comes
    with the 1.6.1 download. It loads your images, and allows u put
    callbacks on them, and set priority of loading them.
    http://www.dbooth.net/photos/
    uses it to (expect don forgot to upload the
    SpryImageLoader.js thats why its not really working :P )
    But that will give the basic idea of how to use it.
    Spry.Utils.ImageLoader.(url, callback(needs to be a function
    or null), priority)

  • Image Click Event in html text

    Is there a way to attach event with the image inside html
    text in TextArea control. Just like we can attach text event with
    link tag?
    One possible solution is to enclose the image in <A>
    tag making it a link and setting its href to generate text event. I
    have already tried this and it works fine. But is there any other
    way to do that.
    Thanks

    Hi Prabhavathi,
    Here is how you handle double click events in Textedit control.
    1)Create a custom control in screen (say TEXT_CONTROL)
    2)In main program,
    a) Declarations:
    data: obj type ref to cl_gui_custiom_control.
          text type ref to cl_gui_textedit.
    b) Create the instance of custom container
    c) Create the instance of textedit control.
    3)Now to handle double click events , create a local class as follows.
    class shail_event definition.
    public section.
    methods:
    handle_doubleclick for event dblclick of cl_gui_textedit .
    endclass.
    class shail_event implementation.
    method handle_doubleclick .
    here do the coding for handling the double click.
    endmethod.
    endclass.
    4) Create an instance of the handler class(ie.ZSHAIL_EVENT).Let it be named hand.
    5) Define varibles for event.
    DATA: i_events TYPE cntl_simple_events,
          wa_events TYPE cntl_simple_event.
    SET HANDLER hand->handle_doubleclick for text.
    wa_events-eventid = cl_gui_textedit=>event_double_click.
    wa_events-appl_event = 'X'. "This is an application event
    APPEND wa_events TO i_events.
    6)
        CALL METHOD texte->set_registered_events
          EXPORTING
            events                    = i_events
          EXCEPTIONS
            cntl_error                = 1
            cntl_system_error         = 2
            illegal_event_combination = 3
            OTHERS                    = 4.
        IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    These are the basic steps needed for handling events in Textedit control.You can go to SE24 and type CL_GUI_TEXTEDIT to find the associated events of the class.
    If you want the program, kindly send your mail-id so that I can mail it to you.
    Regards,
    Sylendra.

  • Listener of a JPanel that listens to events of its components

    Is there a listener (that I can add to a JPanel) that listens to events generated by the panel's components?
    Award: 2 duke stars

    Well it ought to.
    If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained,
    Compilable and Executable, Example Program that demonstrates the
    incorrect behaviour, because I can't guess exactly what you are doing
    based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its
    original formatting.

  • Issue with HTML tags visible in Outlook emails

    Hi everyone, I'm having an issue with a website I'm working on.
    On our site, we have a page that generates emails after certain events occur. These are sent to a forwarding address on our mail server, which is then sent to several users on our mail server. These users have their accounts set up in Outlook (one in 2007,
    one in Mac 2011).
    We're are having an issue where these emails are displaying in Outlook with all of the HTML tags in the email visible. One of the users spoke to Microsoft support, and they remoted in and went through their Outlook settings and were not able to find any issues
    there.
    This issue is not global exactly. When one of the users added their email to their iPhone, the email displayed correctly. We added a Gmail account and my work account (which I also access through Outlook) to the forwarding list, and it displayed correctly in
    both. When we view these emails in the server's webmail client, the emails display fine. The issue seems to be with some discrepancy between Outlook and our email server.
    I spoke to our webhost about the issue, and they swore up and down the issue had nothing to do with them, and that it had to be an Outlook issue. I've had several professional web developers analyze the code that creates these emails, and they found nothing
    wrong with it. Something that several of my colleagues and our webhost suggested is that the issue could be with the email headers. This is the header for the email, as viewed through Outlook:
    Return-Path: <[email protected]>
    X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on clubcrown.com
    X-Spam-Level: *
    X-Spam-Status: No, score=1.5 required=7.0 tests=HTML_MESSAGE,MIME_HTML_ONLY,
    NO_DNS_FOR_FROM,NO_RELAYS autolearn=no version=3.3.1
    X-Original-To: [email protected]
    Delivered-To: [email protected]
    Received: by x.com (Postfix, from userid 30)
    id 50F7123D9E; Tue, 11 Feb 2014 14:20:00 -0500 (EST)
    X-Original-To: [email protected]
    Delivered-To: [email protected]
    Received: by x.com (Postfix, from userid 10000)
    id EC28323DA2; Tue, 11 Feb 2014 14:19:58 -0500 (EST)
    To: [email protected]
    Subject: A wholesale order has been placed
    X-PHP-Originating-Script: 10000:thanks.php
    MIME-Version: 1.0
    Any help would be greatly appreciated. Let me know if more information is needed. Thank you.

    Glad to hear that you have found the solution. And thank you for sharing the solution here, it will be helpful to other community members who have same questions.
    Cheers,
    Steve Fan
    TechNet Community Support

  • Muse CC Emails sent by Form widget are shown as html-tags

    Hi,
    I´ve got the following problem that emails sent by the Muse CC form widget are shown as html-code or html-tags in my inbox.
    Though the message contains all filled in data this is a quite unreadable format similarily as in post http://forums.adobe.com/message/5818028#5818028
    I already read the discussions here in the community but as it seems the issue though already known seems not be fixed yet nor does any of the answers which refer to the ISP configurations regarding message handling apply to me. Actually this is a first time issue with mails - haven´t had this problem up to now so I guess it´s a Muse thing.
    Though the mail is shown in some kind of html-tag format as mentioned it is actually marked as "text only" message?
    Furthermore the message is UTF-8 so there shouldn´t be any problems with special characters either but also German consonants like "ä,ü,ö" are not formatted correctly.
    I am using Windows 7, Outlook 2013 by the way.
    The Muse site was exported as html and then uploaded via ftp, I am not using catalyst.
    No idea what´s going wrong here hopefully someone has a solution to this problem.
    Help would be very much appreciated. Thanks in advance.
    (Hope my English is understandable)

    I have the same situation (( what to do?

  • How to remove html-tags from a text.

    Hello!
    I have a text-field which I will remove html-tag's from.
    Example:
    "This is a test<br><p> and another test"
    The function must return a similar text, but without the html-
    tags <br> and <p> (in this case).
    Anybody that can help me with this little problem?
    Thanks in advance for any help :-)
    Best regards
    Kjetil Klxve

    You can wait for some kind personal to post a complete code
    solution... But if you want to fix this yourself (which is good
    for the soul) here are some hints:
    - You can use SUBSTR to get at chunks of text
    - You can use INSTR to find particular characters.
    - You can use INSTR as an argument of SUBSTR
    Hence:
    bit_of_text := SUBSTR(text, 1, INSTR(text, '<'));
    chopped_text := SUBSTR(text, INSTR(text, '<'));
    bit_of_text := bit_of_text||SUBSTR(chopped_text, INSTR
    (text, '>'), INSTR(text, '<'));
    will give you the first bit of text that doesn't contain any
    angle brackets.
    From this you should be able to work out how to functionalised
    this (you'll need to store the offsets and use them in a loop
    construct).
    Note that this assumes that the text only contains the '<'
    character when it's part of a HTML tag. If you can't guarantee
    this then you'll have to explicitly search for all the tags e.g.
    bit_of_text := SUBSTR(text, 1, INSTR(lower(text), '<p>'));
    bit_of_text := SUBSTR(text, 1, INSTR(lower(text), '<br>'));
    This will be a bit of pain. And completely rules out XML!
    rgds APC

  • TFS 2012 - WI Query in TFS Web Access - History field contents appear with html tags presented as text

    When History field is selected as a column to be displayed in a WI query result, its contents are displayed with the HTML tags as if they where text, e.g. <p> contents </p>... 
    This occurs when query is run in web access contents in IE and when result is sent via email from within TFS (there's a button for this purpose).
    However, in Visual Studio 2012 the same History Column contents are shown without the tags, as one would expect.
    Furthermore, when one clicks on Open In Microsoft Office, for this query results in VS, and selects result in Excel, the History column in the Excel appears empty.
    The only way we found to bypass this issue for now, it to mark all the query result lines in VS, and right click for "print selected list..." to a virtual PDF printer. This way the result looks reasonably ok when History field is included.
    Kindly advise, Thank u very much.

    Hi Moital,  
    Thanks for your post.
    As far as I know history content will display with the HTML tags if there’s multiple lines in content, and History content not support show in Excel, that’s by design in TFS Server.  
    As Clementino said, you can submit this scenario in connect site, Microsoft engineers will evaluate them seriously. 
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Using onLoad event in jsp?

    Hi,
    i have created a link in my controller class dynamically and i want this link to load into my iView without clicking on Link control.
    That is , when the user clicks on the page having my iView he should see the contents of the link. For eg . an HTML report.
    How shall i accomplish this?
    i used onLoad event in the <body> but it  is not working.
    Thanks
    Saurabh

    Hi Saurabh,
    Try this:
    <head>
    <script language="javascript">
    function openwin(){
       var newWin = window.open("the real url", ....); // params and stuff
    window.onLoad = openwin();
    </script>
    </head>
    <body onLoad="openwin()">
    </body>
    </html>
    Regards,
    Pooja.
    Message was edited by: Pooja S

  • HTML tags in text-only e-mail notification (with HTML attachment)

    Greetings,
    Our "Purchase Order Review" e-mail notifications (as generated by the WF-Mailer) have HTML tags in the message body (which is "plain-text" text-only), with an HTML attachment. (The attachment looks good, and is what we are expecting.) All our e-mail notifications are text-only (which is how we want them), and this is the only kind of notification that is generating HTML tags in the 'text-only' message body.
    We'd like to keep the HTML attachment as it is, but we want to have the e-mail message body be text (without any HTML tags). The other option that would be acceptable is to NOT have any message content at all, and only the HTML attachment.
    Can either of these options be done, and how do we go about doing them?? Thanks!! -- Tom
    Tom Buck
    [email protected]
    PS: Here is a partial sample of the "text-only" message content...
    <HTML><HEAD></HEAD>
    <BODY BGCOLOR="#FFFFFF"><b>Oracle Workflow Notification (FYI)</b>
    <br>
    <hr>
    <P><table width=100% border=0 cellpadding=2 cellspacing=1 cols=3 rows=2>
    <!-- header -->
    <tr>
    <!-- ORACLE, ship-to, PURCHASE-ORDER -->
    <td width=45% valign=top>
    <!-- ORACLE -->
    <font color=black size=+2>
    BUTLER MANUFACTURING
    </font><br>
    <font color=black> BUTLER MANUFACTURING COMPANY
    <br> BUTLER MANUFACTURING HEADQUARTERS
    <br> 1540 GENESSEE ST.
    <br> KANSAS CITY
    , MO
    64102
    <br> US
    </font> </br>
    </td>
    <td width=25% valign=top>
    <!-- ship-to -->
    etc..., for another couple hundred lines. -- Tom

    in the notifications properties you will see two tabs, in one you can enter your message in text and in another you can enter in html. not sure if you had tried these.
    hth
    satish paul
    Greetings,
    Our "Purchase Order Review" e-mail notifications (as generated by the WF-Mailer) have HTML tags in the message body (which is "plain-text" text-only), with an HTML attachment. (The attachment looks good, and is what we are expecting.) All our e-mail notifications are text-only (which is how we want them), and this is the only kind of notification that is generating HTML tags in the 'text-only' message body.
    We'd like to keep the HTML attachment as it is, but we want to have the e-mail message body be text (without any HTML tags). The other option that would be acceptable is to NOT have any message content at all, and only the HTML attachment.
    Can either of these options be done, and how do we go about doing them?? Thanks!! -- Tom
    Tom Buck
    [email protected]
    PS: Here is a partial sample of the "text-only" message content...
    <HTML><HEAD></HEAD>
    <BODY BGCOLOR="#FFFFFF"><b>Oracle Workflow Notification (FYI)</b>
    <br>
    <hr>
    <P><table width=100% border=0 cellpadding=2 cellspacing=1 cols=3 rows=2>
    <!-- header -->
    <tr>
    <!-- ORACLE, ship-to, PURCHASE-ORDER -->
    <td width=45% valign=top>
    <!-- ORACLE -->
    <font color=black size=+2>
    BUTLER MANUFACTURING
    </font><br>
    <font color=black> BUTLER MANUFACTURING COMPANY
    <br> BUTLER MANUFACTURING HEADQUARTERS
    <br> 1540 GENESSEE ST.
    <br> KANSAS CITY
    , MO
    64102
    <br> US
    </font> </br>
    </td>
    <td width=25% valign=top>
    <!-- ship-to -->
    etc..., for another couple hundred lines. -- Tom

  • Method to Format a string column containing HTML tags as simple string.

    Hello,
    I am working with formating a string column which holds Html tags.
    I want to remove these tags from the actual data which has to be shown on the BI Publisher report.
    Can you suggest how can we format this in the DataSet designer of BI publisher so that my data is recognised on the Layout designer.
    I have been trying to create an expression using the "Add Element by Expression" option to format this html tag data as normal string without the tags.
    Can you suggest if this is the correct method to do this.
    I found this below code being used in an existing DateSet but i am not able to recreate a similar formating on this kind of data column.
    <![CDATA' || '['|| TO_CLOB(SUCCESS_CRITERIA) || ']' || ']>
    Kindly suggest if you have any idea on the above mentioned issue.
    Thanks,
    Shweta

    And read this:
    Navigate yourself around pitfalls related to the Runtime.exec() method
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • HTML tags  in emails sent through java

    Hi all,
    I am trying to send an email through my java code. I have set the content type of email to html. It is working fine for the html tags like <tm>,<head>,<table>,<td> etc but it is not working for the tabs whic set color ,border etc. <font color=#fffd"dd> ,<table border ="10"> etc
    How to enable this tags in java. What kind of API's i need to use for it.
    Hope my question is clear to all of you.
    Any pointers in this regard will be very helpful.
    Thanks,
    Abhishek chowdhury

    I am trying to send an email through my java code.No problem. As long as you construct the message correctly it should work.
    I have set the content type of email to html. It is working fine for the html tags like <tm>,<head>,<table>,<td> etc but it is not working for the tabs whic set color ,border etc. <font color=#fffd"dd> ,<table border ="10"> etcSo you haven't constructed them correctly.
    How to enable this tags in java.Java neither knows nor cares what is in a message body that it is sending. It is up to you.
    What kind of API's i need to use for it.I doubt that you need any APIs. Just construct the HTML correctly.
    Hope my question is clear to all of you.It's not, because the problem has nothing to do with Java and everything to do with your programming.

  • Using HTML tags in XML

    Trying to bring in an xml document that contains HTML tags but I can't seem to get it working.
    I have a bit of AS and a basic text field in a movie clip for now. I've pared it down as simply as I can to the following AS:
    var languageXML:XML = new XML();
    var nav:Array = new Array();
    languageXML.ignoreWhite = true;
    languageXML.load("code.xml");
    languageXML.onLoad = function(success) {
        var currentNavNode:XMLNode = this.firstChild.firstChild;
        var i:Number = 0;
        for (var childNode = currentNavNode; childNode != null; childNode=childNode.nextSibling, i++) {
            for (var stringNode:XMLNode = childNode.firstChild; stringNode != null; stringNode=stringNode.nextSibling, j++) {
                _root.feature0 = stringNode.firstChild.nodeValue
        //all the xml has now loaded so we're good to kick off the full nav
        _root.textWin.myText.html = true;
        _root.textWin.myText.htmlText = _root.feature0;
    Whilst my XML doc looks like this:
    <?xml version="1.0" encoding="utf-8"?>
    <feed>
    <item>
        <body><![CDATA[This<br>Should<br><br>Be fine.]]></body>
    </item>
    </feed>

    does trace(_root.textWin.myText+" "+_root.textWin.myText.multiline) show that you have a multline textfield?  if not, fix that.

Maybe you are looking for

  • I cant open Camera Raw in Bridge cs6 - MAC

    Hello - I'm using a Mac and use photoshop/bridge CS6. Today as i opened bridge to batch edit photos in camera raw, the "open in camera raw" option was not available to click on. It worked perfectly yesterday and now today it's not. Is there a way to

  • Bug? Menu Bar Not Accessible in Safari After Watching Full Screen Video

    Hi everyone, I have had this Not accessible menu bar problem time to time while using Safari, and I finally figured out what caused it. It always happens right after you go to a full screen video mode, and then get back out, and now when you move the

  • How to use SNMP to access interface counters for WAN port when not in bridged mode

    Hi All, Can't fault my timecapsule, however just struggling to get one little bit of functionality working.  I'm keen to get access to the WAN port interface counter information via SNMP, so I can track total bandwidth/throughput & also volume.  I ha

  • Hyperlink font colors not showing as desired

    I've created my text, hyperlinked it to another page or another website, and formatted it to the color and rollover and visited colors. But on the web it shows another color and some of the rollovers work and some don't. Suggestions?

  • Recommendations:Wireless Router Broadband over phone for Macbook (white)

    Can you please offer advice about buying a wireless router for my new Macbook? I have been using old fashioned cables and a speedtouch modem on my eMac up to now. Buying the Macbook has pushed me into the 21st century and I'm getting my head around w