0 Replies Latest reply on Apr 30, 2011 4:29 AM by Jeongpil An

    dynamic commandLink Problem

    Jeongpil An Newbie

      Hi, JBoss Users.


      I'm using JBoss 6.0 Final but have a very painful problem.


      A h:commandLink don't execute an action of backing bean when it is rendered by actioning, like action="#{testBB.showList}".


      In other words, First enter .../Test.xhtml into web brower address place.

      Second, click 'showList' link and system render 'showDetail'(name) Link of Test.xhtml.

      And then, I click 'showDetail' Link but JSF Engine don't execute TestBB.showDetail() method.


      please give me your know.



      ========================= Below is my JSF and Backing Bean source code =====================


      -- Test.xhtml--


      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE html
      PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

      <html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:c="http://java.sun.com/jsp/jstl/core" >
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>



      <h:form id="testForm">

      <h:commandLink id="call" action="#{testBB.showList}">
      <table cellspacing="0" cellpadding="0" border="0" width="300">
      <h:panelGroup rendered="#{testBB.requireShow}">
         <h:commandLink id="testBtn" action="#{testBB.showDetail}">
          <h:outputText value="name1"/>
        <td><h:outputText value="description1"/></td>





      ---------------------------- TestBB.java ----------------------------

      package info.castingline.clms.test.web;


      import info.castingline.clms.test.biz.Testing;
      import info.castingline.clms.test.entity.Test;
      import info.castingline.framework.Logger;

      import javax.annotation.PostConstruct;
      import javax.ejb.EJB;
      import javax.faces.bean.ManagedBean;
      import javax.faces.bean.RequestScoped;

      public class TestBB {
      private Logger logger= Logger.getLogger(TestBB.class);
      @EJB Testing testing;


      private Test[] tests;


      private String iid;
      private String name;
      private String description;


      private boolean requireShow= false;


      public TestBB(){




      public boolean isRequireShow() {
        return requireShow;


      public void setRequireShow(boolean requireShow) {
        this.requireShow = requireShow;


      public Test[] getTests() {
        return tests;


      public void setTests(Test[] tests) {
        this.tests = tests;


          public void initialize(){
        logger.debug("initialize() is called!");


      public String getIid() {
        return iid;


      public void setIid(String iid) {
        this.iid = iid;


      public String getName() {
        return name;


      public void setName(String name) {
        this.name = name;


      public String getDescription() {
        return description;


      public void setDescription(String description) {
        this.description = description;

      public String showList(){
        logger.debug("showList() is called!");
        tests= testing.findTests();
        requireShow= true;
        return "success";

      public String showDetail(){
        logger.debug("showDetail() is called!");
        return "success";