ProcesskeyEvent not invoked in JDialog andin JPanel

I have overriden processKeyEvent in my class but this method never gets invoked on typing or pressing
a key but the processMouseEvents are invoked properly the JDK Version which I am using is
1.4.1_01 .Please guide what else should be done to handle key events for JDialog or Jpanel
import java.awt.*;
import javax.swing.*;
import java.awt.event.KeyEvent;
import java.awt.event.MouseEvent;
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2004</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
public class TestDialog extends JDialog {
public TestDialog(){
this.getContentPane().setLayout(null);
JButton jb = new JButton("HJHJH");
jb.setBounds(10,10,100,30);
this.getContentPane().add(jb);
this.enableEvents(AWTEvent.KEY_EVENT_MASK |AWTEvent.MOUSE_EVENT_MASK);
setSize(300,300);
setVisible(true);
public void processKeyEvent(KeyEvent keyEvent){
System.out.println("Key Event Called");
public void processMouseEvent(MouseEvent mouseEvent){
System.out.println("Mouse Event Called");
public static void main(String args[]){
new TestDialog();

Hi
Any component is passed events through processXXX() methods only if the component has focus.
Components like JPanel and JDialog never gain focus as the focus manager in java does not define focuses for a panel or JDialog . instead interactive comp.s like JButton , JTextField have focuses.
Override the setVisible(boolean) method as
public void setVisible(boolean b)
super.setVisible(b);
mycomp.grabFocus();
After this do not click the mouse anywhere else , if clicked the focus will again be lost.
try pressing keys and u'll know why it was happening.
Have fun..
Fire an reply trying this.
RGDS

Similar Messages

  • Calling JDialog from JPanel

    Hi there, I will try to make this problem simple to understand,
    I have a Jframe which makes use of Jpanels, in a seperate file I have made an extension of a Jpanel which has buttons and when one of these buttons is pressed I want to call up a JDialog from another seperate file. The problem is in the call up where I need the parent frame but I do not have it in the JPanel class i've created (hense this wouldnt work). Any ideas or is there an easier solution to this, I've searched the forum and I cannot find any suitable answers to this (or at least any i can understand)
    Thank you for your time

    Hi!
    One way is to create a new JFrame as parent... it isn't right but it works....
    In constructor call super(new JFrame(), "Dialog Title")Another one could be to send the reference from main frame to the dialog and use as owner frame...
    /Andrew

  • "A technical error during invocation : Could not invoke service reference" Error message while calling a service from BPM

    Hi Experts,
    We are facing a issue while calling a Automated activity from BPM process, the process gets suspended and the BPM logs says "Process XYZ suspended, A technical error during invocation: Could not invoke service reference name fdhueoegghejietyhsjk6886 Component name ABC " We have already checked the mapped service reference and provider system. Gone through the below link, but no help.
    http://http://wiki.scn.sap.com/wiki/display/TechTSG/Sending+a+message+from+SAP+NetWeaver+BPM+process+to+PI+fails+via+automated+activity?original_fqdn=wiki.sdn.sap.com
    Any pointers or suggestions to fix up this issue will be highly appreciated. Thanks in advance.
    Regards,
    Mohit Jaju

    The details/ID in NWDS Service Reference must exactly match the SOA configuration. Sometimes it's possible you have changed the reference or the group itself and something changed to become mismatched.
    It's possible they don't match - but the SG itself will show green in NWA since the service exists and responds on the target system. Does the ID listed in the error match what is shown in the NWDS project?
    regards, Nick

  • Newbie: should I use a JDialog or JPanel ?

    I have inherited an app that is 50% complete and I need to add a new popup window that is displayed in response to a Pulldown menu selection.
    The popup window will have 5 different text fields that will need to be passed back to the calling routine.
    In the source code that I inherited, similar windows are created using a JDialog and sometimes using a JPanel (and I can't figure out why).
    What are the upsides and downsides for choosing JDialog over JPanel ?
    Thank you

    This is a question of convenienve vs. reusability.
    If you inherit your component from JDialog, it will be easy to set up the infrastructure:
    - Return closes dialog:
      rootPane().setDefaultButton(yourButton)- Closing triggers your code:
      this.addWindowListener(myWindowListener}- Menu needed:
      this.setJMenuBar(myMenuBar) - ...
    But the downside is, that you can't reuse your component (possibly together with other components) inside a JFrame.
    Sven

  • Adapter Module is not Invoking

    Hi
    I have done one adapter module and i have given that in Sender Communication Channel. I have written audit log as well. But its not invoking.I am not getting any thing on Audit Log. My Scenario is working normally. Actually i have to get Host name at destination side but i am not getting
    I ave created on jar file. I have extrancted that jar file and i found the following files
    <javafile>.class
    <javafile>.java
    ejb-j2ee-engine.xml
    ejb-jar.xml
    but i have extract other in built adapter module jar file their i found manifest.mf apart from above mention files.
    I have create the jar files using nwds version 7.0
    My Adapter module is not working. I have done everything fine.Can anyone tell me the solution
    Best Regards
    Ravi Shankar B
    Message was edited by:
            RaviShankar B

    Hi,
    Ur module name shud b like this
    localejbs/<yourEJBClassName>
    If you specify an incorrect or non-existing module name, it is simply ignored.
    Check the following:
    1. Your stateless session bean should implement SessionBean and Module.
    2. The bean should have the following method
        public ModuleData process()
    Try to create a file in XI Server directory from your adapter module code and this way check whether your module is called or not.
    <i>[Reward if helpful]</i>
    Regards,
    Prateek

  • WebService is not invoking from OAPage

    Hi,
    I created a BPEL WS which creates a employee in oracle EBS and deployed sucessfully.My requirement is to invoke this WS from a custom OAF page.I generated all STUB java classes and done all coding in the controller of the page.The problem is WS is not invoking,no error is throwing.
    I am pasting my WSDL file and stub class
    CreateEmployee WSDL
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions
    name="CreateEmployee"
    targetNamespace="http://xmlns.oracle.com/CreateEmployee"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://xmlns.oracle.com/CreateEmployee"
    xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing"
    xmlns:ns1="http://www.globalcompany.com/ns/sales"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:client="http://xmlns.oracle.com/CreateEmployee"
    >
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema"
    targetNamespace="http://www.globalcompany.com/ns/sales"
    xmlns:po="http://www.globalcompany.com/ns/sales"
    elementFormDefault="qualified">
    <annotation>
    <documentation xml:lang="en">
    Order Booking schema for GlobalCompany.com.
    Copyright 2005 GlobalCompany.com. All rights reserved.
    </documentation>
    </annotation>
    <element name="EmployeeDetails" type="po:EmployeeDetails"/>
    <complexType name="EmployeeDetails">
    <sequence>
    <element name="EmployeeNumber" type="string"/>
    <element name="DOB" type="date"/>
    <element name="LastName" type="string"/>
    <element name="Bgid" type="integer"/>
    <element name="EffectiveDate" type="date"/>
    <element name="Gender" type="string"/>
    </sequence>
    </complexType>
    </schema>
    <xs:schema targetNamespace="http://schemas.xmlsoap.org/ws/2003/03/addressing" xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" blockDefault="#all">
    <!-- //////////////////// WS-Addressing //////////////////// -->
    * <!-- Endpoint reference -->*
    * <xs:element name="EndpointReference" type="wsa:EndpointReferenceType"/>*
    * <xs:complexType name="EndpointReferenceType">*
    * <xs:sequence>*
    * <xs:element name="Address" type="wsa:AttributedURI"/>*
    * <xs:element name="ReferenceProperties" type="wsa:ReferencePropertiesType" minOccurs="0"/>*
    * <xs:element name="PortType" type="wsa:AttributedQName" minOccurs="0"/>*
    * <xs:element name="ServiceName" type="wsa:ServiceNameType" minOccurs="0"/>*
    * <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">*
    * <xs:annotation>*
    * <xs:documentation>*
    * If "Policy" elements from namespace "http://schemas.xmlsoap.org/ws/2002/12/policy#policy" are used, they must appear first (before any extensibility elements).*
    * </xs:documentation>*
    * </xs:annotation>*
    *</xs:any> *
    * </xs:sequence>*
    * <xs:anyAttribute namespace="##other" processContents="lax"/>*
    * </xs:complexType>*
    * <xs:complexType name="ReferencePropertiesType">*
    * <xs:sequence>*
    * <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>*
    * </xs:sequence>*
    * </xs:complexType>*
    * <xs:complexType name="ServiceNameType">*
    * <xs:simpleContent>*
    * <xs:extension base="xs:QName">*
    * <xs:attribute name="PortName" type="xs:NCName"/>*
    * <xs:anyAttribute namespace="##other" processContents="lax"/>*
    * </xs:extension>*
    * </xs:simpleContent>*
    * </xs:complexType>*
    * <!-- Message information header blocks -->*
    * <xs:element name="MessageID" type="wsa:AttributedURI"/>*
    * <xs:element name="RelatesTo" type="wsa:Relationship"/>*
    * <xs:element name="To" type="wsa:AttributedURI"/>*
    * <xs:element name="Action" type="wsa:AttributedURI"/>*
    * <xs:element name="From" type="wsa:EndpointReferenceType"/>*
    * <xs:element name="ReplyTo" type="wsa:EndpointReferenceType"/>*
    * <xs:element name="FaultTo" type="wsa:EndpointReferenceType"/>*
    * <xs:element name="Recipient" type="wsa:EndpointReferenceType"/>*
    * <xs:complexType name="Relationship">*
    * <xs:simpleContent>*
    * <xs:extension base="xs:anyURI">*
    * <xs:attribute name="RelationshipType" type="xs:QName" use="optional"/>*
    * <xs:anyAttribute namespace="##other" processContents="lax"/>*
    * </xs:extension>*
    * </xs:simpleContent>*
    * </xs:complexType>*
    * <xs:simpleType name="RelationshipTypeValues">*
    * <xs:restriction base="xs:QName">*
    * <xs:enumeration value="wsa:Response"/>*
    * </xs:restriction>*
    * </xs:simpleType>*
    * <!-- Common declarations and definitions -->*
    * <xs:complexType name="AttributedQName">*
    * <xs:simpleContent>*
    * <xs:extension base="xs:QName">*
    * <xs:anyAttribute namespace="##other" processContents="lax"/>*
    * </xs:extension>*
    * </xs:simpleContent>*
    * </xs:complexType>*
    * <xs:complexType name="AttributedURI">*
    * <xs:simpleContent>*
    * <xs:extension base="xs:anyURI">*
    * <xs:anyAttribute namespace="##other" processContents="lax"/>*
    * </xs:extension>*
    * </xs:simpleContent>*
    * </xs:complexType>*
    </xs:schema>
    </types>
    <message name="CreateEmployeeResponseMessage">
    <part name="payload" element="ns1:EmployeeDetails"/>
    </message>
    <message name="CreateEmployeeRequestMessage">
    <part name="payload" element="ns1:EmployeeDetails"/>
    </message>
    <message name="WSARelatesToHeader">
    <part name="RelatesTo" element="wsa:RelatesTo"/>
    </message>
    <message name="WSAReplyToHeader">
    <part name="ReplyTo" element="wsa:ReplyTo"/>
    </message>
    <message name="WSAMessageIDHeader">
    <part name="MessageID" element="wsa:MessageID"/>
    </message>
    <portType name="CreateEmployeeCallback">
    <operation name="onResult">
    <input message="tns:CreateEmployeeResponseMessage"/>
    </operation>
    </portType>
    <portType name="CreateEmployee">
    <operation name="initiate">
    <input message="tns:CreateEmployeeRequestMessage"/>
    </operation>
    </portType>
    <binding name="CreateEmployeeCallbackBinding" type="tns:CreateEmployeeCallback">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="onResult">
    <soap:operation style="document" soapAction="onResult"/>
    <input>
    <soap:header message="tns:WSARelatesToHeader" part="RelatesTo" use="literal" encodingStyle=""/>
    <soap:body use="literal"/>
    </input>
    </operation>
    </binding>
    <binding name="CreateEmployeeBinding" type="tns:CreateEmployee">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <operation name="initiate">
    <soap:operation style="document" soapAction="initiate"/>
    <input>
    <soap:header message="tns:WSAReplyToHeader" part="ReplyTo" use="literal" encodingStyle=""/>
    <soap:header message="tns:WSAMessageIDHeader" part="MessageID" use="literal" encodingStyle=""/>
    <soap:body use="literal"/>
    </input>
    </operation>
    </binding>
    <service name="CreateEmployee">
    <port name="CreateEmployeePort" binding="tns:CreateEmployeeBinding">
    <soap:address location="http://kbace12:8888/orabpel/default/CreateEmployee/1.0"/>
    </port>
    </service>
    <service name="CreateEmployeeCallbackService">
    <port name="CreateEmployeeCallbackPort" binding="tns:CreateEmployeeCallbackBinding">
    <soap:address location="http://set.by.caller"/>
    </port>
    </service>
    <plnk:partnerLinkType name="CreateEmployee">
    <plnk:role name="CreateEmployeeProvider">
    <plnk:portType name="tns:CreateEmployee"/>
    </plnk:role>
    <plnk:role name="CreateEmployeeRequester">
    <plnk:portType name="tns:CreateEmployeeCallback"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>
    CreateEmployeeStub.java
    package mentor.oracle.apps.webservices;
    import oracle.soap.transport.http.OracleSOAPHTTPConnection;
    import org.apache.soap.encoding.soapenc.BeanSerializer;
    import org.apache.soap.encoding.SOAPMappingRegistry;
    import org.apache.soap.util.xml.QName;
    import java.util.Vector;
    import org.w3c.dom.Element;
    import java.net.URL;
    import org.apache.soap.Body;
    import org.apache.soap.Envelope;
    import org.apache.soap.messaging.Message;
    import java.util.Properties;
    public class CreateEmployeeStub
    //public String endpoint = "http://172.16.1.157:8888/orabpel/default/CreateEmployee/1.0";
    private OracleSOAPHTTPConnection m_httpConnection = null;
    private SOAPMappingRegistry m_smr = null;
    public CreateEmployeeStub()
    m_httpConnection = new OracleSOAPHTTPConnection();
    public void initiate(Element requestElem) throws Exception
    URL endpointURL = new URL( "http://172.16.1.157:8888/orabpel/default/CreateEmployee/1.0");
    Envelope requestEnv = new Envelope();
    Body requestBody = new Body();
    Vector requestBodyEntries = new Vector();
    requestBodyEntries.addElement(requestElem);
    requestBody.setBodyEntries(requestBodyEntries);
    requestEnv.setBody(requestBody);
    Message msg = new Message();
    msg.setSOAPTransport(m_httpConnection);
    msg.send(endpointURL, "initiate", requestEnv);
    and Input to initiate method is in the form of XML
    <ns1:EmployeeDetails>
    <ns1:EmployeeNumber>6999</ns1:EmployeeNumber>
    <ns1:DOB>2000-07-15</ns1:DOB>
    <ns1:LastName>Manoj9334</ns1:LastName>
    <ns1:Bgid>7577</ns1:Bgid>
    <ns1:EffectiveDate>2009-07-15</ns1:EffectiveDate>
    <ns1:Gender>M</ns1:Gender>
    </ns1:EmployeeDetails>
    that i created using org.w3c.dom.Element class before invoking the initiate method.
    Please give solution to this problem
    Thanks in Advance

    You better ask this in the [OA Forum|http://forums.oracle.com/forums/forum.jspa?forumID=210]
    Timo

  • ORACLE ADF 11g /JSF TO  serviet (Service method) not invoking

    Hi,
    ORACLE ADF 11g /JSF TO serviet (Service method) not invoking
    My project name is : ComplProject
    inside the project im having 1 jsp say x.jsp
    work environment : (oracleADF 11g) jdev11 and weblogic server 10.3
    in x.jsp im displaying 1 go link -> when ever we click on GO link it should go to ComplServlet.java
    i tried like,
    FacesContext.getCurrentInstance().getExternalContext().redirect("/servlet/ComplServlet");
    the "ComplServlet" is an URL pattern in web.xml which points to servlet.
    but not working
    i pointed to faces-config.xml also , not working
    i tried to forward like
    FacesContext context = FacesContext.getCurrentInstance();
    ServletContext sContext = (ServletContext)context.getExternalContext().getContext();
    ServletRequest request = (ServletRequest)context.getExternalContext().getRequest();
    System.out.println("third line...............");
    HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse();
    response.sendRedirect("/servlet/ViewDocument");
    sContext.getRequestDispatcher("/servlet/ViewDocument").include(request, response);
    brief
    (from jsf page) after clicking on GO LINK i need to redirect or control should go to servlet ->service method
    thanks in advance
    regards,
    sandeep

    Hi,
    i tried like,
    FacesContext.getCurrentInstance().getExternalContext().redirect("/servlet/ComplServlet");
    the "ComplServlet" is an URL pattern in web.xml which points to servlet.
    but not workingUse like following.
        public HttpServletRequest getServletRequest() {
            return (HttpServletRequest)facesContext.getExternalContext().getRequest();
        public redirect(String url){
           getServletRequest().sendRedirect(getServletRequest().getContextPath() + "/servlet/ComplServlet");
        }If you are using golink as frank suggested then use it like this.
    <af:goLink text="ComplServlet" destination="/servlet/ComplServlet"/>no need of using context when using goLink,
    Regards,
    Santosh.

  • SES Release Strategy not invoked in Backend from SRM confirmation posting

    Hi,
    I have configured a SES release strategy based on vendor number in R/3. When a SES is created in R/3 via ML81N the release strategy is invoked as expected. However, when a confirmation is entered in SRM for that vendor, the SES that is created in the backend system is created in accepted status and the release strategy is not invoked.
    Can anyone advise how to get this to work the same way as ML81N?
    I would expect that the SES would be created in the backend from the confirmation without acceptance and the release procedure to be the same as ML81N.
    thanks,
    Michelle.

    Hi,
    The SRM confirmation in EBP is the goods receipt(MIGO) and not the service entry sheet entry (ML81N) as we do in Materials management.
    As per my understanding there is no provision of service entry sheet entry in SRM 5.0 as of now  and SRM 7.0 has this option coming up :
    In SRM 7.0 ,
    "Supplier-maintained confirmation (service entry sheet) for services performed based on the service items within a purchase order
    Confirmation supporting hierarchical structure of service items"
    are added.
    Look for this information in the thread which speaks about SRM 7.0
    Re: Benefits of upgrading to SAP SRM 2007
    which gives the info in slide 11, Delta SRM 7.0, Service procurement -2
    Best regards,
    Sridhar.

  • Searching LOV is not invoking any method

    Hello JHeadstart team:
    I have the following behaviour with my LOVs generated from JHeadstart (10.1.2)
    The "Go" button seems to not invoke anything, just give back the same page, not doing any filter.
    By watching the log window in JDeveloper, seems like no event is invoked.
    Also, I don't see in the generated lov.uix page an event called lovFilter under handlers (should I have one?)
    When the page is invoked from the parent page, I have the following log, and the advancedSearch is being invoked giving me the filter, if I typed something before clicking the flashlight:
    12:01:56 DEBUG (JhsActionServlet) -Setting current HttpServletRequest on jhsUserRoles wrapper object on session to allow EL access to request.isUserInRolefunction
    12:01:56 DEBUG (JhsActionServlet) -Request class: com.evermind.server.http.EvermindHttpServletRequest
    12:01:56 DEBUG (JhsActionServlet) -Request URI: /BugTracker-ViewController-context-root/LovUpdProcess2.do
    12:01:56 DEBUG (JhsActionServlet) -Request Character Encoding: windows-1252
    12:01:56 DEBUG (JhsActionServlet) -Parameter baseUIModel: MeineFMUIModel
    12:01:56 DEBUG (JhsActionServlet) -Parameter searchText: <Unbekannt>
    12:01:56 DEBUG (JhsActionServlet) -Parameter multiSelect: false
    12:01:56 DEBUG (JhsActionServlet) -Parameter event: lovFilter
    12:01:56 DEBUG (JhsActionServlet) -Parameter lovUsage: form
    12:01:56 DEBUG (JhsActionServlet) -Parameter searchAttribute:
    12:01:56 DEBUG (JhsActionServlet) -Parameter contextURI: /BugTracker-ViewController-context-root
    12:01:56 DEBUG (JhsActionServlet) -Parameter pageTimeStamp: ignore
    12:01:56 DEBUG (JhsActionServlet) -Parameter source: VB_MeineFMProzess
    12:01:56 DEBUG (JhsActionServlet) -Parameter enc: windows-1252
    12:01:56 DEBUG (JhsActionServlet) -Parameter configName: BaseUIPBCfg1
    12:01:56 DEBUG (JhsDataAction) -Executing action /LovUpdProcess2
    12:01:56 DEBUG (JhsDataAction) -MultiSelect stored on session Context with value false
    12:01:56 DEBUG (JhsDataAction) -lastIssuedPageTimeStamp NOT updated because pageTimeStamp parameter has value 'ignore'
    12:01:56 DEBUG (JhsDataAction) -Found existing searchBean for UpdProcess2UIModel
    12:01:56 DEBUG (JhsDataAction) -Stored searchBean for UpdProcess2UIModel on request
    12:01:56 DEBUG (JhsDataAction) -No commit event in request and multiRowUpdateEvent request param not set, multi-row update NOT executed
    12:01:56 DEBUG (JhsDataAction) -executing onLovFilter
    12:01:56 DEBUG (JhsDataAction) -Lov icon clicked, clear searchText in searchBean
    12:01:56 DEBUG (JhsDataAction) -executing onQuickSearch
    12:01:56 DEBUG (JhsDataAction) -Populating bean: searchBean
    12:01:56 DEBUG (JhsApplicationModuleImpl) -executing advancedSearch for ProzessList
    12:01:56 DEBUG (JhsDataAction) -Storing table binding factory under key jhsTableBindings on request
    12:01:56 DEBUG (JhsDataAction) -Forward set by parameter property returned: /WEB-INF/page/LovUpdProcess2.uix
    But nothing happens when clicking "Go". Is it a bug? Do I have any workaround?

    Here goes my workaround. JHeadstart Team, please check if what I'm doing is right. If yes, I believe this is an important correction for future releases:
    Reason:
    The LOV page generated has in the <listOfValues> tag the attribute searchAreaMode="filter".
    The onLovFilter event has the code:
    String searchAreaMode = request.getParameter(SEARCH_AREA_MODE);
    if ("advanced".equals(searchAreaMode))
    onAdvancedSearch(daContext);
    else if ("simple".equals(searchAreaMode))
    onQuickSearch(daContext);
    else
    // if we get here, we are not yet in the LOV page, the user
    // has invoked the page through clicking on the lov icon.
    // we must clear the search text so it is not displayed as search
    // criterium in the lov (searchAttribute is already empty when
    // clicking the lov icon)
    // And onQuickSearch should only execute the query if iterator
    // is not inf find mode. To signal to the onQuickSearch method that
    // this check is needed and to clear the search text, we set a
    // request attribute
    request.setAttribute(LOV_CHECK_FIND_MODE, "true");
    mLog.debug("Lov icon clicked, clear searchText in searchBean");
    onQuickSearch(daContext);
    But this code is setting the LOV_CHECK_FIND_MODE to true when searchArea = "filter", making the onQuickSearch event to set the searchText to null
    I overriden the whole event adding also the
    else if ("filter".equals(searchAreaMode))
    onQuickSearch(daContext);
    and now is working fine.
    In my previous post I mentioned that also the attribute was wrong, but this was my mistake in the ApplicationStructure file.

  • Custom button with action listener - will not invoke action listener

    Hi
    For whatever reason, I cannot find a concise example of a simple custom component that can invoke an action listener. The tutorials I've read so far either ignore this fundamental topic or only make the slightest make reference to it.
    The best I have come up with - in terms of a simple prototype is below... but, the action listener is never invoked.... Can someone tell me what I am missing (full code below). Hopefully, what is missing or incorrect will be obvious to you JSF experts out there.
    Thanks for any help!!
    -f
    tld
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
      <tlib-version>0.01</tlib-version>
      <jsp-version>1.2</jsp-version>
      <short-name>jsfcustomcomponent</short-name>
      <uri>http://jsfcustomcomponent/</uri>
      <description><![CDATA[jsf custom component tags]]>  </description>
      <tag>
        <name>specialBtnTag</name>
        <tag-class>jsfcustomcomponent.SpecialBtnTag</tag-class>
        <attribute>
          <name>value</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
          <description><![CDATA[button value]]></description>
        </attribute>
        <attribute>
          <name>actionListener</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
          <description><![CDATA[action listener]]> </description>
        </attribute>
      </tag>
    </taglib>
    SpecialBtnComponent
    package jsfcustomcomponent;
    import javax.faces.component.*;
    import javax.faces.context.*;
    import javax.faces.el.*;
    import javax.faces.event.*;
    public class SpecialBtnComponent
        extends UIComponentBase implements ActionSource
        public static final String COMPONENT_TYPE = "SpecialBtnComponent";
        public static final String RENDERER_TYPE = "SpecialBtnRenderer";
        public String getFamily()
            return COMPONENT_TYPE;
        public SpecialBtnComponent()
            super();
            setRendererType(SpecialBtnComponent.RENDERER_TYPE);
        private String value;
        public void setValue(String value, FacesContext facesContext)
            this.value = value;
        public String getValue()
            if (null != value)
                return value;
            ValueBinding _vb = getValueBinding("value");
            if (_vb != null)
                return (String) _vb.getValue(getFacesContext());
            else
                return null;
        private MethodBinding action = null;
        public MethodBinding getAction()
            return action;
        public void setAction(MethodBinding methodBinding)
            this.action = action;
        private MethodBinding actionListener = null;
        public MethodBinding getActionListener()
            return (this.actionListener);
        public void setActionListener(MethodBinding methodBinding)
            this.actionListener = actionListener;
        public boolean isImmediate()
            return false;
        public void setImmediate(boolean _boolean)
            //this.immediate = immediate;
        public void addActionListener(ActionListener actionListener)
            addFacesListener(actionListener);
        public ActionListener[] getActionListeners()
            return (ActionListener[]) getFacesListeners(ActionListener.class);
        public void removeActionListener(ActionListener actionListener)
            removeFacesListener(actionListener);
        public Object saveState(FacesContext context)
            Object values[] = new Object[5];
            values[0] = super.saveState(context);
            values[1] = value;
            values[2] = saveAttachedState(context, action);
            values[3] = saveAttachedState(context, actionListener);
            return ( (Object) (values));
        public void restoreState(FacesContext context, Object state)
            Object values[] = (Object[]) state;
            super.restoreState(context, values[0]);
            value = (String) values[1];
            action = (MethodBinding) restoreAttachedState(context, values[2]);
            actionListener = (MethodBinding) restoreAttachedState(context, values[3]);
        public void broadcast(FacesEvent event) throws AbortProcessingException
            super.broadcast(event);
            if (event instanceof ActionEvent)
                FacesContext context = getFacesContext();
                MethodBinding mb = getActionListener();
                if (mb != null)
                    mb.invoke(context, new Object[]
                              {event});
                ActionListener listener = context.getApplication().getActionListener();
                if (listener != null)
                    listener.processAction( (ActionEvent) event);
        public void queueEvent(FacesEvent e)
            if (e instanceof ActionEvent)
                if (isImmediate())
                    e.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
                else
                    e.setPhaseId(PhaseId.INVOKE_APPLICATION);
            super.queueEvent(e);
    SpecialBtnRenderer
    package jsfcustomcomponent;
    import java.util.*;
    import javax.faces.component.*;
    import javax.faces.context.*;
    import javax.faces.event.*;
    import javax.faces.render.*;
    public class SpecialBtnRenderer
        extends Renderer
        String value;
        public SpecialBtnRenderer()
        public void decode(FacesContext context, UIComponent component)
            Map requestMap = context.getExternalContext().getRequestParameterMap();
            String clientId = component.getClientId(context);
            SpecialBtnComponent specialBtnComponent = (SpecialBtnComponent) component;
            String value = (String) requestMap.get(clientId);
            if (null != value)
                specialBtnComponent.setValue(value, context);
            ActionEvent actionEvent = new ActionEvent(specialBtnComponent);
            specialBtnComponent.queueEvent(actionEvent);
        public void encodeEnd(FacesContext context, UIComponent component) throws java.io.IOException
            SpecialBtnComponent specialBtnComponent = (SpecialBtnComponent) component;
            ResponseWriter writer = context.getResponseWriter();
            String clientId = component.getClientId(context);
            value = (String) component.getAttributes().get("value");
            if (value == null)
                value = "defaultValue";
            buildSpecialBtn(writer, value, clientId, specialBtnComponent);
        private void buildSpecialBtn(ResponseWriter writer, String value, String clientId, SpecialBtnComponent component) throws java.io.IOException
            writer.startElement("table", component);
            writer.startElement("tbody", component);
            writer.startElement("tr", component);
            writer.startElement("td", component);
            value = String.valueOf(value);
            writer.startElement("input", component);
            writer.writeAttribute("type", "submit", null);
            writer.writeAttribute("name", clientId, "clientId");
            writer.writeAttribute("value", value, null);
            writer.endElement("input");
            writer.endElement("td");
            writer.endElement("tr");
            writer.endElement("tbody");
            writer.endElement("table");
    SpecialBtnTag
    package jsfcustomcomponent;
    import javax.faces.component.*;
    import javax.faces.el.*;
    import javax.faces.webapp.*;
    import com.sun.faces.util.*;
    public class SpecialBtnTag
        extends UIComponentTag
        public String value = null;
        public String actionListener = null;
        public String getComponentType()
            return SpecialBtnComponent.COMPONENT_TYPE;
        public String getRendererType()
            return SpecialBtnComponent.RENDERER_TYPE;
        protected void setProperties(UIComponent component)
            super.setProperties(component);
            if (! (component instanceof SpecialBtnComponent))
                throw new IllegalStateException("Component " + component.toString() +
                                                " not expected type.  Expected: jsfcustomcomponent.SpecialBtnComponent.  Perhaps you�re missing a tag?");
            SpecialBtnComponent specialBtnComponent = (SpecialBtnComponent) component;
            if (value != null)
                if (isValueReference(value))
                    ValueBinding vb = Util.getValueBinding(value);
                    specialBtnComponent.setValueBinding("value", vb);
                else
                    throw new IllegalStateException("The value for �value� must be a ValueBinding.");
            if (actionListener != null)
                if (isValueReference(actionListener))
                    ValueBinding vb = Util.getValueBinding(actionListener);
                    specialBtnComponent.setValueBinding("actionListener", vb);
                else
                    throw new IllegalStateException("The value for �actionListener� must be a ValueBinding.");
        public void release()
            super.release();
            value = null;
            actionListener = null;
        public void setValue(String value)
            this.value = value;
        public String getValue()
            return this.value;
        public void setActionListener(String actionListener)
            this.actionListener = actionListener;
        public String getActionListener()
            return this.actionListener;
    jsp1.jsp
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@taglib uri="http://jsfcustomcomponent/" prefix="j"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    <link rel="stylesheet" type="text/css" href="./stylesheet.css" title="Style">
    </head>
    <body>
    <f:view>
      <h:form id="form01">
        <h:outputText value="test special button with action listener"/>
        <j:specialBtnTag value="#{specialBtnBacking.specialBtnValue}" actionListener="#{specialBtnBacking.specialBtnActionListener}"/>
        <h:messages/>
        <h:outputText value="#{specialBtnBacking.outcome}"/>
      </h:form>
    </f:view>
    </body>
    </html>
    SpecialBtnBacking
    package specialbtn;
    import javax.faces.context.*;
    import javax.faces.event.*;
    public class SpecialBtnBacking
        private FacesContext context;
        public SpecialBtnBacking()
            this.setSpecialBtnValue("Special Button with action listener");
        private String specialBtnValue;
        public String getSpecialBtnValue()
            return this.specialBtnValue;
        public void setSpecialBtnValue(String specialBtnValue)
            this.specialBtnValue = specialBtnValue;
        private String outcome="actionlistener NOT invoked: click specialBtn above to test";
        public String getOutcome()
            return outcome;
        public void setOutcome(String outcome)
            this.outcome = outcome;
        public void specialBtnActionListener(ActionEvent evt)
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
            this.outcome="***action listener invoked!!!***";
    faces-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
      <managed-bean>
        <managed-bean-name>specialBtnBacking</managed-bean-name>
        <managed-bean-class>specialbtn.SpecialBtnBacking</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
      </managed-bean>
      <component>
        <component-type>SpecialBtnComponent</component-type>
        <component-class>jsfcustomcomponent.SpecialBtnComponent</component-class>
        <component-extension>
          <renderer-type>SpecialBtnRenderer</renderer-type>
        </component-extension>
      </component>
      <render-kit>
        <renderer>
          <component-family>SpecialBtnComponent</component-family>
          <renderer-type>SpecialBtnRenderer</renderer-type>
          <renderer-class>jsfcustomcomponent.SpecialBtnRenderer</renderer-class>
        </renderer>
      </render-kit>
    </faces-config>
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
      <display-name>pagerWEB</display-name>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.faces</url-pattern>
      </servlet-mapping>
      <jsp-config>
        <taglib>
          <taglib-uri>http://jsfcustomcomponent/</taglib-uri>
          <taglib-location>/WEB-INF/jsfcustomcomponent.tld</taglib-location>
        </taglib>
      </jsp-config>
      <servlet>
        <description>Added by JBuilder to compile JSPs with debug info</description>
        <servlet-name>debugjsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
          <param-name>classdebuginfo</param-name>
          <param-value>true</param-value>
        </init-param>
        <load-on-startup>3</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>debugjsp</servlet-name>
        <url-pattern>*.jsp</url-pattern>
      </servlet-mapping>
    </web-app>

    got it working....
    The changes were:
    in "SpecialBtnRenderer"...
    --new--
                        mb.invoke(context, new Object[1]);
    --old--
                        mb.invoke(context, new Object[0]);
    in "SpecialBtnTag"...
    --new--
    import javax.faces.event.ActionEvent;
    --new--
                    MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding(specialBtnListener, new Class[]{ActionEvent.class});
    --old--
                    MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding(specialBtnListener, null);
    -Below is the entire application, again -- for those (like myself) who need concrete examples...
    I hope this helps someone else! --f
    jsp1.jsp
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@taglib uri="http://jsfcustomcomponent/" prefix="j"%>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>JSP Page</title>
    <link rel="stylesheet" type="text/css" href="./stylesheet.css" title="Style">
    </head>
    <body>
    <f:view>
        <h:messages/>
      <h:form id="form01">
        <h:outputText value="test special button with action listener"/>
        <j:specialBtnTag value="#{specialBtnBacking.specialBtnValue}" specialBtnListener="#{specialBtnBacking.specialBtnActionListener}"/>
        <h:outputText value="#{specialBtnBacking.outcome}"/>
      </h:form>
    </f:view>
    </body>
    </html>
    SpecialBtnBacking
    package specialbtn;
    import javax.faces.context.*;
    import javax.faces.event.*;
    public class SpecialBtnBacking
        private FacesContext context;
        public SpecialBtnBacking()
            this.setSpecialBtnValue("Special Button with action listener");
        private String specialBtnValue;
        public String getSpecialBtnValue()
            return this.specialBtnValue;
        public void setSpecialBtnValue(String specialBtnValue)
            this.specialBtnValue = specialBtnValue;
        private String outcome = "actionlistener NOT invoked: click specialBtn above to test";
        public String getOutcome()
            return outcome;
        public void setOutcome(String outcome)
            this.outcome = outcome;
        public void specialBtnActionListener(ActionEvent evt)
            System.out.println("\n\n");
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
            System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Jsp1Backing/specialBtnActionListener()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n");
            this.outcome = "***action listener invoked!!!***";
    jsfcustomcomponent.tld
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
    <taglib>
      <tlib-version>0.01</tlib-version>
      <jsp-version>1.2</jsp-version>
      <short-name>jsfcustomcomponent</short-name>
      <uri>http://jsfcustomcomponent/</uri>
      <description><![CDATA[jsf custom component tags]]>  </description>
      <tag>
        <name>specialBtnTag</name>
        <tag-class>jsfcustomcomponent.SpecialBtnTag</tag-class>
        <attribute>
          <name>value</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
          <description><![CDATA[button value]]></description>
        </attribute>
        <attribute>
          <name>specialBtnListener</name>
          <required>true</required>
          <rtexprvalue>true</rtexprvalue>
          <description><![CDATA[action listener]]> </description>
        </attribute>
      </tag>
    </taglib>
    faces-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN" "http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
    <faces-config>
      <managed-bean>
        <managed-bean-name>specialBtnBacking</managed-bean-name>
        <managed-bean-class>specialbtn.SpecialBtnBacking</managed-bean-class>
        <managed-bean-scope>request</managed-bean-scope>
      </managed-bean>
      <component>
        <component-type>SpecialBtnComponent</component-type>
        <component-class>jsfcustomcomponent.SpecialBtnComponent</component-class>
        <component-extension>
          <renderer-type>SpecialBtnRenderer</renderer-type>
        </component-extension>
      </component>
      <render-kit>
        <renderer>
          <component-family>SpecialBtnComponent</component-family>
          <renderer-type>SpecialBtnRenderer</renderer-type>
          <renderer-class>jsfcustomcomponent.SpecialBtnRenderer</renderer-class>
        </renderer>
      </render-kit>
    </faces-config>
    SpecialBtnComponent.java
    package jsfcustomcomponent;
    import javax.faces.component.*;
    import javax.faces.context.*;
    import javax.faces.el.*;
    import javax.faces.event.*;
    public class SpecialBtnComponent
        extends UIComponentBase implements ActionSource
        public static final String COMPONENT_TYPE = "SpecialBtnComponent";
        public static final String RENDERER_TYPE = "SpecialBtnRenderer";
        public String getFamily()
            return COMPONENT_TYPE;
        public SpecialBtnComponent()
            super();
            setRendererType(SpecialBtnComponent.RENDERER_TYPE);
        private String value;
        public void setValue(String value, FacesContext facesContext)
            this.value = value;
        public String getValue()
            if (null != this.value)
                return this.value;
            ValueBinding _vb = getValueBinding("value");
            if (_vb != null)
                return (String) _vb.getValue(getFacesContext());
            else
                return null;
        private MethodBinding specialBtnListener = null;
        public MethodBinding getActionListener()
            return (this.specialBtnListener);
        public void setActionListener(MethodBinding actionListener)
            this.specialBtnListener = actionListener;
        public Object saveState(FacesContext context)
            Object values[] = new Object[3];
            values[0] = super.saveState(context);
            values[1] = saveAttachedState(context, this.specialBtnListener);
            values[2] = this.value;
            return (values);
        public void restoreState(FacesContext context, Object state)
            Object values[] = (Object[]) state;
            super.restoreState(context, values[0]);
            this.specialBtnListener = (MethodBinding) restoreAttachedState(context, values[1]);
            this.value = (String) restoreAttachedState(context, values[2]);
        public void broadcast(FacesEvent event) throws AbortProcessingException
            super.broadcast(event);
            if (event instanceof ActionEvent)
                FacesContext context = getFacesContext();
                MethodBinding mb = this.getActionListener();
                if (mb != null)
                    try
                        mb.invoke(context, new Object[]
                                  {event});
                    catch (EvaluationException ex)
                        System.out.println("SpecialBtnComponent/broadcast(FacesEvent event)...EvaluationException encountered - ex.getMessage()=" + ex.getMessage());
                        ex.printStackTrace();
                ActionListener actionListener = context.getApplication().getActionListener();
                if (actionListener != null)
                    actionListener.processAction( (ActionEvent) event);
        public void queueEvent(FacesEvent e)
            if (e instanceof ActionEvent)
                e.setPhaseId(PhaseId.INVOKE_APPLICATION);
            super.queueEvent(e);
        public MethodBinding getAction()
            return null;
        public void setAction(MethodBinding methodBinding)
        public boolean isImmediate()
            return false;
        public void setImmediate(boolean _boolean)
        public void addActionListener(ActionListener actionListener)
            addFacesListener(actionListener);
        public ActionListener[] getActionListeners()
            return (ActionListener[]) getFacesListeners(ActionListener.class);
        public void removeActionListener(ActionListener actionListener)
            removeFacesListener(actionListener);
    SpecialBtnTag.java
    package jsfcustomcomponent;
    import javax.faces.component.*;
    import javax.faces.el.*;
    import javax.faces.webapp.*;
    import com.sun.faces.util.*;
    import javax.faces.context.FacesContext;
    import javax.faces.event.ActionEvent;
    public class SpecialBtnTag
        extends UIComponentTag
        public String value = null;
        public String specialBtnListener = null;
        private SpecialBtnComponent specialBtnComponent;
        public SpecialBtnTag()
            super();
        public String getComponentType()
            return SpecialBtnComponent.COMPONENT_TYPE;
        public String getRendererType()
            return SpecialBtnComponent.RENDERER_TYPE;
        protected void setProperties(UIComponent component)
            super.setProperties(component);
            if (! (component instanceof SpecialBtnComponent))
                throw new IllegalStateException("Component " + component.toString() +
                                                " not expected type.  Expected: jsfcustomcomponent.SpecialBtnComponent.  Perhaps you�re missing a tag?");
            specialBtnComponent = (SpecialBtnComponent) component;
            if (value != null)
                if (isValueReference(value))
                    ValueBinding vb = Util.getValueBinding(value);
                    specialBtnComponent.setValueBinding("value", vb);
                else
                    throw new IllegalStateException("The value for �value� must be a ValueBinding.");
            if (specialBtnListener != null)
                if (isValueReference(specialBtnListener))
                    MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding(specialBtnListener, new Class[]{ActionEvent.class});
                    ( (SpecialBtnComponent) component).setActionListener(mb);
                else
                    MethodBinding mb = Util.createConstantMethodBinding(specialBtnListener);
                    ( (SpecialBtnComponent) component).setActionListener(mb);
        public void release()
            super.release();
            value = null;
            specialBtnListener = null;
        public void setValue(String value)
            this.value = value;
        public String getValue()
            return this.value;
        public void setSpecialBtnListener(String specialBtnListener)
            this.specialBtnListener = specialBtnListener;
        public String getSpecialBtnListener()
            return this.specialBtnListener;
    SpecialBtnRenderer
    package jsfcustomcomponent;
    import java.util.*;
    import javax.faces.component.*;
    import javax.faces.context.*;
    import javax.faces.event.*;
    import javax.faces.render.*;
    import javax.faces.el.MethodBinding;
    import javax.faces.el.*;
    public class SpecialBtnRenderer
        extends Renderer
        String value;
        public SpecialBtnRenderer()
            super();
        public void decode(FacesContext context, UIComponent component)
            try
                Map requestMap = context.getExternalContext().getRequestParameterMap();
                String clientId = component.getClientId(context);
                SpecialBtnComponent specialBtnComponent = (SpecialBtnComponent) component;
                String value = (String) requestMap.get(clientId);
                if (null != value)
                    specialBtnComponent.setValue(value, context);
                    MethodBinding mb = specialBtnComponent.getActionListener();
                    if (mb != null)
                        System.out.println("SpecialBtnRenderer/decode...mb.getExpressionString()=" + mb.getExpressionString());
                        //mb.invoke(context, new Object[0]);
                        mb.invoke(context, new Object[1]);
                    ActionEvent actionEvent = new ActionEvent(specialBtnComponent);
                    specialBtnComponent.queueEvent(actionEvent);
            catch (EvaluationException ex)
                ex.printStackTrace();
        public void encodeEnd(FacesContext context, UIComponent component) throws java.io.IOException
            SpecialBtnComponent specialBtnComponent = (SpecialBtnComponent) component;
            ResponseWriter writer = context.getResponseWriter();
            String clientId = component.getClientId(context);
            value = (String) component.getAttributes().get("value");
            if (value == null)
                value = "defaultValue";
            buildSpecialBtn(writer, value, clientId, specialBtnComponent);
        private void buildSpecialBtn(ResponseWriter writer, String value, String clientId, SpecialBtnComponent component) throws java.io.IOException
            writer.startElement("table", component);
            writer.startElement("tbody", component);
            writer.startElement("tr", component);
            writer.startElement("td", component);
            value = String.valueOf(value);
            writer.startElement("input", component);
            writer.writeAttribute("type", "submit", null);
            writer.writeAttribute("name", clientId, "clientId");
            writer.writeAttribute("value", value, null);
            writer.endElement("input");
            writer.endElement("td");
            writer.endElement("tr");
            writer.endElement("tbody");
            writer.endElement("table");
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">
      <display-name>pagerWEB</display-name>
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.faces</url-pattern>
      </servlet-mapping>
      <jsp-config>
        <taglib>
          <taglib-uri>http://jsfcustomcomponent/</taglib-uri>
          <taglib-location>/WEB-INF/jsfcustomcomponent.tld</taglib-location>
        </taglib>
      </jsp-config>
    </web-app>

  • Constructor in object not invoked

    Hi,
    I'm loading an object collection via the following SQL and am fnding that the constructor for each instance of the object table is not invoked:
    declare
    tb_Msg_Batch tb_Msg := tb_Msg();
    begin
    select cast(multiset (
    select ddq.Entry_No
    ,10
    ,ddq.Entry_Data
    from Datadist_Queue_01 ddq
    where ddq.Entry_No = 1
    ) as tb_Msg
    into tb_Msg_Batch
    from dual;
    end;
    The following is the decleration used for the above objects:
    create or replace type ty_Msg as object
    (Entry_No number(10)
    ,Msg_Code number(5)
    ,Data_Msg blob
    ,constructor function ty_Msg return self as result)
    create or replace type body ty_Msg as
    constructor function ty_Msg (self in out nocopy ty_Msg) return self as result as
    begin
    self.Msg_Code := -999;
    return;
    end;
    end;
    create type tb_Msg as table of ty_Msg
    I thought a default constructor is always called, but when I view the data the MSG_CODE attribute has a value of 10 instead of -999, which is what it is assigned in the function.
    Could somebody please advise as to why the constructor function is not invoked for each instance of TY_MSG when populating a collection of that type?
    Thanks
    Peter

    public Void save_as()
    Void should be "void" not "Void"...

  • Servlet for firl downloading is not invoked, but file IS downloaded.Cache ?

    Hi,
    I used a servlet to enable users to download files from server. Sometime I noticed the servlet is not invoked at all, but files are downloaded. I guess it is a cache problem. How do I make sure the servlet is invokced everytime I click the button to download file, instead getting a cached file?
    Also, I used JEXCEL package to generate Excel files for users to download. The first time the Excel file is generated, all formatting info was kept. But later generation of the Excel lost all formatting info, I just got the "raw" Excel file. Of course the content of the file is correct, just without format I want.
    Thanks

    Hi,
    There are two ways to display the content of the CPA cache refresh.
    1. The Cache-Update Content-XML
    Document can be stored in the Adapter Framework database (J2EE schema) for further analysis. Here you have to set the property in the J2EE Visual Administrator tool.
    To do so, proceed as follows:
    =>J2EE-service SAP XI AF CPA Cache
    => set property trackCacheUpdateXML= true
    => You can now display the cache update XML with the alias  CPACache
    => View Cache Update History
    => View Cache Update XML
    2. The content of the cache refresh from the Integration Directory intothe CPA cache can be written to an XML file: Here you have to set the property inthe J2EE Visual Administrator tool:
    =>J2EE-service SAP XI AF CPA Cache
    => set property J2EE service SAP XI AF CPA Cache cacheUpdateDebugFile = true
    => the CPA cache refresh XML file will be in the server(0) directory search for the following file names:
    => value of the property cacheUpdateDebugFile.deltaif you intend to see the delta refresh accordingly and the value of the property cacheUpdateDebugFile.full if
    you intend to see the full cache refresh content
    Note: After your analysis, do not forget to reset the properties value to false.
    You can delete the XML cache-
    refresh table: alias CPACache
    => View Cache Update History
    => Delete History
    Also check out the user and its permission.
    regards
    Aashish Sinha
    PS : Reward points if Helpful

  • Could not invoke operation against the DB adapter due to BINDING. JCA-11812

    Hi,
    We are getting the following binding error BINDING. JCA-11812.
    Could not invoke operation against the DB adapter due to BINDING. JCA-11812 due to interaction processing error.
    Procedure(InputParameters,OutputParameters) ] Could not invoke operation against the 'Database Adapter' due to:
    BINDING.JCA-11812
    Interaction processing error.
    Error while processing the execution of the Procedure API interaction.
    An error occurred while processing the interaction for invoking the Procedure API. Cause: java.lang.NullPointerException
    Check to ensure that the XML containing parameter data matches the parameter definitions in the XSD. This exception is considered not retriable, likely due to a modelling mistake.
    Can anyone let me know what caused this error?
    Thanks,
    Chandu

    Hi:
    This message : Check to ensure that the XML containing parameter data matches the parameter definitions in the XSD. This exception is considered not retriable, likely due to a modelling mistake.
    seems that what u r sending to the DBAdapter, does not conform to the XSD that represent the message on that particular operation.
    Could u pls double check that?
    thx
    best

  • FileChooser is not invoking the file Please Help

    Hi,
    I have created a menuItem when user selects from the menuItem the file chooser come's up after that when he select any file from the JFile chooser dilalog box the r not invoked.Here is the code, please tell me where am i wrong. Please Help me out
    Thanking u
    in advance
    public void actionPerformed(ActionEvent e)
    Object source = evt.getSource();
    if(source == dialerItem)
    JFileChooser chooser = new JFileChooser();
    chooser.setCurrentDirectory(new File("."));
    chooser.setFileFilter(new Javax.swing.filechooser.FileFilter()
    public boolean accept(File f)
    String fname = f.getName().toLowerCase();
    return fname.endWith("html") || f.isDirectory();
    public string getDescription()
    return "Html Files";
    int r = chooser.showOpenDialog(this);
    if(r == JFileChooser.APPROVE_OPTION)
    chooser.getSelectedFile();

    Not "invoking" the file? What does that mean? What did you expect it to do?
    What it actually does, in the last line of your code, is to create a File object based on the selected file, then to discard it because you didn't assign it to a File variable.

  • ActionListener not invoked

    Hi all,
    I have a problem developping a custom component by aggregation and using action listener.
    In the restore state phase, the action listener I have previously add to a child button of my component is null and so not invoked.
    My custom component look like this :
    public class SnpsUIEditPanel extends UIPanel implements NamingContainer
    /** inner classes listeners */
    public class SnpsEditActionHandler implements ActionListener, StateHolder
         * Defines visible the updater footer panel and invisible the editer footer panel.
         * @see javax.faces.event.ActionListener#processAction(javax.faces.event.ActionEvent)
         public void processAction(ActionEvent pEvent) throws AbortProcessingException
         if( pEvent.getComponent() == getEditCommand())
              getEditCommand().setRendered(false);
              getUpdateCommand().setRendered(true);
              getResetCommand().setRendered(true);
         public Object saveState(FacesContext pContext)
         return null;
         public void restoreState(FacesContext pContext, Object pState)
         public boolean isTransient()
         return true;
         public void setTransient(boolean pNewTransientValue)
    public class SnpsUpdateActionHandler implements ActionListener, StateHolder
         * Defines visible the editor footer panel and invisible the updater footer panel.
         * @see javax.faces.event.ActionListener#processAction(javax.faces.event.ActionEvent)
         public void processAction(ActionEvent pEvent) throws AbortProcessingException
         if( pEvent.getComponent() == getUpdateCommand())
              getEditCommand().setRendered(true);
              getUpdateCommand().setRendered(false);
              getResetCommand().setRendered(false);
    /** called by the tag to define this property. It aggregates components for this custom component*/
    public void setEditable(boolean pEditable)
    Editable = new Boolean(pEditable);
    if( Editable.booleanValue())
    UIPanel footer = new UIPanel();
         footer.setRendererType("javax.faces.Group");
         footer.setId("footer");
         UICommand edit = new UICommand();
         edit.setId("edit");
         edit.setValue("Edit");
         edit.getAttributes().put("type", "submit");
    // register the action lsitener
         edit.addActionListener( new SnpsEditActionHandler());
         UICommand update = new UICommand();
         update.setId("update");
         update.setValue("Update Change");
         update.setRendered(false);
    // register the action listener
         update.addActionListener( new SnpsUpdateActionHandler());
         if( UpdateAction != null)
         update.setAction(UpdateAction);
         update.getAttributes().put("type", "submit");
         UICommand reset = new UICommand();
         reset.setId("reset");
         reset.setValue("Reset Change");
         reset.setImmediate(true);
         reset.setRendered(false);
         reset.getAttributes().put("type", "reset");
         footer.getChildren().add(edit);
         footer.getChildren().add(update);
         footer.getChildren().add(reset);
         getFacets().put("footer", footer);
    else
         getFacets().remove("footer");
    protected UICommand getEditCommand()
         return (UICommand)findComponent("edit");
    protected UICommand getUpdateCommand()
         return (UICommand)findComponent("update");
    protected UICommand getResetCommand()
         return (UICommand)findComponent("reset");
    What is going wrong ?
    Thanks a lot for your help

    Well, not a lot of response.... ; )
    So I will explain a bit more my requirement :
    I want to create a custom component extending the basic fonctionnality of UIPanel in this way :
    My custom panel could automatically add a header and a footer according to its property.
    Here is an example :
    Normally to do what I want to do I have to code :
    <h:panelGrid>
          <f:facet name="header">
               <h:panelGroup>
                    <h:outputText id="title" value="My Title"/>
               </h:panelGroup>
          </f:facet>
          .... possible content...
          <f:facet name="footer">
             <h:panelGroup>
                  <h:commandButton id="edit" value="Edit" actionListener="myActionListener" rendered="true"/>
                  <h:commandButton id="update" value="Update" action="myBusinessAction" actionListener="myActionListener" rendered="false"/>
                  <h:commandButton id="reset" value="Reset" rendered="false"/>
             </h:panelGroup>
         </facet>
    </h:panelGrid>myActionListener is an ActionListener that makes rendered the buttons following the performed button : if Edit is performed then it is not rendered and the other are rendered. If Update is performed this is Edit that is rendered.
    So, I want a custom component and/or tag to perform like this :
    <x:editPanel title="My Title" updateAction="myBusinessAction" editable="true" ....>
        ... Possible content....
    </x:editPanel>How to do that ? What is the best way ?
    I have created a custom component, shortly described above that creates its children components dynamically (composite pattern) and adds listener programmatically to the buttons that require one.
    The component itself works well event I don't khow if the implementation is correct (I don't like adding attribute/value pair (like "type" for button) for component that are not part of its own API. Because it give me the feeling that it is HTML attribute and not component specific. If I change the rendering for another device will my component work yet or these attributes will be ignored ?).
    But the ActionListeners are not invoked. It seems this is because there are inner classes. There are not restored correctly during the restor view phase. With standard classes it works well.
    So, is there a manner to defined inner class as listener for a cleaner implementation ?
    Is my implementation of the component correct ? Or I'm going in a wrong direction ?
    Thanks in advence.

Maybe you are looking for

  • Refresh ALV View when action triggered using button

    Hello Friends, I am getting few records for one year by calling function module from wdoinit method (sy-datum - 360) as default records. I want to also give selection screen if user wants to limit to "Last 30 Days" or "Last 60 Days". (this they can s

  • Creation of secondary index on RSPCPROCESSLOG table

    Hello guys, We have detected severe performance issues while executing the transaction ST03n in our BW 3.5 System. Looking in the OSS notes we found the note "SAP Note 841324 - ST03N: poor performance for process chain profile" where it recommends th

  • Forwarding pictures from Iphoto using Apple Mail

    Ok maybe it's me. But when I sue iPhoto to send pictures by email I select the photos I want in iPhoto, click the "send by email" button and it opens Apple mail. All that's cool. The problem is that it puts the pictures in the body of the email "whic

  • Infoset for cube in BW 3.5 version

    Hi,     While creating an infoset in BW 3.5 there is no option available for cubes, whereas it is available in BW 7.0 . Is it possible to create infoset for cube in BW 3.5 Regards, Krishna.

  • I cannot turn on my wi-fi, it's stuck in the off position.

    Also under wi-fi address it is N/A it was like this before updating to iOS 6. I updated, reset network settings, powered on and off, Hard reset and still nothing.