H:commandLink action never calls bean

Hi , I having some problem with h:commandLink, its never call my bean
below is my code.
<h:commandLink action="#{pc_trackingSearchPageBean.doTrackingGroupSearch}">
                                        <h:outputText id="ownerID" value="#{varreceivables.ownerID}" />                                        
                                   </h:commandLink>
any suggestions?
Thanks
Srikanth

Here is my backing bean..
The code is a mess now, as I had tried out all possible options I came across in net!!
public class BikesBean {
     BikeVO bikeVO;
     BikesFacadeI bikesFacade;
     BikeStoreVO bikeStoreVO;// = new BikeStoreVO();
     /** List of bikes for Bikes listing. */
private HtmlDataTable bikesModel;
private boolean editMode = false;
private BikeVO searchBikeVO;
          bikeVO = new BikeVO();
          searchBikeVO = new BikeVO();
     public void setBikesFacade(BikesFacadeI bikesFacade) {
          this.bikesFacade = bikesFacade;
     public BikesFacadeI getBikesFacade() {
          return bikesFacade;
     /*public BikeStoreVO getBikeStoreVO() {          
          //if(bikeStoreVO == null)
          //     bikeStoreVO = new BikeStoreVO();
          return bikesFacade.listBikes();
          //return bikeStoreVO;
     public List getMyBikes() {
          System.out.println("in BikesBean..getMyBikes.."+bikeStoreVO);
          if(bikeStoreVO == null)
               bikeStoreVO = new BikeStoreVO();
          return bikeStoreVO.getBikes();
     public BikeVO getBikeVO() {
          return bikeVO;
     public void setBikeVO(BikeVO bikeVO) {
          this.bikeVO = bikeVO;
     public boolean isEditMode() {
          return editMode;
     public void setEditMode(boolean editMode) {
          this.editMode = editMode;
     public BikeVO getSearchBikeVO() {
          return searchBikeVO;
     public void setSearchBikeVO(BikeVO searchBikeVO) {
          this.searchBikeVO = searchBikeVO;
     public String listBikes() {          
          bikeStoreVO = bikesFacade.listBikes();
          //bikesModel.setWrappedData(bikeStoreVO.getBikes());
          clearSearch();
          return "listbikes";
     public String searchBikes() {          
          bikeStoreVO = bikesFacade.searchBikes(searchBikeVO);          
          if(bikeStoreVO.getBikes() == null || bikeStoreVO.getBikes().isEmpty()) {
               FacesContext context = FacesContext.getCurrentInstance();
               context.addMessage(null, MessageFactory.
               getMessage("noMatch", new Object[] { "Model -> "+searchBikeVO.getModel() +" Manf. -> "+ searchBikeVO.getManufacturer()}));
               return null;
          //bikesModel.setWrappedData(bikeStoreVO.getBikes());
          return "listbikes";
     public String viewAddBike() {          
          bikeVO = new BikeVO();
          this.editMode = false;
          return "viewaddbike";
     public String addBike() {          
          bikeStoreVO = bikesFacade.addBike(bikeVO);
          //bikesModel.setWrappedData(bikeStoreVO.getBikes());
          clearSearch();
          return "listbikes";
     public String viewEditBike() {          
          //this.bikeVO = (BikeVO) bikesFacade.getBikeById(((BikeVO) bikesModel.getRowData()).getBikeId());
          this.bikeVO = (BikeVO)this.getBikes().getRowData();
          //FacesContext ctx = FacesContext.getCurrentInstance();
          //ValueBinding binding = ctx.getApplication().createValueBinding("#{editContact}");
          //binding.setValue(ctx, editContact);
          this.editMode = true;
          return "viewaddbike";
     public HtmlDataTable getBikes() {
          return bikesModel;
     public void setBikes(HtmlDataTable bikesModel) {
          this.bikesModel = bikesModel;
     public String deleteBike() {
          //String attrvalue1 = (String) event.getComponent().getAttributes().get("delBikeId");          
          /*BikeVO vo = (BikeVO) bikesModel.getRowData();
          System.out.println("Bike Id.."+vo.getBikeId());
          bikeStoreVO = bikesFacade.deleteBike(vo, searchBikeVO);
          bikesModel.setWrappedData(bikeStoreVO.getBikes());*/
          return "listbikes";
     public String updateBike() {
          System.out.println("in BikesBean..updateBike..");
          bikeStoreVO = bikesFacade.updateBike(bikeVO);
          //bikesModel.setWrappedData(bikeStoreVO.getBikes());
          return "listbikes";
anf here is my faces config..along with JSF, i am using Spring+Hibernate
<faces-config>
<application> <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
</application>
<navigation-rule>
          <from-view-id>/welcome.jsp</from-view-id>
          <navigation-case>
               <from-outcome>back</from-outcome>
               <to-view-id>/index.jsp</to-view-id>
          </navigation-case>
          <navigation-case>
          <from-outcome>listbikes</from-outcome>
          <to-view-id>/listBikes.jsp</to-view-id>
     </navigation-case>      
     <navigation-case>
          <from-outcome>viewaddbike</from-outcome>
          <to-view-id>/addBike.jsp</to-view-id>
</navigation-case>
</navigation-rule>
<navigation-rule>
          <from-view-id>/addBike.jsp</from-view-id>
          <navigation-case>
               <from-outcome>listbikes</from-outcome>
               <to-view-id>/listBikes.jsp</to-view-id>
     </navigation-case>
     <navigation-case>
               <from-outcome>welcome</from-outcome>
               <to-view-id>/welcome.jsp</to-view-id>
     </navigation-case>
     </navigation-rule>     
     <navigation-rule>
          <from-view-id>/listBikes.jsp</from-view-id>               
          <navigation-case>
               <from-outcome>welcome</from-outcome>
               <to-view-id>/welcome.jsp</to-view-id>
          </navigation-case>
          <navigation-case>
               <from-outcome>viewaddbike</from-outcome>
               <to-view-id>/addBike.jsp</to-view-id>
          </navigation-case>          
     </navigation-rule>
<managed-bean>
<managed-bean-name>bikesBean</managed-bean-name> <managed-bean-class>com.moh.jsfspring.BikesBean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
          <property-name>bikesFacade</property-name>
          <value>#{bikesFacade}</value>
     </managed-property>
</managed-bean>
<application>
          <message-bundle>myMessages</message-bundle>
</application>
</faces-config>

Similar Messages

  • H:commandLink and an Action being called multiple times.

    Hi everyone. I'm more or less relatively new in terms of JSF, though I've had to do a lot of "catching up" recently.
    I've been reading that with managed-beans, the getters/setters are not gaurenteed to be called once. http://www.jsf-faq.com/faqs/faces-misc.html#106
    My question is, are there any reasons why an action method would get called twice? An example of my jsp page.
    <h:commandLink action="#{exploreCaseAction.exploreCase}" >                    
         <h:outputText value="#{case.caseNumber}"/>
         <f:param name="caseId" value="#{case.caseId}"/>
    </h:commandLink>My faces-config
    <managed-bean>
       <managed-bean-name>exploreCaseAction</managed-bean-name>
       <managed-bean-class>com.unyric.cias.cm.web.action.ExploreCaseAction</managed-bean-class>
       managed-bean-scope>request</managed-bean-scope>
       <managed-property>
          <property-name>caseTreeHelper</property-name>
             <value>#{caseTreeHelper}</value>
       </managed-property>
       <managed-property>
          <property-name>caseId</property-name>
             <value>#{param.caseId}</value>
       </managed-property>     
       <managed-property>
          <property-name>sessionManager</property-name>
             <value>#{sessionManager}</value>
       </managed-property>               
    </managed-bean>When I click on one of the links and set a breakpoint, it comes up twice. Here's the crazy part. if I use <af:commandLink> then it only runs once.
    Personally I'd rather not use oracles components (I know it got donated and is/will be Trinidad).
    Anyone with any ideas?

    Would you be willing to try the RI (1.1_02) [1] to see if you have the same problem?
    [1] https://javaserverfaces.dev.java.net/servlets/ProjectDocumentList?folderID=5225&expandFolder=5225&folderID=0

  • Calling action on navigation bean skips setters on form bb

    Hi,
    I'm new to these forums so please bare me out :)
    I'm trying to always save the current form on a navigation event. Using facelets, so the navigation is general over all pages. I'm using t:panelNavigation2 for this (tomahawk) with commandNavigation2 items. The current form is always defined in an ui:define block.
    I'm trying to always call the save action on the current page before handling navigation. The way I was thinking is this:
    I put an updateActionListener in all the commandNavigation2 tags, which set the next navigation-rule outcome on my HistoryManager. Then in another manager I call an action handleNavigation, which sorts out the current bean and calls save on it. The problem is that at the time handleNavigation is called, the properties i defined in my bean are not set yet. Normally when I call some sort of action on the pages backing bean, all properties are set first.
    Is there some way to force this? To make myself a little clearer (I hope) here's my code:
    public class ApplicationManager {
       private HistoryManager historyManager;
       private String nextBean;
       public String handleNavigation() throws BeanNotFoundException {
          Map requestMap = FacesUtils.getExternalContext().getRequestMap();
          FormBaseBb bean = (FormBaseBb) requestMap.get(historyManager.getCurrentForm());
          bean.save();
          historyManager.setCurrentForm(nextBean);
          return nextBean.substring(0, nextBean.length() - 2);
       public void setNextBean(String nextBean) {
          this.nextBean = nextBean;
       public HistoryManager getHistoryManager() {
          return historyManager;
       public void setHistoryManager(HistoryManager historyManager) {
          this.historyManager = historyManager;
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml"
         xmlns:ui="http://java.sun.com/jsf/facelets"
         xmlns:f="http://java.sun.com/jsf/core"
         xmlns:h="http://java.sun.com/jsf/html"
         xmlns:t="http://myfaces.apache.org/tomahawk">
    <f:loadBundle var="general_msg"
         basename="nl.tempel.tipharma.logic.jsf.resource.general_messages" />
    <f:loadBundle var="admin_msg"
         basename="nl.tempel.tipharma.logic.jsf.resource.admin_messages" />
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title><ui:insert name="window_title">TI Pharma</ui:insert></title>
    <style type="text/css" media="all">
              /* <![CDATA[ */
                   @import url(css/layout_common.css);
                   @import url(css/layout_complex.css);
                   @import url(css/navigation_left.css);
                   @import url(css/content.css);
              /* ]]> */
         </style>
    </head>
    <body>
    <div id="master_container"><h:form id="f">
         <div id="master_header">&#xA0;</div>
         <div id="top_navigation"><ui:insert name="top_navigation">
              <div class="top_link_active">Form</div>
              <div class="top_link_inactive"><h:commandLink
                   action="information" styleClass="top_link" value="Information" /></div>
              <div class="top_link_inactive"><h:commandLink
                   action="#{authenticationBb.logout}" styleClass="top_link"
                   value="Log Out" /></div>
         </ui:insert></div>
         <div id="nav_line">&#xA0;</div>
         <div id="main_wrapper">
         <div id="navigation_wrapper"><t:panelNavigation2
              id="panel_navigation" layout="list" styleClass="navigation_list"
              itemClass="item" activeItemClass="active_item"
              openItemClass="open_item">
              <t:commandNavigation2 action="#{applicationManager.handleNavigation}"
                   activeOnViewIds="/form_general.xhtml" value="1. General data"
                   immediate="false">
                   <h:outputText value="1. General data" />
                   <t:updateActionListener property="#{applicationManager.nextBean}"
                        value="#{formGeneralBb.beanName}" />
              </t:commandNavigation2>
              <t:commandNavigation2 action="#{applicationManager.handleNavigation}"
                   value="2. Project content" immediate="false">
                   <h:outputText value="2. Project content" />
                   <t:updateActionListener property="#{applicationManager.nextBean}"
                        value="#{formSummaryAndGoalsBb.beanName}" />
                   <t:commandNavigation2 action="#{applicationManager.handleNavigation}"
                        activeOnViewIds="/form_summary_and_goals.xhtml"
                        value="a. Summary and goals" immediate="false">
                        <h:outputText value="a. Summary and goals" />
                        <t:updateActionListener property="#{applicationManager.nextBean}"
                             value="#{formSummaryAndGoalsBb.beanName}" />
                   </t:commandNavigation2>
                   <t:commandNavigation2 action="#{applicationManager.handleNavigation}"
                        activeOnViewIds="/form_milestones.xhtml" value="b. Milestones"
                        immediate="false">
                        <h:outputText value="b. Milestones" />
                        <t:updateActionListener property="#{applicationManager.nextBean}"
                             value="#{formMilestonesBb.beanName}" />
                   </t:commandNavigation2>
                   <t:commandNavigation2 action="#{applicationManager.handleNavigation}"
                        activeOnViewIds="/form_characterization.xhtml"
                        value="c. Characterization" immediate="false">
                        <h:outputText value="c. Characterization" />
                        <t:updateActionListener property="#{applicationManager.nextBean}"
                             value="#{formCharacterizationBb.beanName}" />
                   </t:commandNavigation2>
                   <t:commandNavigation2 action="#{applicationManager.handleNavigation}"
                        activeOnViewIds="/form_publications.xhtml" value="d. Publications"
                        immediate="false">
                        <h:outputText value="d. Publications" />
                        <t:updateActionListener property="#{applicationManager.nextBean}"
                             value="#{formPublicationsBb.beanName}" />
                   </t:commandNavigation2>
              </t:commandNavigation2>
              <t:commandNavigation2 action="#{applicationManager.handleNavigation}"
                   value="3. Project budget" immediate="false">
                   <h:outputText value="3. Project budget" />
                   <t:updateActionListener property="#{applicationManager.nextBean}"
                        value="#{formCostsResearchersBb.beanName}" />
                   <t:commandNavigation2 action="#{applicationManager.handleNavigation}"
                        activeOnViewIds="/form_costs_researchers.xhtml"
                        value="a. Costs researchers" immediate="false">
                        <h:outputText value="a. Costs researchers" />
                        <t:updateActionListener property="#{applicationManager.nextBean}"
                             value="#{formCostsResearchersBb.beanName}" />
                   </t:commandNavigation2>
                   <t:commandNavigation2 action="#{applicationManager.handleNavigation}"
                        activeOnViewIds="/form_costs_materials.xhtml"
                        value="b. Costs materials & Supplies" immediate="false">
                        <h:outputText value="b. Costs materials & Supplies" />
                        <t:updateActionListener property="#{applicationManager.nextBean}"
                             value="#{formCostsMaterialsBb.beanName}" />
                   </t:commandNavigation2>
                   <t:commandNavigation2 action="#{applicationManager.handleNavigation}"
                        activeOnViewIds="/form_investments.xhtml" value="c. Investments"
                        immediate="false">
                        <h:outputText value="c. Investments" />
                        <t:updateActionListener property="#{applicationManager.nextBean}"
                             value="#{formInvestmentsBb.beanName}" />
                   </t:commandNavigation2>
                   <t:commandNavigation2 action="#{applicationManager.handleNavigation}"
                        activeOnViewIds="form_partner_contribution.xhtml"
                        value="d. Partner contribution" immediate="false">
                        <h:outputText value="d. Partner contribution" />
                        <t:updateActionListener property="#{applicationManager.nextBean}"
                             value="#{formPartnerContributionBb.beanName}" />
                   </t:commandNavigation2>
                   <t:commandNavigation2 action="#{applicationManager.handleNavigation}"
                        activeOnViewIds="/form_external_grants.xhtml"
                        value="e. External grants" immediate="false">
                        <h:outputText value="e. External grants" />
                        <t:updateActionListener property="#{applicationManager.nextBean}"
                             value="#{formExternalGrantsBb.beanName}" />
                   </t:commandNavigation2>
              </t:commandNavigation2>
              <t:commandNavigation2 action="#{applicationManager.handleNavigation}"
                   activeOnViewIds="/form_submission.xhtml" value="4. Submission"
                   immediate="false">
                   <h:outputText value="4. Submission" />
                   <t:updateActionListener property="#{applicationManager.nextBean}"
                        value="#{formSubmissionBb.beanName}" />
              </t:commandNavigation2>
         </t:panelNavigation2></div>
         <div id="content_wrapper">
         <div id="page_title"><ui:insert name="page_title">INSERT PAGE TITLE</ui:insert>
         </div>
         <div id="page_content"><ui:insert name="page_content">INSERT CONTENT</ui:insert>
         </div>
         <div id="page_footer"><ui:insert name="page_footer" /></div>
         </div>
         </div>
    </h:form></div>
    </body>
    </html>And then i have some form where i call properties in some form backing bean. They just aren't set before this action gets called.
    The only thing I can think of as a workaround right now is to define the navigation in every page and implement a custom EL function to handle navigation. This just seems like much of a hassle and I can't imagine there's not another soultion to this problem.
    Any help would be greatly appreciated! Thanks in advance.
    Regards,
    Jan

    After some further investigation I think this is a definite bug. All works fine when I use a commandButton or commandLink to accomplish the same. When I debug this in eclipse i notice that in the apply model values phase properties get set to null, although the form fields have some data in them.
    It looks like the apply model values phase or even the apply request values phase is completely skipped.
    Message was edited by:
    jteb

  • Call jsf h:commandLink action and actionListner in JavaScript

    Hi to all
    any one can help me..
    i want to call action and actionLIstner using javascript
    means....
    i want to set <h:commandLink action="" and actionListner="" in javascript
    but not at where <h:commandLink is defined.
    plz help me...
    thanx in Advance

    If I understand you try to do following?
    <h:selectOneMenu id="persontype"
                                     value="#{bean.personType}" 
                                     styleClass="select"
                                     disabled="#{bean.editMode}"
                                     onchange="changeMode(1)">
                      <f:selectItems value="#{bean.personTypeList}" />        
    <script type="text/javascript">        
          function changeMode(mode){ 
          var comboid;
          switch(mode){
          case 0:
          comboid = document.getElementById("register:persontype");
          break;
          case 1:
          comboid = document.getElementById("registerLegal:persontype");
          break;             
          case 2:
          comboid = document.getElementById("registerPhysical:persontype");
          break;             
          window.location.href ="/register/forms.jsf?personType="+comboid.value;                                
          </script>or like
    <h:commandButton type="submit" value="FILTER" onclick="set_filter();" styleClass="submit"/>
    function set_filter(){
              document.getElementById("formId:filter").value = "filter";
            }

  • ActionMethod in CommandLink is not called whenadding Components dynamically

    I want to create a customTable component in which paginator will be a sub tag.
    <custom:customTable value="#{testBean.data}" var="current1">
    <t:panelGrid binding="#{tableBean.paginator}"></t:panelGrid>
    <t:column>
              <h:outputText value="#{current1.name}"/>
    </t:column>
    <t:column>
              <h:outputText value="#{current1.id}"/>
    </t:column>
    </custom:customTable>
    In the encode method of custom renderer ,I am writing logic to render the paginator child component.
    In encode:
    List children = getChildren(uiComponent);
              for (int j = 0, size = getChildCount(uiComponent); j < size; j++) {
                   UIComponent child = (UIComponent) children.get(j);
                   if (child.isRendered()) {
                        boolean columnRendering = child instanceof HtmlPanelGrid;
                   if(columnRendering){
                        RendererUtils.renderChild(facesContext, child);     
    In <t:panelGrid binding="#{tableBean.paginator}"></t:panelGrid> ,getPaginator returns a PanelGrid which has dynamically created CommandLinks.CommandLink has action bind to a method in the managed bean.
    HtmlCommandLink htCommLink = (HtmlCommandLink) jsfUtil
                             .createComponent(HtmlCommandLink.COMPONENT_TYPE);
                   htCommLink.getAttributes().put(IISWebConstants.VALUE_ATTRIBUTE,
                             "A");
                   htCommLink.setAction(jsfUtil.createMethodBinding("#{tableBean.createData}"));
                   htCommLink.getAttributes()
                             .put(IISWebConstants.ON_CLICK, "submit()");                    
                        htCommLink.getAttributes().put(IISWebConstants.RENDERED,
                                  Boolean.TRUE);
                        htCommLink.getAttributes().put(IISWebConstants.STYLE_CLASS,
                                  "link");
    //hpg PanelGrid instance                                   hpg.getChildren().add(htCommLink);
    Problem:Paginator is rendering,Table is rendering but if I click on the commandLink ,action method is not calling.Can any body tell me how to resolve this issue

    i have found the reason!
    after click on this command link, a listener from a SelectOneMenu tag was invoked first. very interesting, but read further to know why!
    i didn't change anything in this input tag, but the problem is that the SelectOneMenu value was initalized with an empty string, but it's first SelectItem was initalized with SelectItem("x", ""). So there was an old value "" and a new value "x" and therefore it was invoked before the action method. this took me some hours to find that out.
    in this listener i made something like this at the end:
           UIViewRoot view = context.getApplication().getViewHandler().createView(context, viewPath);
           view.setViewId(viewPath);
           context.setViewRoot(view);
           context.renderResponse();so it's clear, why it didn't execute the action method.
    so as a global rule, check all your listeners (breakpoints!) when you have a similar problem!

  • Hyperlink action not called from within table

    I have two pages. Page1 has a table bound to a database listing all of the records in a customer table. Page2 has controls on it to display the details of a single customer record.
    On Page1 in the table I have made the record ID column a hyperlink. I want to save this selected ID for use on the page that the hyperlink points to. To accomplish this I added a property to my request bean. (Is this a good idea or does every page have its own request bean?) Anyway, I put code in my hyperlink1_action() method to save the current rowkey to my request bean.
    On Page2 in my prerender() method I am planning to jump to the rowkey stored in my request bean.
    It appears that my hyperlink1_action() method is never called. I have placed a breakpoint inside that method and the debugger never stops there. I have also placed a breakpoint within the prerender() method of Page2 and the debugger does stop there and I find that I have a null value stored in my request bean.
    Any insights? Feel free to speak up if I'm going about this the wrong way. I am new to Java Studio Creator and web development (previous Java experience was standalone-non-web apps).
    Thanks in advance for any help.

    Below is an excerpt from the JSP file defining the table that contains the column with a hyperlink:
    <ui:tableRowGroup binding="#{Page1.tableRowGroup2}" id="tableRowGroup2" rows="5"
         sourceData="#{Page1.tblcustomerDataProvider}" sourceVar="currentRow">
         <ui:tableColumn binding="#{Page1.tcolCustomerId}" headerText="Id" id="tcolCustomerId" sort="tblcustomer.lngCustomerId">
              <ui:hyperlink action="#{Page1.hyperlink1_action}" binding="#{Page1.hyperlink1}" id="hyperlink1" immediate="true"
                   text="#{currentRow.value['tblcustomer.lngCustomerId']}" url="/faces/Customer.jsp"/>
         </ui:tableColumn>Below is the definition of the hyperlink1_action() method that never seems to be called.
        public String hyperlink1_action() {
            // Find out what row was clicked
            RowKey rowkey = tblcustomerDataProvider.getCursorRow();
            // Save Customer Id so detail page knows what product to
            // provide detail info for
            getRequestBean1().setCurrentCustomer(rowkey);
            // Go to the detail page for that product's type
            return "case1";
        }I did not have the immediate property checked, so I tried checking it and saw no change. I have the url set to point at another page and clicking on a column with the URL appears to work fine, the specified page is opened.
    I do not have any virtual forms defined.
    Perhaps the function is called and I'm just not seeing any evidence of it. I have tried adding System.out.print statements but don't see my text in the out put window. I have tried adding break-points to the hyperlink funciton but the debugger does not stop.
    As far as the code I have pasted above for the hyperlink, it very well could be flawed (or the wrong way to go about what I am trying to accomplish) but as far as I know it has never been executed.

  • JButton pressed, but not released and actionperformed never called

    Hi,
    I have a simple JButton, with one action listener that does its thing (or at least should do because it is never called). I also added a mouse listener to trace the issue further.
    Here's what happen. I have another component (a JTextField) with a focus listener. If the compoent looses the focus, I want to have a chance to ask a quick confirmation question (JOptionPane) before continuing to do someting else (in that case, process the action on the button).
    So the focus is in the text field and I click on the button. Here's what happen:
    - The button gets a mouse pressed event
    - The text field looses the focus and the button gains it.
    - The text field's focus lost handler shows a JOptionPane => focus goes on the option pane
    - The option pane is confirmed, but the rest stops.
    I get NO mouse release event on my button, the action performed is also lost and my button remains "half pressed" (when i hover the mouse pointer over it, the button is rendered lowered ).
    My guess is that the option pane comes too quick and that the mouse release event is transfered to the option pane instead of the button I first clicked, causing the actionperformed to be ignored as a side effect.
    Any ideas or suggestions ?
    Thanks.

    I get NO mouse release event on my button, the action
    performed is also lost and my button remains "half
    pressed" (when i hover the mouse pointer over it, the
    button is rendered lowered ).
    basically that's a bug in the button's internal state handling.
    To get an idea about how to fix it, you might want to read my article "Make Buttons Respect InputVerifiers" at
    http://www.mycgiserver.com/~Kleopatra/swing/swingentry.html
    Though it's rather old the issue is not solved (until 1.5b2) It's only applicable if you have tight control over the L&F.
    Greetings
    Jeanette

  • Use Action to call JSP method instead for forwarding to another url

    I have a servlet button to save data I have entered on a form. The only way I understand to save the data when the button is pressed is to use ACTION and call up a .jsp to do the work like this:
    <FORM ACTION="http://localhost:8080/examples/jsp/learningJSP/UpdateStudentInfo.jsp" METHOD="POST">
    and here's the .jsp that sets my current properties from the form and saves them.
    <HTML>
    <BODY>
    <jsp:useBean id="studentDataBean"
         class="learningservlets.StudentDataBean"
         scope ="application"/>
    <jsp:setProperty name="studentDataBean" property ="*" />
    <!--call saveData() to send the data you just set - to the database%=stuInfo.saveData()%>-->
    <%studentDataBean.saveData();%>
    <jsp:forward page="PresentStudentData.jsp" />
    <H1>
    UpdateStudentInfo Bean
    </H1>
    </BODY>
    </HTML>
    The problem I have with using this approach is my user is sent to another page. Is there anyway to complete the above task transparently (i.e. without making the user go to the page that does all of the work)?
    Thanks for any assistance you may offer.

    Use this,
    UpdateStudentInfo.jsp
    <%@ page import="learningservlets.StudentDataBean" %>
    <jsp:useBean id="studentDataBean"
    class="learningservlets.StudentDataBean"
    scope ="application">
    <jsp:setProperty name="studentDataBean" property ="*" />
    </jsp:useBean>
    <!--call saveData() to send the data you just set - to the
    database%=stuInfo.saveData()%>-->
    <%
    studentDataBean.saveData();
    response.sendRedirect("PresentStudentData.jsp");
    return;
    %>
    Hope this helps.
    Sudha

  • How to invoke commandLink action?

    Hi!
    On my page i have commandLink defined like this:
    <af:commandLink binding="#{regBean.cmdLink}" text="commandLink 1" action="#{regBean.startRegistration}"/>
    i need to invoke its action automatically when the page is loaded (it is just "please wait" page") ... i have pagePhaseListener, my own afterPageLoad() method is invoked at right time.
    System.out.println("afterPageLoad");
    Object retVal = cmdLink.getAction().invoke(FacesContext.getCurrentInstance(),null);
    System.out.println("afterPageLoad end- "+retVal);
    But when i try invoke commandLink action from this method, it is not invoked, even debugging message after this call is not processed, no exception is thrown..
    What am i doing wrong? thanks a lot for any help
    Tomas

    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Test extends JFrame {
        public Test() {
         setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
         Container content = getContentPane();
         JButton jb = new JButton("DO NOT PRESS");
         jb.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent ae) {
              doFirstThing();
              doSecondThing();
         content.add(jb, BorderLayout.SOUTH);
         setSize(200,200);
         show();
        private void doFirstThing() { System.out.println("I'm doin mah thing!"); }
        private void doSecondThing() { System.out.println("I wanna go first!"); }
        public static void main( String args[] ) { new Test(); }
    }If you want something different from this, you are going to have to explain more.

  • PL/SQL Call Back function is never called

    Hi, I have a AQ set to run a PL/SQL Call Back procedure, but the procedure is never called.
    Oracle version is 11.2.0.2 Standard Edition
    When I query aq$<queue>, the MSG_STATE column is always "ready".
    This is the queue creation script
    begin
      DBMS_AQADM.CREATE_QUEUE_TABLE ( queue_table => 'POLERMESSAGE',
                                      queue_payload_type => 'POLER_MESSAGE',
                                      multiple_consumers => TRUE );
      DBMS_AQADM.CREATE_QUEUE( queue_name => 'POLER_QUEUE',
                               queue_table => 'POLERMESSAGE');
      dbms_aqadm.add_subscriber( queue_name => 'POLER_QUEUE',
                                 subscriber => sys.aq$_agent( 'POLER_RECIPIENT', null, null ) );    
      dbms_aq.register ( sys.aq$_reg_info_list( sys.aq$_reg_info('POLER_QUEUE:POLER_RECIPIENT',
                                                                 dbms_aq.namespace_aq,
                                                                 'plsql://tr',
                                                                 HEXTORAW('FF')) ) ,
                           1 );    
      DBMS_AQADM.START_QUEUE(queue_name => 'POLER_QUEUE');    
    end;
    /This is the content of "tr" procedure
    create or replace
    procedure tr ( context raw,
                           reginfo sys.aq$_reg_info,
                           descr sys.aq$_descriptor,
                           payload raw,
                           payloadl number)
    as
      dequeue_options dbms_aq.dequeue_options_t;
      message_properties dbms_aq.message_properties_t;
      message_handle RAW(16);
      message poler_message;
    BEGIN
      dequeue_options.msgid := descr.msg_id;
      dequeue_options.consumer_name := descr.consumer_name;
      DBMS_AQ.DEQUEUE(queue_name => descr.queue_name,
                      dequeue_options => dequeue_options,
                      message_properties => message_properties,
                      payload => message,
                      msgid => message_handle);
      insert into lxtr values ( Nvl( To_Char(message.PolerMsgNro ), 'ooops' ), systimestamp ) ;
      commit ;
    end tr;If I query sys.reg$, I see it registered there:
    SQL> select subscription_name, location_name, status, state from sys.reg$;
    SUBSCRIPTION_NAME
    LOCATION_NAME
       STATUS     STATE
    "SPARCS"."POLER_QUEUE":"POLER_RECIPIENT"
    plsql://tr
            0         0I was working, until I re-compiled (don't ask...) the trigger that enqueue the message
    This is the section of the trigger (post insert for each row) that do the enqueuing. It seems to be working, since it is enqueuing. The issue is the dequeue.
    DECLARE
      enqueue_options dbms_aq.enqueue_options_t;
      message_properties dbms_aq.message_properties_t;
      message_handle RAW(16);
      message poler_message;
      err varchar2(2000);
    BEGIN
        message := poler_message(PolerMsgId,  PolerMsgNro );
        dbms_aq.enqueue(queue_name => 'POLER_QUEUE',
                        enqueue_options => enqueue_options,
                        message_properties => message_properties,
                        payload => message,
                        msgid => message_handle);
    END;If I run the code below, message is cleanly dequeued
    declare
      dequeue_options      dbms_aq.dequeue_options_t;
      message_properties   dbms_aq.message_properties_t;
      message_handle       RAW(16);
      message              poler_message;
    BEGIN
      dequeue_options.consumer_name := 'POLER_RECIPIENT' ;
      dbms_aq.dequeue( queue_name => 'POLER_QUEUE',
                       dequeue_options       => dequeue_options,
                       message_properties    => message_properties,
                       payload               => message,
                       msgid                 => message_handle);
      COMMIT;
    END ;Can anyone please give me any hints on what should I do next. There is nothing on the alert log...
    Thank you in advance,
    Tiago

    1) Very few PL/SQL programmers would consider it good form to have procedures with excessive numbers of parameters. In any language, though, it's possible to write poor code.
    2) Initially, you're right-- the performance of properly defined SQL statements via JDBC is little different than the performance of PL/SQL stored procedures. Frequently, however, SQL statements in Java applications do not take advantage of bind variables, which will significantly limit their scalability. Maintaining SQL statements in client applications makes it significantly more difficult on the support side-- if you find a bug in a stored procedure, you can fix the bug in one place-- if you find a bug in embedded SQL, you have to fix the code everywhere the client is deployed. Maintaining PL/SQL stored procedures also makes optimization easier-- frequently your DBA will be able to boil down a stored procedure to a couple of SQL statements and vastly improve performance (i.e. INSERT INTO <<table name>> SELECT <<column list>> from <<other table>> rather than looping over a cursor doing single-row inserts). Finally, PL/SQL stored procedures enable reuse-- when the next application wants to access the database, it doesn't have to rewrite your SQL.
    3) If the alternative to the bind variables (?'s) is a bunch of literals, I'll spend the extra time writing the code for the tremendous increase in scalability.
    4-6) You can certainly pass classes from Java to PL/SQL and back. You can also write Java stored procedures, rather than writing PL/SQL stored procedures). Oracle has been one of the leading proponents of Java.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • NamespaceContext.getPrefix() never called

    I am a newbie in the Java XML world.
    Here is my issue and the snippet of code is used to explain the problem:
    XPathVariableResolver jxvr = new JSTLXPathVariableResolver(pageContext);
    Node contextNode = adaptParamsForXalan(n, xpathString.trim(), jxvr);
    XPath xpath = XPathFactory.newInstance().newXPath();
    xpath.setNamespaceContext(jstlXPathNamespaceContext); //jstlXPathNamespaceContext is
    // initialized somewhere else
    xpath.setXPathVariableResolver(jxvr);
    Now when the xpath is evaluated using:
    xpath.evaluate(xpathString, contextNode);
    Under the debugger I can see that this call eventually calls the getNamespaceURI() method
    of JSTLXPathNamespaceContext (class for jstlXPathNamespaceContext) and then after that
    I land up at the resolveVariable(QName qname) call of JSTLXPathVariableResolver.
    What I notice in resolveVariable() call is that qname.getPrefix() is always an empty string. However, qname.getNamespaceURI() returns the proper URI string. In addition, prior to reaching resolveVariable() in JSTLXPathVariableResolver, I do see that the getNamespaceURI() method
    is being called in JSTLXPathNamespaceContext class. However, getPrefix() method of this
    class is never called. My instinct says that if this was called before resolveVariable() method is
    reached (during the creation of QName) I would get a valid prefix instead of an empty string.
    Could someone help with this. Is there something that I am doing wrong. Where does QName
    get created in resolveVariable() and why does it not call getPrefix()
    Please let me know if I can provide more info
    Thanks in advance
    -Dhiru

    The installer extension isn't removed with the application. It still can be found in Java Cache Viewer. When you remove this extension using Java Cache Viewer the uninstall method will be called.
    Is there a way to force the extension uninstallation when the main application is being removed? Removing the very application is user-friendly, you can do it from the Control Panel in Windows. It looks like JWS is missing a very important feature.
    I'm using Java 1.6.0_03 right now.

  • [svn] 3937: FxContainer fix to make sure partRemoved/ partAdded are never called with a null instance.

    Revision: 3937
    Author: [email protected]
    Date: 2008-10-28 17:37:25 -0700 (Tue, 28 Oct 2008)
    Log Message:
    FxContainer fix to make sure partRemoved/partAdded are never called with a null instance. In this case, in clearSkinParts(), we would call partRemoved() on all parts, whether they were there or not. This was causing a Thermo bug.
    ASDoc fixes for Group, FxContainer, and FxDataContainer. Removing content property from ASDocs...this is not the recommended way to add items/remove items to Group/FxContainer. You should use the addItem/removeItem APIs. This is consistent with Flash Player and Halo. Under the hood someone can still set the content array, but it's discouraged because you could set two Groups to the same content array, which is hard to detect. Also, made currentContentGroup in FxContainer mx_internal...this is an implementation detail for us and something we may change later on. I also added some other ASDoc cleanups and fixes.
    QE Notes: Ran checkintests and Mustella tests for gumbo/core/ and gumbo/components/FxDataContainer. Joann is updatating the one test that failed. WHen verifying SDK-17750, please also verify Thermo bug SDK-17800.
    Doc Notes: This change includes ASDoc changes
    Bugs: SDK-17750, SDK-17741, SDK-17756
    Reviewer: Glenn
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17750
    http://bugs.adobe.com/jira/browse/SDK-17800
    http://bugs.adobe.com/jira/browse/SDK-17750
    http://bugs.adobe.com/jira/browse/SDK-17741
    http://bugs.adobe.com/jira/browse/SDK-17756
    Modified Paths:
    flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/components/FxContainer.as
    flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/components/FxDataContainer .as
    flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/components/Group.as
    flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/components/baseClasses/FxC omponent.as

    Revision: 3937
    Author: [email protected]
    Date: 2008-10-28 17:37:25 -0700 (Tue, 28 Oct 2008)
    Log Message:
    FxContainer fix to make sure partRemoved/partAdded are never called with a null instance. In this case, in clearSkinParts(), we would call partRemoved() on all parts, whether they were there or not. This was causing a Thermo bug.
    ASDoc fixes for Group, FxContainer, and FxDataContainer. Removing content property from ASDocs...this is not the recommended way to add items/remove items to Group/FxContainer. You should use the addItem/removeItem APIs. This is consistent with Flash Player and Halo. Under the hood someone can still set the content array, but it's discouraged because you could set two Groups to the same content array, which is hard to detect. Also, made currentContentGroup in FxContainer mx_internal...this is an implementation detail for us and something we may change later on. I also added some other ASDoc cleanups and fixes.
    QE Notes: Ran checkintests and Mustella tests for gumbo/core/ and gumbo/components/FxDataContainer. Joann is updatating the one test that failed. WHen verifying SDK-17750, please also verify Thermo bug SDK-17800.
    Doc Notes: This change includes ASDoc changes
    Bugs: SDK-17750, SDK-17741, SDK-17756
    Reviewer: Glenn
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17750
    http://bugs.adobe.com/jira/browse/SDK-17800
    http://bugs.adobe.com/jira/browse/SDK-17750
    http://bugs.adobe.com/jira/browse/SDK-17741
    http://bugs.adobe.com/jira/browse/SDK-17756
    Modified Paths:
    flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/components/FxContainer.as
    flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/components/FxDataContainer .as
    flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/components/Group.as
    flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/components/baseClasses/FxC omponent.as

  • Java.sql.SQLException: execute() never called java.sql.SQLException: execut

    Hi,
    I am having problem in with depolying application developed using creator on Tomcat5.0. I am using sybase for connection
    MY JNDI settigns are correct. I have tried using
    1. Sun creator drvier class
    or
    2. JConnection6_0
    But am having no luck so far.
    Here is the stack trace
    java.sql.SQLException: execute() never called
    at com.sun.sql.rowset.CachedRowSetXImpl.checkExecuted(CachedRowSetXImpl.java:269)
    at com.sun.sql.rowset.CachedRowSetXImpl.next(CachedRowSetXImpl.java:1423)
    at webreporting.security.LoginValidator.authorizeUser(LoginValidator.java:61)
    at webreporting.Page1.button1_action(Page1.java:308)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
    at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
    at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.
    at javax.faces.component.UICommand.broadcast(UICommand.java:312)
    at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
    at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
    at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
    at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
    at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChai
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:1

    java.sql.SQLException: execute() never called
    at com.sun.sql.rowset.CachedRowSetXImpl.checkExecuted(CachedRowSetXImpl.java:269)
    at com.sun.sql.rowset.CachedRowSetXImpl.next(CachedRowSetXImpl.java:1423)
    at webreporting.security.LoginValidator.authorizeUser(LoginValidator.java:61)You can't call cachedRowSet.next() until after you've executed your query. That's what the stack trace seems to say.
    cachedRowSet.execute() retrieves the rows from the database.
    next() lets you interate through the retrieved rows (aka the ResultSet).

  • GetMethods from AuthoringScope is never called

    There are two threads on the theme:
    "I'm working on MPF package containing the language service. I need to implement MethodTips feature.
    I've created the class inherited from the AuthoringScope class from MPF and override following methods:
    GetDataTipText, GetDeclarations, GetMethods, Goto.
    All of these except GetMethods are called ok but GetMethods is never called. "
    I did as described in these threads (call the 4 methods StartName, ...) but it did not work until...
    ProvideLanguageService(typeof(PRLangServ),
    "PR Language",
                                 106,            
    // resource ID of localized language name
                                 CodeSense =
    true,            
    // Supports IntelliSense
                                 RequestStockColors =
    true,  
    // Supplies custom colors
                                 EnableCommenting =
    true,     
    // Supports commenting out code
                                 EnableAsyncCompletion =
    false, 
    // Supports background parsing
                                 AutoOutlining=
    true
    If I put EnableAsyncCompletion to true, GetMethods will never be called, if I put it as false, then it will be called.
    Why ??? Can it be considered like a bug?

    Hi philoroussel2,
    I'm not sure how this method works, I'm going to involve someone else into your case. At the same time, you can submit a feedback here for the VS product team, they might give you a good explanation about this problem.
    https://connect.microsoft.com/VisualStudio
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • PDImageSelectAlternate "is obsolete and never called in Acrobat 8". How switch to alternate images?

    PDImageSelectAlternate "is obsolete and never called in Acrobat 8". Then how can I switch to alternate images to display in Acrobat 8 and 9?

    The goal is to speed up screen redraw (using low resolution proxies). High-end prepress software usually provide option to generate alternate images while "normalizing" incoming PDFs. And (at least) Enfocus Pitstop can switch on/off their display in Acrobat 8 and later. The question is how they do it, if PDImageSelectAlternate "is never called". Well, I chose this subject as practice for my first plugin, because it seemed to me straightforward and simple. It looks like I was wrong.

Maybe you are looking for

  • File opening from jsp

    Hello, I have a file in the server's hard disk. A I have jsp with the link to the file. I'd like to file be opend with the standard windows application after clicking on the link. How could I realize this? What kind of file link I need? Thanks, Ljosi

  • Runtime error using range table in select query

    I have to select tcodes from table tstc, based on the entries in ust12, the entries in ust12-von and ust12-bis, these contains wild charcters also,  and i have to selct all the tcodes  from von to bis. so ia m preparing a range table for the entries

  • Firing an external app from flash and pass parameters

    Hi all, I need to fire an exe from flash projector and pass it a lot of parameters(need to regenerate an image). Could someone tell me what would be the best solution for this... can I make a php executable which could use all the gd functions? If ye

  • Reflections option grayed out

    No matter what kind of object or image I put in a blank canvas the Reflections option is grayed out. Pages 3, iWork '08 SJAllan

  • Weblogic class corresponding to HTTPSession

    I am looking at a stress issue and wanted to know which weblogic class corresponds to a HTTPSession. I see the follwoing in my heap dump. Is it one of these classes or anything else? Class Name | Objects | Shallow Heap | Retained Heap weblogic.servle