What's wrong in my customer component

Hi all,
I'm newer to JSF, and I am writing a component which extends UICommand,
The component is same to commandButton exclude that it preventing from duplicately submit .
When I complete it, I found that it doesn't fire the action. I found that the when the page is submitted by pressing h:commandButton, In the renderer class's docode method,I can get the button's clientID which is pressed.But when I click
the customer button, there is no my customer button's clientID in the requestParameterMap. Can any body tell me what's wrong .
here is my renderer's decode method:
public void decode(FacesContext context, UIComponent comp) {
        logger.debug("decode begin");
        Map map = context.getExternalContext().getRequestParameterMap();
        for(Iterator ite =map.keySet().iterator();ite.hasNext();){
            logger.debug(ite.next());
        if(map.containsKey(comp.getClientId(context))){
            logger.debug("queue event");
            comp.queueEvent(new ActionEvent(comp));
        } else {
            logger.debug("submitted by other component");
}

I got it, thanks . I miss the name property.

Similar Messages

  • What is wrong with your customer service?!?! It's becoming impossible to get a price adjustment!!!

    I have been trying everything to get a price adjustment on an iPad mini 3 64 gig that I purchased for 499.99 and is now 424.99. I have made 3 phone calls to no success and have spent a total of over an hour on hold to try to get this done. I need someone here from Best Buy unboxed to take care of this.
    Solved!
    Go to Solution.

    Hi Aldiggi,
    The purchase of a brand-new tablet is by no means a small investment, so wanting to receive the best deal available is certainly understandable.
    I've had the chance to review your account and it looks like a member of our post-purchase support team was able to assist you on the 4th, shortly after you posted an update. You should have received a message confirming the price adjustment, so I'd encourage you to check your inbox and junk mail folders for that e-mail if you haven't already done so. Please also keep in mind that the funds may not post to your card right away -- the exact timeframe required is determined by the card issuer.
    Thanks for your patience, as well as for ordering with us! I hope you're enjoying the new iPad Mini so far.
    Aaron|Social Media Specialist | Best Buy® Corporate
     Private Message

  • Custom Component in CREF

    Hi everybody!
    I am trying to deploy an applet which contains a Custom Component using CREF as simulator. That means I run CREF to be waiting for incoming APDUs. By means of apdutool I run the script which contains the APDUs for the deployment of the applet. The whole CAP file is deployed properly until the custom component is tried to be deployed. Then I receive the status word 0x6424.
    That means, according to the specification:
    Exception occurred.
    * Cause: General purpose error in the installer or applet code.
    * Solution: Check your applet code for errors.
    The applet works properly without the custom component, so the problem is not in the applet code.
    The line of the script which fails is the following (where 10 is the tag chosen for the custom component): 0x80 0xB2 0x10 0x00 0x00 0x7F;
    It is the one used to prepare the Installer to receive the component whose tag is 0x10, that is what 0xB2 means.
    The response is: CLA: 80, INS: b2, P1: 10, P2: 00, Lc: 00, Le: 00, SW1: 64, SW2: 24
    The following APDUs, after that one, return 0x6421 that means the Installer is in an error state.
    So, I was wondering if someone had the same problem. Or if someone knows if CREF does not accept custom components.
    Thanks in advance, I don't reach to find where the error is. May be I am missing something...
    Best regards,
    E_L

    I would be surprised if CREF supports custom components. It would know how to use them so it would not make any sense. What is it that your custom component does?
    Cheers,
    Shane

  • 1st jsf custom component.. getting nullpointer Ex, what's wrong?

    hi guys
    I'm following this ex to create a custom component
    http://today.java.net/pub/a/today/2004/07/16/jsfcustom.html
    but I'm having problems like
    java.lang.NullPointerException
         at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929)
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
         at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:70)
         at org.apache.jsp.Simple_jsp._jspx_meth_f_view_0(org.apache.jsp.Simple_jsp:114)
         at org.apache.jsp.Simple_jsp._jspService(org.apache.jsp.Simple_jsp:89)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:477)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:371)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
         at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
         at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
         at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
         at org.mortbay.jetty.Server.handle(Server.java:313)
         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
         at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)do you know what's the problem
    thanks ;)

    hi guys
    I'm following this ex to create a custom component
    http://today.java.net/pub/a/today/2004/07/16/jsfcustom.html
    but I'm having problems like
    java.lang.NullPointerException
         at javax.faces.webapp.UIComponentTag.setupResponseWriter(UIComponentTag.java:929)
         at javax.faces.webapp.UIComponentTag.doStartTag(UIComponentTag.java:310)
         at org.apache.myfaces.taglib.core.ViewTag.doStartTag(ViewTag.java:70)
         at org.apache.jsp.Simple_jsp._jspx_meth_f_view_0(org.apache.jsp.Simple_jsp:114)
         at org.apache.jsp.Simple_jsp._jspService(org.apache.jsp.Simple_jsp:89)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:477)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:371)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
         at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362)
         at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
         at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
         at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
         at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
         at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
         at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
         at org.mortbay.jetty.Server.handle(Server.java:313)
         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
         at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
         at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)do you know what's the problem
    thanks ;)

  • What's wrong with my component?

    i make a new component which is a dragable icon here is my piece of code
    //class: DragAbleComponent.the father of my component
    import java.awt.Graphics;
    import java.awt.event.FocusEvent;
    import java.awt.event.FocusListener;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseListener;
    import java.awt.event.MouseMotionListener;
    import javax.accessibility.Accessible;
    import javax.swing.JComponent;
    public abstract class DragAbleComponent extends JComponent implements MouseListener,
              FocusListener, Accessible ,MouseMotionListener{
         private int X;
         private int Y;
         private static final long serialVersionUID = 1L;
         public void mouseClicked(MouseEvent e) {
              this.requestFocusInWindow();
         public void mouseEntered(MouseEvent e) {}
         public void mouseExited(MouseEvent e) {}
         public void mousePressed(MouseEvent e) {}
         public void mouseReleased(MouseEvent e) {}
         public void focusGained(FocusEvent e) {
              this.repaint();}
         public void focusLost(FocusEvent e) {
         this.repaint();}
         protected abstract void paintComponent(Graphics graphics);
         public int getX() {
              return X;
         public void setX(int x) {
              X = x;
         public int getY() {
              return Y;
         public void setY(int y) {
              Y = y;
    //class:DragableIcon the component
    import java.awt.Color;
    import java.awt.Graphics;
    import java.awt.Image;
    import java.awt.event.InputEvent;
    import java.awt.event.MouseEvent;
    import javax.swing.Action;
    import javax.swing.ActionMap;
    import javax.swing.InputMap;
    import javax.swing.JComponent;
    import javax.swing.KeyStroke;
    import javax.swing.TransferHandler;
    public class DragableIcon extends DragAbleComponent {
         private Image image;
         private MouseEvent firstMouseEvent = null;
         private static boolean installKeyBordMapings = true;
         private static final long serialVersionUID = 1L;
         public DragableIcon(Image image) {
              super();
              this.image = image;
              this.setFocusable(true);
              this.addMouseListener(this);
              this.addFocusListener(this);
              this.addMouseMotionListener(this);
              this.initKeyBordMaping();
         private void initKeyBordMaping(){
              if (installKeyBordMapings) {
         InputMap imap = this.getInputMap();
    //     imap.put(KeyStroke.getKeyStroke("ctrl X"),
    //     TransferHandler.getCutAction().getValue(Action.NAME));
         imap.put(KeyStroke.getKeyStroke("ctrl C"),
         TransferHandler.getCopyAction().getValue(Action.NAME));
         imap.put(KeyStroke.getKeyStroke("ctrl V"),
         TransferHandler.getPasteAction().getValue(Action.NAME));
              ActionMap map = this.getActionMap();
    //     map.put(TransferHandler.getCutAction().getValue(Action.NAME),
    //     TransferHandler.getCutAction());
         map.put(TransferHandler.getCopyAction().getValue(Action.NAME),
         TransferHandler.getCopyAction());
         map.put(TransferHandler.getPasteAction().getValue(Action.NAME),
         TransferHandler.getPasteAction());
         @Override
         protected void paintComponent(Graphics graphics) {
              Graphics g = graphics.create();
         //Draw in our entire space, even if isOpaque is false.
         g.setColor(Color.WHITE);
         g.fillRect(0, 0, image == null ? 125 : image.getWidth(this),
         image == null ? 125 : image.getHeight(this));
         if (image != null) {
         //Draw image at its natural size of 125x125.
         g.drawImage(image, 0, 0, this);
         //Add a border, red if picture currently has focus
         if (isFocusOwner()) {
         g.setColor(Color.RED);
         } else {
         g.setColor(Color.BLACK);
         g.drawRect(0, 0, image == null ? 125 : image.getWidth(this),
         image == null ? 125 : image.getHeight(this));
         // g.drawImage(image, 0, 0, this);
         g.dispose();
         public void mouseDragged(MouseEvent e) {
    //Don't bother to drag if the component displays no image.
    if (image == null) return;
    if (firstMouseEvent != null) {
    e.consume();
    //If they are holding down the control key, COPY rather than MOVE
    int ctrlMask = InputEvent.CTRL_DOWN_MASK;
    int action = ((e.getModifiersEx() & ctrlMask) == ctrlMask) ?
    TransferHandler.COPY : TransferHandler.MOVE;
    int dx = Math.abs(e.getX() - firstMouseEvent.getX());
    int dy = Math.abs(e.getY() - firstMouseEvent.getY());
    //Arbitrarily define a 5-pixel shift as the
    //official beginning of a drag.
    if (dx > 5 || dy > 5) {
    //This is a drag, not a click.
    JComponent c = (JComponent)e.getSource();
    TransferHandler handler = c.getTransferHandler();
    //Tell the transfer handler to initiate the drag.
    handler.exportAsDrag(c, firstMouseEvent, action);
    firstMouseEvent = null;
         public void mouseMoved(MouseEvent e) {}
         public void mousePressed(MouseEvent e) {
         //Don't bother to drag if there is no image.
         if (image == null) return;
         firstMouseEvent = e;
         e.consume();
         public void mouseReleased(MouseEvent e) {
         firstMouseEvent = null;
         public static boolean isInstallKeyBordMapings() {
              return installKeyBordMapings;
         public static void setInstallKeyBordMapings(boolean installKeyBordMapings) {
              DragableIcon.installKeyBordMapings = installKeyBordMapings;
         public Image getImage() {
              return image;
         public void setImage(Image image) {
              this.image = image;
    //and here is my pane
    import java.awt.BorderLayout;
    import java.awt.event.ItemEvent;
    import java.awt.event.ItemListener;
    import javax.swing.ImageIcon;
    import javax.swing.JPanel;
    import javax.swing.JToolBar;
    import cn.com.ynld.bms.applet.gui.handler.IconTransferHandler;
    import cn.com.ynld.bms.applet.service.TransfAble;
    import cn.com.ynld.bms.applet.service.UpdateAble;
    public class ElectronicPane extends JPanel
                                                                                    implements ItemListener,UpdateAble{
    private UpdateAble updateAble = null;
    private ScrollAbleImage image;
    private JToolBar toolBar;
    private IconTransferHandler handler;
         private static final long serialVersionUID = 1L;
         public ElectronicPane(){
              super(new BorderLayout());
              handler = new IconTransferHandler();
         this.creatToolBar();
         this.add(this.toolBar);
         this.setTransferHandler(handler);
         public void itemStateChanged(ItemEvent e) {}
         public void addTransferAble(String key, TransfAble transferAble) {
              // TODO
         public TransfAble getTransferAble(String key) {
              // TODO
              return null;
         public void removeTransferAble(String key) {
              this.updateAble.removeTransferAble(key);
         public void update(UpdateAble updateAble) {
              this.updateAble = updateAble;
              this.init();
         private void init(){
              this.image = new ScrollAbleImage();
              this.image.update(updateAble);
              this.add(image,BorderLayout.CENTER);
              this.repaint();
              //this.image.repaint();
         private void creatToolBar(){
              this.toolBar = new JToolBar();
              DragableIcon alarm = new DragableIcon(createImageIcon("/root/Desktop/drawing/png-0003.png", "alarm").getImage());
              alarm.setTransferHandler(handler);
              DragableIcon damage = new DragableIcon(createImageIcon("/root/Desktop/drawing/png-0007.png", "device").getImage());
              alarm.setTransferHandler(handler);
              this.toolBar.add(alarm);
              this.toolBar.addSeparator();
              this.toolBar.add(damage);
              this.toolBar.setFloatable(false);
         /** Returns an ImageIcon, or null if the path was invalid. */
    protected static ImageIcon createImageIcon(String path,
    String description) {
    // java.net.URL imageURL = DragPictureDemo.class.getResource(path);
    if (path == null) {
    System.err.println("Resource not found: "
    + path);
    return null;
    } else {
    return new ImageIcon(path, description);
    the problem is i add DragableIcons to my toolbar but only the first icon can be seen!!!!
    what's wrong
    thanks for any help!

    what's wrong
        private void creatToolBar() {
            this.toolBar = new JToolBar();
            ImageIcon alarm = createImageIcon(
                                  "/root/Desktop/drawing/png-0003.png",
                                  "alarm");
    //        alarm.setTransferHandler(handler);
            // register icon with its Action
            alarmAction.putValue(Action.SMALL_ICON, alarm);
            ImageIcon damage = createImageIcon(
                                   "/root/Desktop/drawing/png-0007.png",
                                   "device");
    //        damage.setTransferHandler(handler);
            // set the icon to the Action that will use it
            damageAction.putValue(Action.SMALL_ICON, damage);
            // toolBars are equipped to receive an Action or JComponent
            // they don't know what to do with ImageIcons
            this.toolBar.add(alarmAction);
            this.toolBar.addSeparator();
            this.toolBar.add(damageAction);
            this.toolBar.setFloatable(false);
        /** Returns an ImageIcon, or null if the path was invalid. */
        protected static ImageIcon createImageIcon(String path, String description) {
            // Use the containing class name. This works for static context in
            // which the "this" keyword does not work.
            // Otherwise, you could simply use getResource.
            java.net.URL imageURL = ElectronicPane.class.getResource(path);
            if (path == null) {
                System.err.println("Resource not found: " + path);
                return null;
            } else {
                return new ImageIcon(path, description);
        private Action alarmAction = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                Toolkit.getDefaultToolkit().beep();
        private Action damageAction = new AbstractAction() {
            public void actionPerformed(ActionEvent e) {
                System.out.println("damage action");
        };

  • I have a PC and now tried to install Adope InDesign 5 times. Every times I get the massage:File can not be extracted to a temporary folder. Contact customer support (EX11). What is wrong?

    File can not be extracted to a temporary folder. contact customer support (EX11). I have a PC. What is wrong?

    Creative Cloud Error Codes (WIP) | Mylenium's Error Code Database
    Mylenium

  • Custom component/tag class:  ---which setters/getters do what?

    Hi
    I'm trying to create a custom component, but, there is a major concept that I do not understand...
    ---What are the setters/getters in the "component" class used for?...
    ---What are the setters/getters in the "tag" class used for?
    Another way of asking is...
    ---Which setters/getters are used simply to keep track of attribute name/id/key?
    ---Which setters and getters refer to the actual objects that the attribute names point to?
    The reason for my confusion is that nearly all "custom component" examples I've seen thus far, utilize attributes that point to "String" objects... (i.e., as opposed to ArrayList, HashMap, etc)...
    This makes it difficult for me to distinguish whether the String values in the getters/setters are referring to the String name/"id" of the attribute...or, the String "value" of the attribute...
    I have not been able to verify how I should code the getter/setters (and type casts) for other kinds of objects like ArrayLists, HashMaps, etc
    For example, a typical logic mechanism Ive seen in the custom "tag" examples is as follows...
    in a "tag" class...
            if( tabledata != null )
                if (isValueReference (tabledata))
                    FacesContext context = FacesContext.getCurrentInstance ();
                    Application app = context.getApplication ();
                    ValueBinding vb = app.createValueBinding (tabledata);
                    component.setValueBinding ("tabledata", vb);
                else
                    component.getAttributes ().put ("tabledata", tabledata);
    in the "component" class...
        public void setTabledata (List tabledata)
            this.tabledata = tabledata;
        public List getTabledata ()
            if(null != tabledata)
                return tabledata;
            ValueBinding _vb = getValueBinding ("tabledata");
            if(_vb != null)
                return (List)_vb.getValue (getFacesContext ());
            else
                return null;
        }...considering the above code,
    ---when/where should the "tabledata" variable be referring the "name/id" of the attribute?...
    ---when/where should the "tabledata" variable be referring to the "value" of the attribute?...
    ...as, I need to change the type casting to adjust to what it should be...
    ***NOTE: This is one error that I'm getting, and I believe it is because I do not understand how getter/setter is used in "component" and "tag" classe, i.e., :
    "org.apache.jasper.JasperException: jsp.error.beans.property.conversion
         org.apache.jasper.runtime.JspRuntimeLibrary.getValueFromPropertyEditorManager(JspRuntimeLibrary.java:885)"...
    Thanks for any help on this!
    sd

    The "tabledata" variable always refers the local value of the attribute.
    When using a value binding to some backing bean,
    the local value is null and the model value is owned by the bean.
    You don't need any casting in the tag class nor the component class.
    The setters/getters in the component class specify the type of the attributes.
    Conversion from/to String to/from the type is done automatically if possible.
    When the automatic conversion is impossible, you should specify f:converter
    for the attribute.

  • Problem with inputText in my custom component

    Hi, I have a custom dataTable component that I'm trying to get to work. It has to be a custom component because dataTable doesn't support rowspan, colspan, multi line headers, and a rendered attribute for rows. The problem is, that when I wrap the column tag inside my row tag then the method for the inputText tag never gets called in the UPDATE_MODEL_VALUES phase.
    I'm starting to think that JSF doesn't support 2 levels of tags between the inputText and dataTable. I'm hoping that someone can tell me what I have wrong with my components.
    Here is the JSP snippet.
    <cjsf:rptTable>
         <cjsf:data id="dataTable1" value="#{allAuthUser.tableRows}" var="myTableRow1">
              <cjsf:row>
                   <cjsf:col>
                        <h:inputText id="tableTestFld" value="#{myTableRow1.testFld}" size="5" maxlength="5"/>
                   </cjsf:col>
              </cjsf:row>
         </cjsf:data>
    </cjsf:rptTable>Here is what it renders. It looks to me like everything renders fine. So I'm guessing that there is something in a component that is causing JSF during the life cycle to not be able to process correctly.
    <table>
         <tbody>
              <tr>
                   <td><input id="tblmaintForm:body:dataTable1_0:tableTestFld" name="tblmaintForm:body:dataTable1_0:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
              </tr>
              <tr>
                   <td><input id="tblmaintForm:body:dataTable1_1:tableTestFld" name="tblmaintForm:body:dataTable1_1:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
              </tr>
              <tr>
                   <td><input id="tblmaintForm:body:dataTable1_2:tableTestFld" name="tblmaintForm:body:dataTable1_2:tableTestFld" type="text" value="" maxlength="5" size="5"/></td>
              </tr>
         </tbody>
    </table>Note: If I leave off the row tag it renders the same way except of course the <tr> and </tr> tags are missing. If I do this, then the backing method for the inputText tag is called and everything works fine. Why doesn't it work with the row tag in place?
    Here are the components:
    public class UIRptTable extends UIComponentBase {
         public UIRptTable() {
              setRendererType("tblmaint.rptTableRenderer");
         public String getFamily() {
              return "javax.faces.Output";
    public class UIRptTableData extends HtmlDataTable {
         public UIRptTableData() {
              setRendererType("tblmaint.rptTableDataRenderer");
         public String getFamily() {
              return "javax.faces.Data";
    public class UIRptTableRow extends UIOutput {
         public UIRptTableRow() {
              setRendererType("tblmaint.rptTableRowRenderer");
         public String getFamily() {
              return "javax.faces.Output";
    public class UIRptTableCol extends UIColumn {
         public UIRptTableCol() {
              setRendererType("tblmaint.rptTableColRenderer");
         public String getFamily() {
              return "javax.faces.Column";
    }Here is part of the faces-config file in case you need it.
    <!-- Components -->
    <component>
         <component-type>tblmaint.rptTable</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTable</component-class>
    </component>
    <component>
         <component-type>tblmaint.rptTableData</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableData</component-class>
    </component>
    <component>
         <component-type>tblmaint.rptTableRow</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableRow</component-class>
    </component>
    <component>
         <component-type>tblmaint.rptTableCol</component-type>
         <component-class>com.monsanto.ag_it.fieldops.aim.tblmaint.component.UIRptTableCol</component-class>
    </component>
    <!-- Render Kits -->
    <render-kit>
         <renderer>
              <component-family>javax.faces.Output</component-family>
              <renderer-type>tblmaint.rptTableRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableRenderer</renderer-class>
         </renderer>
    </render-kit>
    <render-kit>
         <renderer>
              <component-family>javax.faces.Data</component-family>
              <renderer-type>tblmaint.rptTableDataRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableDataRenderer</renderer-class>
         </renderer>
    </render-kit>
    <render-kit>
         <renderer>
              <component-family>javax.faces.Output</component-family>
              <renderer-type>tblmaint.rptTableRowRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableRowRenderer</renderer-class>
         </renderer>
    </render-kit>
    <render-kit>
         <renderer>
              <component-family>javax.faces.Column</component-family>
              <renderer-type>tblmaint.rptTableColRenderer</renderer-type>
              <renderer-class>com.monsanto.ag_it.fieldops.aim.tblmaint.renderer.RptTableColRenderer</renderer-class>
         </renderer>
    </render-kit>I sure hope that someone can help me out. Please let me know if you need any additional information.
    Thanks,
    Ray

    Hi, Ray!
    1) I was trying to put a button in the column header (for sorting) and I couldn't get that to work. That involved the >colhdr tag. I got that to work but I don't remember the fix. I'll look it up and reply back with that when I can.Dealing the first part of your trouble, you need NOT a custom component.
    I have looked through the implementation of RepeaterRenderer, as you advised me, and found that the multi-header possibility is included in the implementation of dataTable control.
    The code below is the part of source of repeater.jsp with only change:
    <d:data_repeater> &#61664; <h:dataTable>
    And it works fine.
    <h:dataTable id="table"
    binding="#{RepeaterBean.data}"
         rows="5"
    value="#{RepeaterBean.customers}"
    var="customer">
    <f:facet name="header">
    <h:outputText value="Customer List"/>               <!� First Header row -- >
    </f:facet>
    <h:column>
    <%-- Visible checkbox for selection --%>
    <h:selectBooleanCheckbox
    id="checked"
    binding="#{RepeaterBean.checked}"/>
    <%-- Invisible checkbox for "created" flag --%>
    <h:selectBooleanCheckbox
    id="created"
    binding="#{RepeaterBean.created}"
    rendered="false"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Account Id"/>               <!�Second Header row -- >
    </f:facet>
    <h:inputText id="accountId"
    binding="#{RepeaterBean.accountId}"
    required="true"
    size="6"
    value="#{customer.accountId}">
    </h:inputText>
    <h:message for="accountId"/>
    </h:column>
    <h:column>
    <f:facet name="header">
    <h:outputText value="Customer Name"/>               <!�Second Header row -- >
    </f:facet>
    <h:inputText id="name"
    required="true"
    size="50"
    value="#{customer.name}">
    </h:inputText>
    <h:message for="name"/>
    </h:column>
    <h:column>
    <f:facet name="header">                    <!�Second Header row -- >
    <h:outputText value="Symbol"/>
    </f:facet>
    <h:inputText id="symbol"
    required="true"
    size="6"
    value="#{customer.symbol}">
    <f:validateLength
    maximum="6"
    minimum="2"/>
    </h:inputText>
    <h:message for="symbol"/>
    </h:column>
    <h:column>
    <f:facet name="header">                    <!�Second Header row -- >
    <h:outputText value="Total Sales"/>
    </f:facet>
    <h:outputText id="totalSales"
    value="#{customer.totalSales}">
    <f:convertNumber
    type="currency"/>
    </h:outputText>
    </h:column>
    <h:column>
    <f:facet name="header">                    <!�Second Header row -- >
    <h:outputText value="Commands"/>
    </f:facet>
    <h:commandButton id="press"
    action="#{RepeaterBean.press}"
    immediate="true"
    value="#{RepeaterBean.pressLabel}"
    type="SUBMIT"/>
    <h:commandLink id="click"
    action="#{RepeaterBean.click}"
    immediate="true">
    <h:outputText
    value="Click"/>
    </h:commandLink>
    </h:column>
    </h:dataTable>
    You may have a look at HTML source to prove that dataTable is already what you need:
    <table id="myform:table">
    <thead>
    <tr><th colspan="6" scope="colgroup">Customer List</th></tr>
    <tr>
    <th scope="col"></th>
    <th scope="col">Account Id</th>
    <th scope="col">Customer Name</th>
    <th scope="col">Symbol</th>
    <th scope="col">Total Sales</th>
    <th scope="col">Commands</th>
    </tr>
    </thead>
    <tbody>
    2.) The second trouble is still unsettled as previously. Right now I have different task at my job, and I can�t continue investigation of this problem.
    But when you find smth., please let me know. I�ll be very grateful.
    Regards,
    Oleksa Stelmakh

  • Decode-method for custom component isn't called

    Hi,
    i have writen a custom component which gets some information by command-link. To make the data from the link accessible, i wrote a decode method in my renderer and in me component. But both method are not called from the faces framework.
    Dows anybody knows what i made wrong???
    Thanks, Sebastian

    Hi,
    thank you for your reply.
    Unfortunately the processDecodes(...) of my component is also not called from the framework. Does anybody knows what i'm making wrong???
    Thanks!

  • How to construct the component tree in my custom component?Help!

    Hi, i am writing a custom component like this:
    public class HtmlCategory extends HtmlPanelGrid
         public void processRestoreState(javax.faces.context.FacesContext context,
                java.lang.Object state)
              setColumns(1);
              HtmlCommandLink link=new HtmlCommandLink();
              link.setValue("Let's Bingo");
              MyUtil.setActionListener(context,link,"#{temp.mytest}");
              UIParameter param=new UIParameter();
              param.setName("name");
              param.setValue("Robin!");
              link.getChildren().add(param);
              param.setParent(link);
              getChildren().add(link);
              link.setParent(this);
              super.processRestoreState(context,state);
    }         you see, i want to construct the compont tree at Restore View phase this way,because the structure of the component tree will always be the same, so i don't the user to write extra code.
    But the children of the component are not rendered,the renderer of the HtmlCategory component just extends the HtmlGridRenderer(myfaces) directly,and always calls the "super" methods in the encode methods of the renderer.
    I got a message from the console:
    Wrong columns attribute for PanelGrid id0:id4: -2147483648
    but i have set the columns attribute in the code above, so what's happening? or please give some advice about how to render the component tree by myself in Restore View with the tree constructing code in the custom component class code,just lke the code above.
    Best Regards:)
    Robin

    Well, i don't know if i have got my question clear.
    usually, according to the tags you use in the jsf page, a component tree will be created at the Restore View phase,for example:
    <f:form>
      <h:panelGrid ...........>                         
              <h:dataTable ................>
              </h:dataTable>
       </h:panelGrid>
    </f:form>but because i am writing a component for my web app, all the child components and their attributes are not likely to change. so i want to reduce the tags into one custom tag, and construct the component tree internally by myself.But it is not the case of backing bean.So i wrote the the code in the method:
    public void processRestoreState(javax.faces.context.FacesContext context,java.lang.Object state)as it is shown in my orginal message.But it seems that it is not right way to construct my component tree.So where should i put the code that construct the component tree?Overriding the method :
    public void processRestoreState(javax.faces.context.FacesContext context,java.lang.Object state)is not the right way?
    Best Regards:)
    Robin

  • JScrollPane, what is wrong with my code?

    Hi, I appreciated if you helped me(perhaps by trying it out yourself?)
    I wanted my JScrollPane to display what is drawn on my canvas (which may be large)by scrolling, but it says it doesn't need any vertical and horizontal scroll bars. Here is the code that has this effect
    import javax.swing.*;
    import java.awt.*;
    public class WhatsWrong extends JApplet{
    public void init(){
    Container appletCont = getContentPane();
    appletCont.setLayout(new BorderLayout());
    JPanel p = new JPanel();
    p.setLayout(new BorderLayout());
    p.add(new LargeCanvas(),BorderLayout.CENTER);
    int ver = ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
    int hor = ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
    JScrollPane jsp = new JScrollPane(p,ver,hor);
    appletCont.add(jsp,BorderLayout.CENTER);
    class LargeCanvas extends Canvas{
    public LargeCanvas(){
    super();
    setBackground(Color.white);
    public void paint(Graphics g){
    g.drawRect(50,50,700,700);
    and the html code:
    <html>
    <body>
    <applet code="WhatsWrong" width = 300 height = 250>
    </applet>
    </body>
    </html>
    What shall I do?
    Thanks in advance.

    What is wrong with your code is that your class, LargeCanvas must implement the Scrollable interface in order to be scrolled by a JScrollPane.
    A comment regarding your use of Canvas and Swing components: The Java Tutorial recommends that you extend JPanel to do custom painting. Canvas is what they call a "heavyweight" component and they recommend not to mix lightweight (Swing) components and heavyweight components.
    There is a lot more information on custom painting on the Java Tutorial in the Lesson "Creating a GUI with Swing.

  • Decode function not called for a custom component

    I know this problem happened in the past - in the EA2, EA4 and I believe the beta version as well, but does anyone know if it has been solved for the release ?
    In short - I'm working with the release, created a menuBar component and the decode method in the renderer is not called after I submit the page. In the past, there were rumors that this happened due to relative paths in the JSP (for js files, images, etc.).
    Does anyone else have this problem ? or better , know how to solve it ?
    Thanx,
    Netta.

    It's not that simple - The component is getting rendered, all the encode methods are called and the decode is called also , but only the first time the form is submitted.
    I added this custom component to the guessNumber application, and I have a menuBar in the greeting.jsp that leads to the response.jsp and vice versa. it looks like this in the greeting.jsp page -
    <!-- Start Menu -->
    <t:MenuBar id="bar1" styleClass="myClass" >
    <t:Menu id="menu1" name="menu1">
    <t:Menu id="menu2" name="menu2">
    <t:MenuItem id="item2_1" name="item2_1" action="/mytest/guess/response.jsp"/>
    <t:MenuItem id="item2_2" name="item2_2" action="http://www.msn.com"/>
    <t:Menu id="menu3" name="menu3">
    <t:MenuItem id="item3_1" name="item3_1x" action="http://www.msn.com"/>
    </t:Menu>
    </t:Menu>
    </t:Menu>
    <t:MenuItem id="item3" name="item3" action="http://www.cnn.com"/>
    </t:MenuBar>
    <!-- End Menu -->
    In the response it looks like this -
    <!-- Start Menu -->
    <t:MenuBar id="bar2" styleClass="myClass" >
    <t:MenuItem id="item3" name="item3" action="/mytest/guess/greeting.jsp"/>
    </t:MenuBar>
    <!-- End Menu -->
    and every time a menuItem is clicked on, the JS calls submit form.
    Since the menus are rendered, I assume there's nothing wrong with the rendererType and any other renderer problem. Since the decode is called only once, I assume the right form is being submitted.
    So, what can cause it to stop calling the decode ???
    Could it be that becase I go directly to the page and not through the navigation rules ( I call window.open directly from the JS), it creates a problem ??
    Please help, I've been wasting so much time on this !
    Netta.

  • Help with creating a custom component.

    Hi. I have created a really simple custom component called
    myComp. It is a simple Canvas 100 pixels x 100 pixels with an Image
    control component.
    <mx:Canvas>
    <mx:Image id="image1">
    </mx:Canvas>
    After instantiating the component in Main.mxml eg. var
    pic1:myComp = new myComp(); I am having a problem setting the
    source property of the Image component.
    "image1" is the id of mx:Image in the custom compoenent so I
    tried pic1.image1.source = "assets/ball.jpg" but I get a run time
    error "Error #1009: Cannot access a property or method of a null
    object reference".
    Don't really know what I am doing wrong.
    Any help please!

    In your custom component, try adding a bindable public var
    which contains the path to your image. Also, set the image.source
    to this var.
    In your main app, set the var within the <mx:> tags of
    the custom component. Since it is a public var, it will show up in
    the code hint. You can also now change the image var from the main
    app anytime you like using ActionScript code.

  • AddChild Not working in a loop with custom component

    Hi,
    I have a custom component 'form component'
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Form xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%">
        <mx:Script>
            <![CDATA[
                import mx.controls.Alert;
                import flash.net.navigateToURL;
                public var documentName:String;
                public var documentLocation:String;
                public var documentDescription:String;
                public var documentLevel:String;
                private function openLink():void
                    var urlRequest:URLRequest=new URLRequest(documentLocation);
                    navigateToURL(urlRequest,"_blank");
            ]]>
        </mx:Script>
        <mx:FormItem width="100%" height="100%" paddingRight="10" borderThickness="10">
            <mx:VBox width="100%" cornerRadius="10" borderThickness="2" borderStyle="solid" borderColor="#D5D2D2">
                <mx:ApplicationControlBar width="100%"  fillAlphas="[1.0, 0.52]" fillColors="[#FFFFFF, #B3CDD9]">
                    <mx:LinkButton id="eachDocumentName" label="Name" click="openLink()" textAlign="left" width="50%" />
                    <mx:Label id="eachDocumentLevel" text="Level" textAlign="right" width="50%"/>
                </mx:ApplicationControlBar>
                <mx:Label id="eachDocumentDescription" width="100%" text="Description" paddingTop="5"  paddingLeft="10"/>
                <mx:Label height="10" width="100%" />
            </mx:VBox>
        </mx:FormItem>
    </mx:Form>
    and I Want to add this component inside a VBox for a loop dynamically like
    Script Code:
    private function showDocuments(event:ResultEvent):void
                    var documentList:ArrayCollection=event.result.root.documents.document;
                    for(var i:int=0;i<documentList.length;i++)
                        var documentName:String=documentList[i].name.toString();
                        var documentDescription:String=documentList[i].description.toString();
                        var documentLevel:String=documentList[i].level.toString();
                        var documentLocation:String=documentList[i].location.toString();
                        createChildForFilePanel(documentName,documentLevel,documentDescription,documentLocation);
                private function createChildForFilePanel(documentName:String,documentLevel:String,documentDescription:Stri ng,documentLocation:String):void
                        Alert.show("function Called");
                        var documentListing:DocumentListing=new DocumentListing();
                        documentListing.percentWidth=100;
                        documentListing.percentHeight=100;
                        documentListing.eachDocumentName.label=documentName;
                        documentListing.eachDocumentLevel.text=documentLevel;
                        documentListing.eachDocumentDescription.text=documentDescription;
                        documentListing.documentLocation=documentLocation;
                        filePanel.addChild(documentListing);
    MX: code
      <mx:VBox id="filePanel" label="File Content" width="100%" height="100%" borderThickness="0" >
          </mx:VBox>
    This is actually Not working.. Am I doing anything wrong. I have included the component in the namespace..
    Thanks In Advance,
    Piyush

    Its working now. The Solution to it what I found was whatever you are Adding To the Parent Component. The Parent Component should be created in the action script.
    Worked for me :-)
    Thanks,
    Piyush

  • My custom component not clickable

    Hi,
    I'm creating custom component and when I add it to page I can't click it. When I add it to the bottom of page, the parsys overlaps this component and when I add component behind my custom component, it overlaps it too which means I can't edit/delete my cust. component. What am I doing wrong? Here is the code
    <%@include file="/libs/foundation/global.jsp"%>
    <%@page import="com.day.text.Text" %>
    <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %><%
    String home = Text.getAbsoluteParent(currentPage.getPath(), 2);
    %>
    <p>
    <div class="download">
    <div class="fl mr30">
      <cq:include path="download-file" resourceType="project20130820v01/components/component_008_vybrat-soubor" />
    </div>
    <div class="fl">
      <cq:include path="download-file2" resourceType="project20130820v01/components/component_008_vybrat-soubor" />
    </div>
    </div>
    </p>
    and properties are set to this
    I'm thankfull for any help.

    After some test, I found that overriding value property in my custom component cause this proplem.Why overriding value property cause this problem?

Maybe you are looking for