MYSTERY!.. action not invoked on encoded commandLink...  WHY?

Hi All !!!
QUESTION: How are the navigation definition (in faces-config.xml) is "wired" to a "HtmlCommandButton" I encode in my custom renderer... or any other encoded UICommand?...
This is a mystery to me at the moment. I have not been able to find any clear explanation as to how this works -- so I've not been able to debug the issue below.
The issue: I encode an HtmlCommandButton in my custom renderer, and add an "action" attribute bound to a backing bean method "doAction()"...
---But, the action method is never invoked!!!
Again, this is primarily due to the fact that I cannot tell what "wires" the navigation definitions (in faces-config.xml) to the "action" attribute in the command button and the "doAction()" method in the backing bean.
Please let me know what I am missing or omitting from this code to allow the "action" mechanism to work properly!! :-).
Below is the entire test application (custom component).... The idea is to have the user click on a div tag which popluates a hidden input tag and clicks a hidden HtmlCommandButton to submit the request. The application should navigate to the same page or another page based on the value of the clicked div tag.
***gorm.jsp***
<%@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://mycomponents" prefix="my"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<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:messages/>
                <f:verbatim><h1>Testing custom JSF component: XYZTag:  Click on a div tag...</h1></f:verbatim>
                <my:xyz id="xyz01" divdata="#{caveBean.divdata}" valueclicked="#{caveBean.valueclicked}" />
            </h:form>
        </f:view>
    </body>
</html>
***blidge.jsp***
<%@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://mycomponents" prefix="my"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<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:messages/>
                <f:verbatim><h1>show value of the div tag that was picked...</h1></f:verbatim>
                <h:outputText value="#{caveBean.valueclicked}" />
                <f:verbatim><br/></f:verbatim>
                <h:commandButton value="goback" type="submit" action="#{caveBean.doAction}"/>
            </h:form>
        </f:view>
    </body>
</html>
***CaveBean.java*** (backing bean)
package xyz;
import java.util.*;
public class CaveBean
    private List divdata;
    private String valueclicked;
    public CaveBean()
    public void setDivdata(List divdata)
        this.divdata = divdata;
    public List getDivdata()
        List list = new ArrayList();
        list.add("blidge");
        list.add("gorm");
        list.add("glargle");
        return list;
    public String getValueclicked()
        System.out.println("valueclicked was:" + this.valueclicked + "!");
        return this.valueclicked;
    public void setValueclicked(String valueclicked)
        this.valueclicked = valueclicked;
        System.out.println("valueclicked set to:" + this.valueclicked + "!");
    public String doAction()
        System.out.println("doAction() invoked!");
        if (valueclicked.equals("gorm"))
            return "gorm";
        else
            return "blidge";
***taglib (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.03</tlib-version>
  <jsp-version>1.2</jsp-version>
  <short-name>mycomponents</short-name>
  <uri>http://mycomponents</uri>
  <description>mycomponent tags</description>
  <tag>
    <name>xyz</name>
    <tag-class>mycomponents.XYZTag</tag-class>
    <attribute>
      <name>id</name>
      <description>this component's id</description>
    </attribute>
    <attribute>
      <name>rendered</name>
      <description>is this component rendered?</description>
    </attribute>
    <attribute>
      <name>divdata</name>
      <description>div label strings</description>
    </attribute>
    <attribute>
      <name>valueclicked</name>
      <description>value of leaf node that was clicked</description>
    </attribute>
  </tag>
</taglib>
***XYZTag***
package mycomponents;
import javax.faces.application.Application;
import javax.faces.component.UIComponent;
import javax.faces.webapp.UIComponentBodyTag;
import javax.faces.el.ValueBinding;
import javax.faces.context.FacesContext;
public class XYZTag extends UIComponentBodyTag
    private String divdata;
    private String valueclicked;
    public String getComponentType ()
        return "XYZComponent";
    public String getRendererType ()
        return "XYZRenderer";
    @Override
        protected void setProperties (UIComponent component)
        super.setProperties (component);
        if( divdata != null )
            if (isValueReference (divdata))
                FacesContext context = FacesContext.getCurrentInstance ();
                Application app = context.getApplication ();
                ValueBinding vb = app.createValueBinding (divdata);
                component.setValueBinding ("divdata", vb);
            else
                component.getAttributes ().put ("divdata", divdata);
        if( valueclicked != null )
            if (isValueReference (valueclicked))
                FacesContext context = FacesContext.getCurrentInstance ();
                Application app = context.getApplication ();
                ValueBinding vb = app.createValueBinding (valueclicked);
                component.setValueBinding ("valueclicked", vb);
            else
                component.getAttributes ().put ("valueclicked", valueclicked);
    //setting "#{}" stuff...
    public String getDivdata ()
        return this.divdata;
    public void setDivdata (String divdata)
        this.divdata = divdata;
    public String getValueclicked ()
        return this.valueclicked;
    public void setValueclicked (String valueclicked)
        this.valueclicked = valueclicked;
    public void release ()
        super.release ();
        divdata = null;
        valueclicked = null;
***XYZComponent***
package mycomponents;
import javax.faces.component.UIComponentBase;
import javax.faces.component.UICommand;
import javax.faces.context.FacesContext;
import java.util.List;
import javax.faces.el.ValueBinding;
public class XYZComponent extends UICommand
    private List divdata;
    private String valueclicked;
    public XYZComponent()
        setRendererType("XYZRenderer");
    public void setDivdata(List divdata)
        this.divdata = divdata;
    public List getDivdata()
        if(null != divdata)
            return divdata;
        ValueBinding _vb = getValueBinding("divdata");
        if(_vb != null)
            return (List)_vb.getValue(getFacesContext());
        else
            return null;
    // setting "#{}" stuff
    public void setValueclicked(String valueclicked, FacesContext facesContext)
        this.valueclicked = valueclicked;
        ValueBinding _vb = getValueBinding("valueclicked");
        _vb.setValue(facesContext,valueclicked);
    public String getValueclicked()
        if(null != valueclicked)
            return valueclicked;
        ValueBinding _vb = getValueBinding("valueclicked");
        if(_vb != null)
            return (String)_vb.getValue(getFacesContext());
        else
            return null;
    @Override
        public Object saveState(FacesContext context)
        Object values[] = new Object[2];
        values[0] = super.saveState(context);
        values[1] = divdata;
        values[2] = valueclicked;
        return ((Object) (values));
    @Override
        public void restoreState(FacesContext context, Object state)
        Object values[] = (Object[])state;
        super.restoreState(context, values[0]);
        divdata = (List) values[1];
        valueclicked   = (String)  values[2];
    @Override
        public String getFamily()
        return "XYZ";
***XYZRenderer***
package mycomponents;
import javax.faces.component.UIComponent;
import javax.faces.render.Renderer;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.application.Application;
import javax.faces.application.ApplicationFactory;
import javax.faces.FactoryFinder;
import javax.faces.component.UICommand;
import javax.faces.component.html.HtmlCommandButton;
import javax.faces.el.MethodBinding;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Iterator;
import org.w3c.dom.NodeList;
import org.w3c.dom.Node;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.xml.sax.SAXException;
import java.io.File;
import java.io.IOException;
import org.w3c.dom.Document;
public class XYZRenderer extends Renderer
    List divdata;
    String valueclicked;
    // is there a way to derive this, rather than hardcoding???
    String divaction = "#{" + "caveBean" + ".doAction}";
    public XYZRenderer()
    @Override
        public void decode(FacesContext context, UIComponent component)
        Map requestMap = context.getExternalContext().getRequestParameterMap();
        String clientId = component.getClientId(context);
        String value = (String) requestMap.get(clientId);
        XYZComponent xYZComponent = (XYZComponent)component;
        xYZComponent.setValueclicked((String)requestMap.get(clientId + ":valueclicked"),context);
    @Override
        public void encodeEnd(FacesContext context, UIComponent component) throws java.io.IOException
        XYZComponent xYZComponent = (XYZComponent)component;
        ResponseWriter writer = context.getResponseWriter();
        String clientId  = component.getClientId(context);
        Map test = component.getAttributes();
        divdata         = (List)   component.getAttributes().get("divdata");
        valueclicked    = (String) component.getAttributes().get("valueclicked");
        Map requestMap = context.getExternalContext().getRequestParameterMap();
        //build clickable div tags
        Iterator iterator = divdata.iterator();
        while (iterator.hasNext())
            String divlabel = String.valueOf(iterator.next());
            writer.startElement("div",component);
            writer.writeAttribute("onclick", "javascript: var thisform=this; while (thisform.nodeName != 'FORM') thisform = thisform.parentNode; var valueclicked=document.getElementById('"+ clientId +":valueclicked'); valueclicked.value='" + divlabel + "'; alert('you clicked the " + divlabel + " div tag'); document.getElementById('" + (clientId +"hiddenbutton").replaceAll(":","") +  "').click();", null);
            writer.writeText(String.valueOf(divlabel) ,null);
            writer.endElement("div");
        //build hidden input field that will be populated by the value of the clicked div tag
        writer.startElement("input", component);
        writer.writeAttribute("type", "hidden", null);
        writer.writeAttribute("id", clientId + ":valueclicked", null);
        writer.writeAttribute("name", clientId + ":valueclicked", null);
        writer.writeAttribute("value", "", null);
        writer.endElement("input");
        //build hidden button, whose dom "click" method will be invoked when div tags are clicked
        writer.startElement("div",component);
        encodeHiddenButton(context, clientId, divaction);
        writer.endElement("div");
    private HtmlCommandButton createHiddenButton(FacesContext context, String clientId, String divaction)
        Application application = context.getApplication();
        HtmlCommandButton hiddenButton = (HtmlCommandButton) context.getApplication().createComponent(HtmlCommandButton.COMPONENT_TYPE);
        ApplicationFactory factory = (ApplicationFactory)FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
        MethodBinding binding = factory.getApplication().createMethodBinding(divaction,null);
        hiddenButton.setId((clientId +"hiddenbutton").replaceAll(":",""));
        hiddenButton.setType("button");
        hiddenButton.setAction(binding);
        hiddenButton.setOnclick("javascript: alert('youve clicked the new HtmlCommandButton - invisible submit button!...'); var thisform=this; while (thisform.nodeName != 'FORM') thisform = thisform.parentNode;thisform.submit();");
        hiddenButton.setValue("hiddenbutton");
        return hiddenButton;
    private void encodeHiddenButton(FacesContext context, String clientId, String divaction)
    throws IOException
        HtmlCommandButton hiddenButton = createHiddenButton(context, clientId, divaction);
        hiddenButton.encodeBegin(context);
        hiddenButton.encodeChildren(context);
        hiddenButton.encodeEnd(context);
***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">
    <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>
    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>gorm.jsp</welcome-file>
    </welcome-file-list>
    <jsp-config>
        <taglib>
            <taglib-uri>/mycomponents</taglib-uri>
            <taglib-location>/WEB-INF/tlds/mycomponents.tld</taglib-location>
        </taglib>
    </jsp-config>
</web-app>
*** 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>
   <navigation-rule>
      <from-view-id>/gorm.jsp</from-view-id>
      <navigation-case>
         <from-outcome>gorm</from-outcome>
         <to-view-id>/gorm.jsp</to-view-id>
      </navigation-case>
      <navigation-case>
         <from-outcome>blidge</from-outcome>
         <to-view-id>/blidge.jsp</to-view-id>
      </navigation-case>
   </navigation-rule>
   <navigation-rule>
      <from-view-id>/blidge.jsp</from-view-id>
      <navigation-case>
         <from-outcome>submit</from-outcome>
         <to-view-id>/gorm.jsp</to-view-id>
      </navigation-case>
   </navigation-rule>
   <managed-bean>
      <managed-bean-name>caveBean</managed-bean-name>
      <managed-bean-class>xyz.CaveBean</managed-bean-class>
      <managed-bean-scope>request</managed-bean-scope>
   </managed-bean>
    <component>
        <component-type>XYZComponent</component-type>
        <component-class>mycomponents.XYZComponent</component-class>
    </component>
    <render-kit>
        <renderer>
            <component-family>XYZ</component-family>
            <renderer-type>XYZRenderer</renderer-type>
            <renderer-class>mycomponents.XYZRenderer</renderer-class>
        </renderer>
    </render-kit>
</faces-config>--thanks again for any help!!!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      

Hi,
I THINK this is what you are after. You firstly shoudl add a new attribute to your component which can take a value binding expression to your bean method, this function can take any format is likes in your backing bean as long as it is public. In you tag you will then need some code similar to this:
if(divaction != null){
         if(isValueReference(divaction )){
                //This line here is if your function takes a single Integer arguement,
               //you should replace it with whatever is correct for your function.
          Class[] defineParams = {Integer.class};
          MethodBinding mb = FacesContext.getCurrentInstance().getApplication().createMethodBinding(divaction , defineParams);
          ((YourComponent)component).setDivaction(mb);
         else{
          MethodBinding mb = Util.createConstantMethodBinding(divaction );
          ((RelationshipsComponent)component).setDivaction(mb);
     }And in your component you will need to add a MethodBinding variable with teh relevent getter/setter. One thing that I had a problem with here is that you must now implement the save/restore state functions or between phases the component will forget all about your methodbinding.
private MethodBinding divaction;
//getter/setter
//save/restore state
public Object saveState(FacesContext fc) {
     Object values[] = new Object[2];
     values[0] = super.saveState(fc);
     values[1] = saveAttachedState(fc, divation);
     return (values);
    public void restoreState(FacesContext fc, Object state) {
     Object values[] = (Object[]) state;
     super.restoreState(fc, values[0]);
     divaction= (MethodBinding) restoreAttachedState(fc,values[1]);
    } That saiid and done, you can move on to the renderer. I have not tried to adda button in the way in which you are, I have encoded markup directly using:
public static void encodeButton(ResponseWriter writer, String szName, String szValue, UIComponent component) throws IOException{
     writer.startElement("input", component);
     writer.writeAttribute("type", "submit", null);
     writer.writeAttribute("name", szName, null);
     writer.writeAttribute("value", szValue, "value");
     writer.endElement("input");
    }The name element is important as it is used in the decode phase, it is the value that is stored in the requestMap if the button has been pressed.
The decode method in your rendere is wher eyou will fire your method off, you must first check to see if your button was pressed by looking for its name in the requestMap:
Map requestMap = fc.getExternalContext().getRequestParameterMap();
if (requestMap.containsKey(yourButtonName)){
     //react to the button being pressed
}You should have a method bound to your control now through the code added to your tag (and obviously on the .jsp page), all you need to do is fire it which is accomplished using the following code:
MethodBinding mb = ((yourComponent)component).getDivaction();
          if(mb!= null){
                   //this stuff here with val is again related to your method arguements, if your method takes none, you can pass null. If you pass the wrong arguments you will get an exception telling you the function does not exist.
              Object val[] = new Object[1];
              Integer n = new Integer((int)rvo.getId());
              val[0] = n;
              mb.invoke(fc, val);
          }I know this is a different approach to that which you are using, and I daresay its not quite perfect, but it works for me!

Similar Messages

  • Why h:commandlink action not get fired after upgrading to JSF-1.2_12?

    Hi,
    One strange behavior that I'm facing right now after upgrading to JSF version1.2_12, is that the action method for hidden commandlink which should get fired on changing the value of a comboBox are not getting fired. Note that I was initially using the JSF1.2_07 version and it worked fine.
    Any help would be much appreciated.
    Here is a sample code of what I have in my app.
    <h:panelGroup>
                   <h:selectOneMenu id="nav-menu" value="#{customBean.rowName}"
                   onchange="submitOnMenuChange(this.form,'id-link', 'nav-menu');">
                   <f:selectItem itemLabel="Select:" itemValue="" />
                   <f:selectItem itemLabel="rowName1" itemValue="rowName1"/>
                   <f:selectItem itemLabel="rowName2" itemValue="rowName2"/>
                   </h:selectOneMenu>
                   <h:commandLink id="id-link" value=" " action="#{customBean.updateAction}" style="display: none;"/>
    </h:panelGroup>
    Inside submitOnMenuChange() I'm using below technique to submit the form
    var idclValue = formId + JSF_ID_SEPARATOR + elementId;
    jsfcljs(document.forms[formId],idclValue+','+idclValue,'');
    So, ideally on changing the value from above comboBox it should invoke the updateAction method, bit it doesn't.
    Thanks,
    Umesh
    Edited by: Umesh_S on Oct 7, 2009 4:47 AM

    Here is a small simple example which could help replicate the problem
    There are mainly three files: 1. displayPage.jsp 2. CustomBean.java 3. faces-Config.xml
    1. displayPage.jsp (content)
    <%@ page session="true" contentType="text/html;charset=utf-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <f:view>
    <html>
    <head>
    <script language="javascript">
    function submitLinkAction(formId, elementId) {
         if (document.forms[formId] != null) {
              var idclValue = formId + ":" + elementId;
    jsfcljs(document.forms[formId],idclValue+','+idclValue,'');
         } else {
              throw "Form with id [" + formId + "] is null.";
         return false;
    function submitOnMenuChange(thisForm, linkId, menuId) {
         var fullMenuId = thisForm.id + ":" + menuId;
         var menu = document.forms[thisForm.id][fullMenuId];
         var selectedValue = menu.options[menu.selectedIndex].value;
         if (selectedValue.length > 0) {
              try {
                   return submitLinkAction(thisForm.id, linkId);
              } catch (errorMsg) {
                   alert("Error occurred: " + errorMsg);
         return false;
    </script>
    </head>
    <body>
    <h:form id="edit-form">
                             <h:panelGroup>
                                  <%-- show select drop-down--%>
                                       <h:selectOneMenu id="nav-menu" value="#{customBean.rowName}"
                                            enabledClass="grid"
                                            onchange="submitOnMenuChange(this.form,'nav-link', 'nav-menu');">
                                            <f:selectItem itemLabel="Select:" itemValue="" />
                                            <f:selectItem itemLabel="Row1" itemValue="Row1"/>
                                            <f:selectItem itemLabel="Row2" itemValue="Row2"/>
                                       </h:selectOneMenu>
                                       <h:commandLink id="nav-link" value=" " action="#{customBean.updateAction}" style="display: none;"/>
                             </h:panelGroup>
    </h:form>
    </body>
    </html>
    </f:view>
    2. CustomBean.java
    public class CustomBean {
    private String rowName;
         public CustomBean() {
         public String getRowName() {
              return this.rowName;
         public void setRowName(String value) {
              System.out.println("** Inside set row name**");
              this.rowName = value;
         public void updateAction() {
              System.out.println("************This is action method for hidden command link************* ");
    3. faces-config.xml (content)
    <!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 xmlns="http://java.sun.com/JSF/Configuration">
         <managed-bean>
         <managed-bean-name>customBean</managed-bean-name>
         <managed-bean-class>com.examples.CustomBean</managed-bean-class>
         <managed-bean-scope>request</managed-bean-scope>
         </managed-bean>
    </faces-config>
    So, if we run above example on JSF 1.2_07, on changing the value of nav-menu, it should submit the form and the action method (updateAction()) defined for commandlink "nav-link" should get fired (one could see the System.out coming on the console) but the moment the JSF jars are upgraded to 1.2_12 the action method no more gets invoked.
    Thanks,
    Umesh

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

  • Af:commandLink actionListener is not invoking

    Hi,
    I have af:commandLink in a af:table.my af:commandLink rendered on condition but when I click on af:commandLink its not invoking actionListener.
    <af:column sortProperty="vsku_size_4" sortable="false" width="150" headerText="#{vskuSummaryHeaderBN.vsku_grid_col_4_hdr}" id="c60" rendered="#{vskuSummaryHeaderBN.vsku_grid_col_4}">
    <af:outputText value="#{row.vsku_size_4}" id="ot10" rendered="#{row.bindings.vsku_size_1.attributeValue != 'Forcast Vs Stock Level Graph'}"/>
    <af:commandLink text="#{row.vsku_size_4}" id="cl4" rendered="#{row.bindings.vsku_size_1.attributeValue == 'Forcast Vs Stock Level Graph'}" actionListener="#{supplierworkbenchBN.forcastVsStockVSKUSummary}" partialSubmit="true" immediate="true" />
    </af:column>
    any help why its not invoking my jdev Version is 11.1.1.5.
    Thanks

    This Problem is Resolved
    I am using
    <af:clientListener method="commandButtonClicked" type="click"/>
    <af:serverListener type="commandButtonClickedEvent"
    method="#{javaBN.VSKUSummary}"/>
    and its working fine Thanks Guys

  • CommandLink not invoking every time in table

    Hi All,
    I have a Command Link inside one of the af:columns of the table. I just dragged and dropped the column from component pallet to the table for the link. I have set the ActionListener and Action to the managed bean but, when i try to click the link, its not invoking the action and action listener every time. Don't know whats wrong ?
    code:
    <af:column id="c10" headerText="Link">
    <af:commandLink text="Details" id="cl4"
    action="#{someScope.myBean.myAction}"
    actionListener="#{someScope.myBean.myListener}">
    <f:attribute name="name" value="#{row.someThing}"/>
    </af:column>
    I tried these:
    1. Tried with PartialSubmit:true
    2. tried with ChangeEventPolicy for iterator as PPR and also default
    3. Command Link outside table always invokes the methods
    Additional Info:
    1. I have my bean registered in the TF
    2. Iterator is based on read only VO
    Please help me with this.

    Hi Ramandeep,
    I have these inside my code:
    System.out.println ("In Action Listner");
    System.out.println ("In Link Action ");
    It prints the above lines only on the second time i click, 1st time it does not invoke the methods

  • Why Component do not invoke KeyListener,when it is a CellEditor in JTable?

    when I edit at a cell ,the JTextField do not invoke keylilsten,why?
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.text.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.util.EventObject;
    public class Test extends JFrame {
         public JTable table;
         public JScrollPane scrollpane;
         public Test() {
              JTextField editor;          
              this.table = new JTable(5,5);
              this.scrollpane=new JScrollPane(table);
              for (int i=0;i<5;i++) {
                   editor=new JTextField();
                   editor.setBackground(Color.blue);
                   editor.setForeground(Color.white);
                   editor.addKeyListener(new kl());  //addkeylistener
                   this.table.getColumnModel().getColumn(i).setCellEditor(new DefaultCellEditor(editor));
              this.getContentPane().add(this.scrollpane);
              this.scrollpane.setVisible(true);
              this.setSize(300,300);
              this.setVisible(true);
           public static void main(String args[]){
                Test test=new Test();
    //KeyListener
    class kl implements KeyListener {
         public void keyReleased(KeyEvent e) {
              System.out.println("keyReleased...");
         public void keyPressed(KeyEvent e) {
              System.out.println("keyPressed...");
         public void keyTyped(KeyEvent e){
              System.out.println("keytype...");          
    }

    I changed your code a bit to show you what you were doing wrong, you need to implement KeyListener:
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.*;
    import javax.swing.text.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.util.EventObject;
    public class Test extends JFrame implements KeyListener {
    public JTable table;
    public JScrollPane scrollpane;
    public Test() {
    JTextField editor;
    this.table = new JTable(5,5);
    this.scrollpane=new JScrollPane(table);
    for (int i=0;i<5;i++) {
    editor=new JTextField();
    editor.setBackground(Color.blue);
    editor.setForeground(Color.white);
    editor.addKeyListener( this ); //addkeylistener
    this.table.getColumnModel().getColumn(i).setCellEditor(new DefaultCellEditor(editor));
    this.getContentPane().add(this.scrollpane);
    this.scrollpane.setVisible(true);
    this.setSize(300,300);
    this.setVisible(true);
    public static void main(String args[]){
    Test test=new Test();
    public void keyReleased(KeyEvent e) {
    System.out.println("keyReleased...");
    public void keyPressed(KeyEvent e) {
    System.out.println("keyPressed...");
    public void keyTyped(KeyEvent e){
    System.out.println("keytype...");

  • Why the Parameter Dialog not invoked with OpenReport RDC SDK?

    Hai,
      I am working in Crystal Reports XI Release 2 with Visual studio .Net 2003 (VC++).I am using RDC SDK
    OpenReport  function to create report.The report is generating without any fail.But the parameter dialog not invoked though the report is designed with parameter .
    Here is the code snippet i used to generate
    OnInitDialog()
        CoInitialize(NULL);
        IApplicationPtr  m_Application;
        IReportPtr   m_Report;
        HRESULT hr = m_Application.CreateInstance("CrystalRuntime.Application");
        m_Report = m_Application->OpenReport("Sample.rpt");
        m_Viewer.SetReportSource(m_Report);
        m_Viewer.ViewReport();
    It creates report in ActiveX viewer but the parameter dialog not invoked before showing in viewer.
    But in my another project i have used Crystal report 8 and CRPE32 dll(8 version) API PEStartPrintJob
    It invokes parameter dialog automatically before showing report in Viewer.
    Thankyou,
    SatheeshKumar
    Edited by: SatheeshDharmaraj on Mar 18, 2009 12:29 PM

    Please note:
    The RDC is specifically designed around the COM technologies and is intended for use Visual Basic 6 developers; therefore, it is not recommended, nor tested, for use in a .NET application. This limits the support offering for the RDC in a .NET application; however, because COM is a supported technology in .NET the RDC is known to function as expected in a .NET application.
    To support any issue encountered with the RDC in a .NET application, these issues need to be reproducible in a supported COM-based development tool (such as VB6).
    Also, the RDC is a retired technology, no longer shipping in the current version of CR - CR 12.x:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/80bd35e5-c71d-2b10-4593-d09907d95289
    this may have implications to your applications lifecycle as CR XI r2 will be out of support June 10 of this year. See the following for more details:
    Business Objects Product Lifecycles [original link is broken]
    I'd recommend you forget about RDC in .NET and use the CR Assemblies for .NET.
    Nevertheless, if you absolutely must stay with the RDC in .NET, the error suggests that you are either not using any database logon code, or the code is incorrect. To connect the report to a database, you must use the connection properties bag. More information on the connection properties bag is [here|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00635998-751e-2b10-9cba-f50ee1e4ef81]
    C++ code could look something like this:
    bstrt bstrReportPath("C:
    Documents and Settings
    Mujeeb
    Desktop
    VC++
    RDC_VCPP_CR10
    Report1.rpt";);
    m_Application.CreateInstance("CrystalRuntime.Application.10";);
    m_Report = m_Application-->OpenReport(bstrReportPath, vtTempCopy);
    m_Report-->DiscardSavedData();
    m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->DeleteAll();
    m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->Add("Provider","SQLOLEDB.1";);
    m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->Add("Data Source","10.10.17.30";);
    m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->Add("User ID","sa");
    m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->Add("Password","excellence");
    m_Report>Database>Tables>GetItem(1)>ConnectionProperties-->Add("Database","Northwind");
    m_Report>Database>Verify();
    m_Viewer.SetReportSource(m_Report);
    m_Viewer.ViewReport();
    Now, you do not have to use the deleteAll property and simply log on to the database. Unfortunately only code I have handy for that is as described in the above doc. The code woudl be something like this in VB:
    (ODBC)
    report.database.tables(1).connectionProperties("DSN") = "the DSN"
    report.database.tables(1).connectionProperties("user ID") = "the user ID"
    report.database.tables(1).connectionProperties("database" = "the database name"
    report.database.tables(1).connectionProperties("password") = "the password"
    (if using OLE DB)
    report.database.tables(1).connectionProperties("data source") = "the server name"
    report.database.tables(1).connectionProperties("user ID") = "the user ID"
    report.database.tables(1).connectionProperties("initial catalog") = "the database name"
    report.database.tables(1).connectionProperties("password") = "the password"
    (if using native connection)
    report.database.tables(1).connectionProperties("server:) = "the server name"
    report.database.tables(1).connectionProperties("user ID") = "the user ID"
    report.database.tables(1).connectionProperties("password") = "the password"
    I also recommend searching our notes database for more resources:
    https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true
    The downloads section may also contain C++ sample code, but I am not sure if there will be anything that uses the connection properties bag. E.g.; do not use deprecated methods such as
    .LogOnserver, .SetNthTableLogOnInfo, etc.
    Ludek

  • 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

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

  • I created an Apple ID using my ISP Email when I registered at the Store/Apple Support Communities/iTunes/Face Time and it does not work in iChat. Why Not ?

    Question:-
    I created an Apple ID using my ISP Email when I registered at the Store/Apple Support Communities/iTunes/Face Time or other portal and it does not work in iChat. Why Not ?
    Answer:-
    For a Name to work in iChat it has to be an Valid AIM screen Name.
    Only Apple IDs from the @mac.com ending names registered here  and the Mobileme (@Me.com ending) names are Valid with the AIM service as well as being Apple IDs
    (I am still working on info about registering with iCloud at the moment but if this does give you an @Me.com email it may well be a valid AIM name as well)
    NOTES:-
    The @mac.com page works by linking an external (Non Apple) email with a @mac.com name.
    This External Email cannot be one linked to an Existing Apple ID (you have to use a second email or register at AIM )
    The options at AIM are to use your existing email or create new name and link the existing only for Password recovery
    MobileMe (@me.com ending names) were valid Emails addresses, Apple IDs AND a Valid AIM Screen Name
    @mac.com names look like emails but are only Apple IDs and iChat/AIM Valid Screen Names.
    The AIM registration page seems to be pushing you to register [email protected] This is relatively new and I have not followed through the pages to find out if it a valid AIM email (Previously you could register a name without an @whatever.com suffix)
    8:16 PM      Friday; June 10, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

    Question:-
    So I have my current [email protected] email in iChat as I thought as I had linked that to an Apple ID it was a Valid iChat Name.  It keeps coming up with a UserName or Password Invalid message.  What do I do next ?
    Answer:-
    Open iChat
    Go to the Menu under the iChat name in the Menu Bar and then Preferences and then Accounts in the new window.
    Commonly written as iChat > Preferences > Accounts as directions/actions to take.
    If it displays with a Yellow running name in the list you have a choice.
    Either register it at AIM (I would use a different password to the ISP Login) and then change the password only in iChat  (It may take you to confirm any Confirmation email from AIM first) in iChat > Preferences > Accounts
    Or you register a new Name at AIM (Or at @mac.com) and enter that (details below)
    If you have a Blue Globe name  (@mac.com) that will not Login the chances are that it the password that is the issue.
    Apple lets you create longer passwords than can be used with the AIM Servers.
    Change the Password at iForgot to no more than 16 characters.
    Then change the password in iChat as details above.
    Adding a new Account/Screen Name in iChat (that is valid with the AIM servers)
    Open iChat if not launched.
    Go to iChat Menu > Preferences > Accounts
    Click the Add ( + )  Button at the bottom of the list.
    Choose in the top item drop down either @Mac.com or AIM depending on what you registered
    Add the name (with @mac.com the software will add the @mac.com bit)
    Add in the password.  (If you don't add it now iChat will ask you each time you open it)
    Click Done.
    The Buddy List should open (New Window)
    The Accounts part of the Preferences should now have the new name and you should be looking at the details.
    You can add something in the Description line which will then title the Buddy List (Useful when you have two or more names) and make it show up as that in the iChat Menu > Accounts and the Window Menu of iChat when logged in.
    You can then highlight any other Account/Screen Name you don't want to use and use the Minus ( - ) Button to delete it.
    8:39 PM      Friday; June 10, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.7)
     Mac OS X (10.6.7),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • HT1583 it burned in idvd and all seemed ok but when it finished saying the project was finished when I played it on the tv it had not burnt the whold project why would this be thanks

    I was burning a slideshow from iphoto and went to idvd and it burned ok and finished and said it was ok, but when I played it in the tv it did not play the whole project
    why would this be. cheers vic

    Hi
    Strange - But needs lot's of more info to make it possibly to suggest any reason. Me no mind reader at all.
    • What Video Codec was used
    • What Video editor
    • How did You get material into iDVD
    • What did You select in iDVD
    frame rate
    video format
    encoding quality
    burn speed (set down ?)
    • Brand of DVD used
    • Type of DVD used
    And all vital info You can think relevant.
    Yours Bengt W

  • "Orphan Timeline" & "End Action Not Set." What does this mean????

    I am setting up a Blu-Ray DVD in Encore. I have a project on a Premiere Pro CS 5.5 Timeline, which is 2 and a half hours long with 24 Encore chapters in it. I have not yet Encoded it in Media Encoder as of yet.
    I am setting up all my menus and buttons in Encore so all I have to do is link the buttons to them main project when I do encode it and then I can just Check it and Burn it.
    I did check my project just now though and all buttons came up with 2 Errors:
    1) Orphan Timeline
    2) End action not set.
    1) "Orphan Timeline", I assume that means that the button is not linked to any timeline as of yet, correct? (This would be true because there is no main project timeline in there yet.)
    2) "End action not set." What does this mean? Will this go away once I add my whole project into Encore and I link up all of the buttons to the timeline?
    Thanks in advance
    Premiere Pro CS 5.5
    Encore 5.5
    Media Encoder 5

    1) Orphan Timeline
    2) End action not set.
    Both of these suggest that you created a timeline in the Encore project, perhaps with no "asset" in it.
    Yes, ignore both messages for now. But I prefer creating the timeline after, or along with, importing the asset into the Encore project.
    If you believe you have not created a timeline, post a screenshot of your "flowchart."

  • Action not possible because change version exist

    Dear All,
    We are at SRM5.0- Extended Classic scenario and facing issues for changing some of the PO documents.
    When the buyers are trying to change the PO, error is getting populated as 'Action not possible because change version exist'. This error is not allowing us to change the PO.
    These POs are changed in the past and all the relevant changes are reflected to backend system with no issues. In other words Change Versions do exists for these POs. Flags for Change Version completion is also set and all historical versions can be seen but without change history.
    Additional information -
    1. No approval workflows are implemented for PO.
    2. No locks are active for these documents.
    Appreciate your help!
    Regards,
    Sagar

    Hi Sagar and thanks for your response,
    well, actually the active change version won't be preserved in any case. It would be overwritten in the first scenario, and deleted in the second one. The reason why I'd like to have this "brute force" method is to face an eventual human error. Suppose that a disalignment between R3 and SRM has been created; my report basically "alligns" the SRM version to the corresponding R3 one. And suppose also that the user made a mistake so that the program must be used a second time. I'd like to provide a way to "UNDO" the first execution of the program, that is to say: i'd like to provide a way to OVERWRITE the actual active, change version, or alternatively delete the change version that the report did create the first time it has been launched.
    Hope it's a bit clearer now
    Thanks for any hint/suggestion you can give me
    EDIT: Oh, and please... can you provide me further information about your solution? I mean, use of that FM to unlock an active version of the PO and then the proper call to BBP_PD_PO_UPDATE specifying how you managed input params. Thanks a lot
    Edited by: Matteo Montalto on Apr 9, 2009 11:43 AM

  • Publish action not working with JCA based Business Service

    Hi All,
    I have created one BS in OSB that publish the message in AQ. Its working fine as expected when tested from test console.
    I have made one proxy service which after transformation will publish the message to this BS, but the publish action is not invoking.
    I have added log action inside request action of my publish action and log is getting generated for that with correct request.However, I cant see message in DB neither can i see any exception/error logs in OSB.
    I tried replacing publish with route action and its working fine , message is getting published in AQ.Did any one face this type of issue before ???
    Or publish action works only with jms based Business services.
    Appreciate your help.
    Regards,
    Karan

    Bingo !!!
    Setting QOS helped me to find out the exact error. Was passing complete soap envelope to BS instead of passing body part only.
    Thanks a lot for your help mate .
    One more query can you please enlighten me on the use of QOS in OSB, such as in what scenarios we should use QOS.
    Regards,
    Karan
    Edited by: Karan Mann on Mar 14, 2013 3:37 AM

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

Maybe you are looking for