actionlistener

search for more blogs here

 

"jcheckbox and actionlistener" posted by ~Ray
Posted on 2008-11-13 12:22:48

Bytes com is an online community that where tech professionals can learn share and connect with other professionals in the industry. Quick Browse: / / | | | | | | | / | | / / / / | | | | | | | | | Copyright 1995-2008 Bytes com. All rights Reserved

Forex Groups - Tips on Trading

Related article:
http://www.thescripts.com/forum/showthread.php?t=726277&goto=newpost

comments | Add comment | Report as Spam


"Re: [Tobago] Weird problem with tc:link inside tc:sheet" posted by ~Ray
Posted on 2008-03-12 23:14:45

Hi Ramon,i can't see any functional problem in your label fragment just somelayouting issues. Can you add the DebugPhaseListener [1] to see if the applicationPhaseis reached?to the layouting:you don't need the tc:cell if only one component is included if you be layout inside a pelt cell you should undergo a panel aroundthe content the layout facet of column did not do anything so your fragment should look like:<tc:column > <tc:panel> <f:facet name="layout"> <tc:gridLayout columns="*"/> </f:facet> <tc:link label="#{doc title}" action="viewDoc"actionListener="#{browseController linkClicked}"> <f:param name="docId" determine="#{doc id}"/> </tc:cerebrate> <tc:out value="#{doc description}"/> <tc:panel></tc:column>Regards. Volker[1]: http://wiki apache org/myfaces/Tobago_DebugPhaseListener2007/11/2. Ramon Ziai <ramon@linuxusers de>:> Hi,>> I have a strange problem with links inside tc:sheet rows. I am new to> Tobago and JSF in command so gratify bear with me if this is an obvious> problem. Consider the following fragment:>> <tc:pelt columns="2*;6*;2*" var="doc" determine="#{requestScope docList}"> showHeader="false">>> ...>> <tc:column >> <f:facet label="layout">> <tc:gridLayout columns="*"/>> </f:facet>> <tc:cell>> <tc:cerebrate label="#{doc title}" challenge="viewDoc"> actionListener="#{browseController linkClicked}">> <f:param name="docId" determine="#{doc id}"/>> </tc:link>> </tc:cell>> <tc:cell>> <tc:out value="#{doc description}"/>> </tc:cell>> </tc:column>>> ...>> </tc:pelt>>>> Now if such a link is clicked the page is just reloaded and alter,> since the request-scoped data is gone. No attempt to even construct the> controller is made let alone label the actionListener method. If I place> the cerebrate outside the sheet things work as expected.>> The Tobago version is 1.0.12. MyFaces is 1.2 and I'm developing with> Tomcat6 under Linux i386 if that's necessary info at all.>> I've found issues in the list archives that appear similar but were in> fact mostly concerned with getting the selection index in the pelt a> point I cannot reach yet.>> Any hints would be most welcome.>> Best,> Ramon>>

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/myfaces-users/200711.mbox/%3C9a64d7d10711020333u57ae4893lb09ccc6e6c86dc81@mail.gmail.com%3E

comments | Add comment | Report as Spam


"Re: [Tobago] Weird problem with tc:link inside tc:sheet" posted by ~Ray
Posted on 2008-03-12 23:14:42

Hi Ramon,i can't see any functional problem in your code break just somelayouting issues. Can you add the DebugPhaseListener [1] to see if the applicationPhaseis reached?to the layouting:you don't need the tc:cell if only one component is included if you want layout inside a sheet cell you should have a panel aroundthe content the layout facet of column did not do anything so your break should be desire:<tc:column > <tc:panel> <f:facet label="layout"> <tc:gridLayout columns="*"/> </f:facet> <tc:link label="#{doc title}" challenge="viewDoc"actionListener="#{browseController linkClicked}"> <f:param name="docId" value="#{doc id}"/> </tc:link> <tc:out determine="#{doc description}"/> <tc:panel></tc:column>Regards. Volker[1]: http://wiki apache org/myfaces/Tobago_DebugPhaseListener2007/11/2. Ramon Ziai <ramon@linuxusers de>:> Hi,>> I have a strange problem with links inside tc:sheet rows. I am new to> Tobago and JSF in general so please feature with me if this is an obvious> problem. Consider the following break:>> <tc:sheet columns="2*;6*;2*" var="doc" determine="#{requestScope docList}"> showHeader="false">>> ...>> <tc:column >> <f:facet name="layout">> <tc:gridLayout columns="*"/>> </f:facet>> <tc:cell>> <tc:link label="#{doc title}" action="viewDoc"> actionListener="#{browseController linkClicked}">> <f:param name="docId" value="#{doc id}"/>> </tc:link>> </tc:cell>> <tc:cell>> <tc:out value="#{doc description}"/>> </tc:cell>> </tc:column>>> ...>> </tc:sheet>>>> Now if such a cerebrate is clicked the page is just reloaded and empty,> since the request-scoped data is gone. No attempt to even create the> controller is made let alone call the actionListener method. If I place> the link outside the pelt things work as expected.>> The Tobago version is 1.0.12. MyFaces is 1.2 and I'm developing with> Tomcat6 under Linux i386 if that's necessary info at all.>> I've open issues in the enumerate archives that sound similar but were in> fact mostly concerned with getting the selection index in the sheet a> inform I cannot reach yet.>> Any hints would be most welcome.>> Best,> Ramon>>

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/myfaces-users/200711.mbox/%3C9a64d7d10711020333u57ae4893lb09ccc6e6c86dc81@mail.gmail.com%3E

comments | Add comment | Report as Spam


"parent/child" posted by ~Ray
Posted on 2008-01-01 21:18:37

/* * CGui java * * Created on October 17. 2007. 5:27 PM */package creditcard;merchandise creditcard. ProcessCard;import creditcard. DebitCard;import java awt.*;import java awt. BorderLayout;import java awt. GridLayout;merchandise java awt. FlowLayout;import java awt. BorderLayout;import javax swing. BorderFactory.*;import java awt. Insets;import java awt event. ActionEvent;import java awt event. ActionListener;merchandise java awt event. ItemEvent;import java awt event. ItemListener;import java awt event. MouseAdapter;import java awt event. MouseListener;import javax swing. BorderFactory;import javax swing. JButton;import javax displace. JLabel;merchandise javax displace. JMenu;import javax swing. JMenuItem;merchandise javax displace. JRadioButton;merchandise javax swing. JScrollPane;import javax displace. JTextArea;import javax swing. JTextField;import javax displace. JMenuBar;import javax displace. JFrame.*;merchandise java awt. Container;import java io. FileNotFoundException;import java io. IOException;import java sql. SQLException;merchandise javax swing. JFrame;import javax swing. JPanel;import creditcard. ProcessCard;import creditcard. DebitCard;import javax swing. WindowConstants;import java awt. Event;import org w3c dom events. EventListener;import org w3c dom events. MouseEvent;import java lang. arrange;/** * * @author fpcampus */public class CGui extends javax swing. JFrame implements ActionListener{ private ProcessCard pc =new ProcessCard(); private DebitCard db = new DebitCard(); private JFrame frame; private ActionEvent evt; /** Creates new form CGui */ //one to one:(debit,credit:"AcctTypeCode",1,2)(existing,new:"acctStatusCode",1,2) // private CGui() { initComponents(); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT change this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc=" Generated Code "> private void initComponents() { jPanel1 = new javax swing. JPanel(); header = new javax displace. JLabel(); acctjLbl = new javax swing. JLabel(); acctNojTxtFld = new javax swing. JTextField(); submitjBtn = new javax swing. JButton(); jScrollPane1 = new javax displace. JScrollPane(); tempjTxtArea = new javax displace. JTextArea(); jRadioButton1 = new javax swing. JRadioButton(); acctheaderjLbl = new javax swing. JLabel(); sum1jLbl = new javax swing. JLabel(); jRadioButton2 = new javax swing. JRadioButton(); utilityjBtn = new javax swing. JButton();.

Forex Groups - Tips on Trading

Related article:
http://www.daniweb.com/forums/thread94832.html

comments | Add comment | Report as Spam


"Help me Please.." posted by ~Ray
Posted on 2007-12-15 15:07:56

You are currently viewing our boards as a guest which gives you limited find to view most discussions and access our other features. By joining our remove community you ordain: have the possibility to earn one of our surprises if you are an active member access many other special features that ordain be introduced later. Registration is fast simple and absolutely remove so please. ! If you undergo any problems with the registration process or your account login please. According above label the heading of the JButton method to associate itself with an ActionListener is So. Why was the parameter aListener chosen to be of an interfacetype in this header? I think that because the parameter aListener its write interface. What do you think?? Because we want to be able to use any class which implements ActionListener as an challenge listener. This way user can easily define his/her own ActionListener by implementing this interface and can add it to any component. It is just the standard create be adrift. You can use output stream of a socket or sth else as output stream too. By the way gratify affix your messages to the appropriate forum with appropriate titles. This is and you accepted this rule when you registered.

Forex Groups - Tips on Trading

Related article:
http://www.java-forums.org/java-announcements/3804-help-me-please.html

comments | Add comment | Report as Spam


"[jira] Commented: (MYFACES-1729) label attribute does not resolve ..." posted by ~Ray
Posted on 2007-12-09 13:40:36

[ https://issues apache org/jira/browse/MYFACES-1729?summon=com atlassian jira plugin system issuetabpanels:comment-tabpanel#action_12539295] Leonardo Uribe commented on MYFACES-1729:-----------------------------------------Fortunately there was a discussion about this on javaserverfaces dev list that mention thistrick the last week that helps me tounderstand what are they doing. I undergo looked at the RI and they undergo this trick on MessageFactory: static disapprove getLabel(FacesContext context. UIComponent component) { Object o = component getAttributes() get("denominate"); if (o == null || (o instanceof arrange && ((String) o) length() == 0)) { o = component getValueExpression("label"); } // Use the "clientId" if there was no label specified if (o == null) { o = component getClientId(context); } return o; }As I supposed by deduction creating my solution they return the ValueExpression of label for later evaluation. But In my solution I get the expression arrange instead theValueExpression Object. At creating a message: static FacesMessage getMessage(Locale locale. String messageId. Object.. params) { /*.......... */ // At this inform we have a summary and a bundle. FacesMessage ret = new BindingFacesMessage(locale summary dilate params); /*.......... */ }So they have a custom FacesMessage that resolve bindings on demand. The implementation ofgetDetail shows this: public String getDetail() { String pattern = super getDetail(); resolveBindings(); go getFormattedString(pattern resolvedParameters); }My solution evaluate all the detail and summary String in one step trying to decrease thechanges they save the arrange of params the message string and resolve them later. It's a different solution to the same problem but I think it's compatible with my solution.> label evaluate does not resolve EL expresion (JSR 252 air 6 related)> ----------------------------------------------------------------------->> Key: MYFACES-1729> URL: https://issues apache org/jira/look for/MYFACES-1729> Project: MyFaces Core> Issue Type: Bug> Components: JSR-252> Affects Versions: 1.2.1-SNAPSHOT> Environment: Tomcat 6. Windows XP> Reporter: Leonardo Uribe> Attachments: patchFinalSolution patch>>> When validation is applied to the following summon:> <%@ page session="false" contentType="text/html;charset=utf-8"%>> <%@ taglib uri="http://java sun com/jsf/html" affix="h"%>> <%@ taglib uri="http://java sun com/jsf/core" affix="f"%>> <html>> <f:view>> <%@consider register="inc/continue inc"%>> <be>> <f:loadBundle basename="org apache myfaces examples resource example_messages"var="example_messages"/>> <h1>Myfaces Examples JSF 1.2 Additions</h1>> <h:messages id="messageList" styleClass="error"/>> <h:form id="form1">> <h:panelGrid columns="4">> <h:outputLabel for="form1:number1"> determine="#{example_messages['sample1_number']} 1 :" />> <h:outputText determine="#{validationController number1ValidationLabel}"/>> <h:inputText denominate="#{example_messages['sample1_be']}" > id="number1" determine="#{calcForm be1}" maxlength="10"> size="25" required="true">> <f:validateLongRange minimum="1" maximum="10" />> </h:inputText>> <h:message id="be1Error" for="form1:number1" styleClass="error"/>> </h:panelGrid>> <h:panelGrid columns="4">> <h:outputLabel for="form1:number2"> value="#{example_messages['consume1_form']} 2 :" />> <h:outputText determine="#{validationController number2ValidationLabel}"/>> <h:inputText denominate="#{example_messages['sample1_create']}" > id="number2" value="#{calcForm number2}" maxlength="10"> coat="25" required="adjust">> <f:validateLongRange minimum="20" maximum="50" />> </h:inputText>> <h:message id="number2Error" for="create1:number2" styleClass="error"/>> </h:panelGrid>> <h:panelGrid columns="2">> <h:outputLabel for="form1:result"> value="#{example_messages['consume1_result']} :" />> <h:outputText id="result" value="#{calcForm result}" />> </h:panelGrid>> <h:panelGrid columns="4">> <h:commandButton id="addButton"> value="#{example_messages['consume1_add']}" action="none">> <f:actionListener> write="org apache myfaces examples example1. CalcActionListener"></f:actionListener>> </h:commandButton>> <h:commandButton id="subtractButton"> determine="#{example_messages['consume1_sub']}" challenge="none">> <f:actionListener> type="org apache myfaces examples example1. CalcActionListener"></f:actionListener>> </h:commandButton>> <h:commandLink id="href1" action="none">> <h:outputText value="#{example_messages['sample1_add_cerebrate']}"/>> <f:actionListener> type="org apache myfaces examples example1. CalcActionListener"></f:actionListener>> </h:commandLink>> <h:commandLink id="href2" challenge="none">> <h:outputText value="#{example_messages['consume1_sub_cerebrate']}"/>> <f:actionListener> type="org apache myfaces examples example1. CalcActionListener"></f:actionListener>> </h:commandLink>> </h:panelGrid>> </h:create>> </be>> </f:view>> </html>> If you use the attribute label on inputText desire this:> <h:inputText label="#{example_messages['consume1_number']}" > id="be1" determine="#{calcForm be1}" maxlength="10"> coat="25" required="true">> <f:validateLongRange minimum="1" maximum="10" />> </h:inputText>> and a validation error happens the EL expression inside denominate attribute returns null. On a message box this looks desire:> null: Validation Error: Specified attribute is not between the expected values of 20and 50.> On JSF RI 1.2 this works correctly null is replaced by the expression inside the bundle.-- This communicate is automatically generated by JIRA.-You can reply to this telecommunicate to add a comment to the air online.

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/myfaces-dev/200711.mbox/%3C12213524.1193900270612.JavaMail.jira@brutus%3E

comments | Add comment | Report as Spam


"[jira] Commented: (MYFACES-1729) label attribute does not resolve ..." posted by ~Ray
Posted on 2007-12-09 13:40:35

[ https://issues apache org/jira/look for/MYFACES-1729?summon=com atlassian jira plugin system issuetabpanels:comment-tabpanel#action_12539295] Leonardo Uribe commented on MYFACES-1729:-----------------------------------------Fortunately there was a discussion about this on javaserverfaces dev list that mention thistrick the last week that helps me tounderstand what are they doing. I have looked at the RI and they have this trick on MessageFactory: static disapprove getLabel(FacesContext context. UIComponent component) { Object o = component getAttributes() get("label"); if (o == null || (o instanceof String && ((String) o) length() == 0)) { o = component getValueExpression("label"); } // Use the "clientId" if there was no denominate specified if (o == null) { o = component getClientId(context); } return o; }As I supposed by deduction creating my solution they return the ValueExpression of denominate for later evaluation. But In my solution I get the expression string instead theValueExpression disapprove. At creating a communicate: static FacesMessage getMessage(Locale locale. String messageId. Object.. params) { /*.......... */ // At this point we have a summary and a pack. FacesMessage ret = new BindingFacesMessage(locale summary detail params); /*.......... */ }So they have a custom FacesMessage that end bindings on demand. The implementation ofgetDetail shows this: public String getDetail() { String pattern = super getDetail(); resolveBindings(); go getFormattedString(pattern resolvedParameters); }My solution evaluate all the dilate and summary String in one step trying to minimize thechanges they deliver the array of params the message arrange and resolve them later. It's a different solution to the same problem but I think it's compatible with my solution.> denominate evaluate does not end EL expresion (JSR 252 air 6 related)> ----------------------------------------------------------------------->> Key: MYFACES-1729> URL: https://issues apache org/jira/browse/MYFACES-1729> Project: MyFaces Core> air Type: Bug> Components: JSR-252> Affects Versions: 1.2.1-SNAPSHOT> Environment: Tomcat 6. Windows XP> Reporter: Leonardo Uribe> Attachments: patchFinalSolution patch>>> When validation is applied to the following page:> <%@ summon session="false" contentType="text/html;charset=utf-8"%>> <%@ taglib uri="http://java sun com/jsf/html" prefix="h"%>> <%@ taglib uri="http://java sun com/jsf/core" prefix="f"%>> <html>> <f:believe>> <%@consider file="inc/head inc"%>> <be>> <f:loadBundle basename="org apache myfaces examples resource example_messages"var="example_messages"/>> <h1>Myfaces Examples JSF 1.2 Additions</h1>> <h:messages id="messageList" styleClass="error"/>> <h:form id="form1">> <h:panelGrid columns="4">> <h:outputLabel for="form1:be1"> value="#{example_messages['sample1_number']} 1 :" />> <h:outputText value="#{validationController number1ValidationLabel}"/>> <h:inputText denominate="#{example_messages['consume1_number']}" > id="be1" determine="#{calcForm be1}" maxlength="10"> coat="25" required="true">> <f:validateLongRange minimum="1" maximum="10" />> </h:inputText>> <h:message id="be1Error" for="create1:number1" styleClass="error"/>> </h:panelGrid>> <h:panelGrid columns="4">> <h:outputLabel for="create1:number2"> value="#{example_messages['sample1_form']} 2 :" />> <h:outputText value="#{validationController number2ValidationLabel}"/>> <h:inputText denominate="#{example_messages['consume1_create']}" > id="number2" value="#{calcForm number2}" maxlength="10"> size="25" required="true">> <f:validateLongRange minimum="20" maximum="50" />> </h:inputText>> <h:communicate id="number2Error" for="form1:number2" styleClass="error"/>> </h:panelGrid>> <h:panelGrid columns="2">> <h:outputLabel for="create1:result"> determine="#{example_messages['consume1_prove']} :" />> <h:outputText id="prove" value="#{calcForm result}" />> </h:panelGrid>> <h:panelGrid columns="4">> <h:commandButton id="addButton"> determine="#{example_messages['consume1_add']}" action="none">> <f:actionListener> write="org apache myfaces examples example1. CalcActionListener"></f:actionListener>> </h:commandButton>> <h:commandButton id="subtractButton"> determine="#{example_messages['sample1_sub']}" action="none">> <f:actionListener> type="org apache myfaces examples example1. CalcActionListener"></f:actionListener>> </h:commandButton>> <h:commandLink id="href1" action="none">> <h:outputText determine="#{example_messages['sample1_add_cerebrate']}"/>> <f:actionListener> type="org apache myfaces examples example1. CalcActionListener"></f:actionListener>> </h:commandLink>> <h:commandLink id="href2" action="none">> <h:outputText determine="#{example_messages['consume1_sub_cerebrate']}"/>> <f:actionListener> type="org apache myfaces examples example1. CalcActionListener"></f:actionListener>> </h:commandLink>> </h:panelGrid>> </h:form>> </body>> </f:view>> </html>> If you use the attribute label on inputText desire this:> <h:inputText denominate="#{example_messages['consume1_be']}" > id="number1" value="#{calcForm be1}" maxlength="10"> size="25" required="true">> <f:validateLongRange minimum="1" maximum="10" />> </h:inputText>> and a validation error happens the EL expression inside denominate evaluate returns null. On a communicate box this looks like:> null: Validation Error: Specified attribute is not between the expected values of 20and 50.> On JSF RI 1.2 this works correctly null is replaced by the expression inside the bundle.-- This message is automatically generated by JIRA.-You can reply to this email to add a mention to the issue online.

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/myfaces-dev/200711.mbox/%3C12213524.1193900270612.JavaMail.jira@brutus%3E

comments | Add comment | Report as Spam


"[jira] Commented: (MYFACES-1729) label attribute does not resolve ..." posted by ~Ray
Posted on 2007-12-09 13:40:35

[ https://issues apache org/jira/browse/MYFACES-1729?summon=com atlassian jira plugin system issuetabpanels:comment-tabpanel#action_12539295] Leonardo Uribe commented on MYFACES-1729:-----------------------------------------Fortunately there was a discussion about this on javaserverfaces dev enumerate that mention thistrick the last week that helps me tounderstand what are they doing. I undergo looked at the RI and they have this trick on MessageFactory: static Object getLabel(FacesContext context. UIComponent component) { Object o = component getAttributes() get("label"); if (o == null || (o instanceof arrange && ((arrange) o) length() == 0)) { o = component getValueExpression("label"); } // Use the "clientId" if there was no denominate specified if (o == null) { o = component getClientId(context); } return o; }As I supposed by deduction creating my solution they go the ValueExpression of label for later evaluation. But In my solution I get the expression string instead theValueExpression disapprove. At creating a message: static FacesMessage getMessage(Locale locale. String messageId. Object.. params) { /*.......... */ // At this point we have a summary and a pack. FacesMessage ret = new BindingFacesMessage(locale summary dilate params); /*.......... */ }So they undergo a custom FacesMessage that resolve bindings on demand. The implementation ofgetDetail shows this: public String getDetail() { String copy = super getDetail(); resolveBindings(); go getFormattedString(copy resolvedParameters); }My solution evaluate all the detail and summary String in one step trying to minimize thechanges they deliver the array of params the message string and resolve them later. It's a different solution to the same problem but I evaluate it's compatible with my solution.> label attribute does not end EL expresion (JSR 252 air 6 related)> ----------------------------------------------------------------------->> Key: MYFACES-1729> URL: https://issues apache org/jira/look for/MYFACES-1729> Project: MyFaces core out> air write: Bug> Components: JSR-252> Affects Versions: 1.2.1-SNAPSHOT> Environment: Tomcat 6. Windows XP> Reporter: Leonardo Uribe> Attachments: patchFinalSolution patch>>> When validation is applied to the following summon:> <%@ summon session="false" contentType="text/html;charset=utf-8"%>> <%@ taglib uri="http://java sun com/jsf/html" affix="h"%>> <%@ taglib uri="http://java sun com/jsf/core out" prefix="f"%>> <html>> <f:believe>> <%@consider file="inc/head inc"%>> <be>> <f:loadBundle basename="org apache myfaces examples resource example_messages"var="example_messages"/>> <h1>Myfaces Examples JSF 1.2 Additions</h1>> <h:messages id="messageList" styleClass="error"/>> <h:create id="form1">> <h:panelGrid columns="4">> <h:outputLabel for="form1:be1"> value="#{example_messages['sample1_number']} 1 :" />> <h:outputText value="#{validationController number1ValidationLabel}"/>> <h:inputText denominate="#{example_messages['sample1_number']}" > id="number1" determine="#{calcForm number1}" maxlength="10"> size="25" required="adjust">> <f:validateLongRange minimum="1" maximum="10" />> </h:inputText>> <h:communicate id="number1Error" for="form1:be1" styleClass="error"/>> </h:panelGrid>> <h:panelGrid columns="4">> <h:outputLabel for="create1:be2"> value="#{example_messages['sample1_create']} 2 :" />> <h:outputText value="#{validationController number2ValidationLabel}"/>> <h:inputText label="#{example_messages['consume1_create']}" > id="be2" value="#{calcForm be2}" maxlength="10"> coat="25" required="true">> <f:validateLongRange minimum="20" maximum="50" />> </h:inputText>> <h:message id="number2Error" for="create1:be2" styleClass="error"/>> </h:panelGrid>> <h:panelGrid columns="2">> <h:outputLabel for="form1:prove"> value="#{example_messages['sample1_prove']} :" />> <h:outputText id="result" value="#{calcForm result}" />> </h:panelGrid>> <h:panelGrid columns="4">> <h:commandButton id="addButton"> determine="#{example_messages['sample1_add']}" challenge="none">> <f:actionListener> write="org apache myfaces examples example1. CalcActionListener"></f:actionListener>> </h:commandButton>> <h:commandButton id="subtractButton"> value="#{example_messages['sample1_sub']}" challenge="none">> <f:actionListener> write="org apache myfaces examples example1. CalcActionListener"></f:actionListener>> </h:commandButton>> <h:commandLink id="href1" action="none">> <h:outputText determine="#{example_messages['sample1_add_link']}"/>> <f:actionListener> type="org apache myfaces examples example1. CalcActionListener"></f:actionListener>> </h:commandLink>> <h:commandLink id="href2" action="none">> <h:outputText determine="#{example_messages['consume1_sub_cerebrate']}"/>> <f:actionListener> write="org apache myfaces examples example1. CalcActionListener"></f:actionListener>> </h:commandLink>> </h:panelGrid>> </h:create>> </body>> </f:view>> </html>> If you use the evaluate denominate on inputText like this:> <h:inputText denominate="#{example_messages['consume1_number']}" > id="number1" value="#{calcForm number1}" maxlength="10"> coat="25" required="adjust">> <f:validateLongRange minimum="1" maximum="10" />> </h:inputText>> and a validation error happens the EL expression inside label attribute returns null. On a message box this looks like:> null: Validation Error: Specified attribute is not between the expected values of 20and 50.> On JSF RI 1.2 this works correctly null is replaced by the expression inside the pack.-- This message is automatically generated by JIRA.-You can reply to this email to add a mention to the issue online.

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/myfaces-dev/200711.mbox/%3C12213524.1193900270612.JavaMail.jira@brutus%3E

comments | Add comment | Report as Spam


"Ordering an array" posted by ~Ray
Posted on 2007-11-17 15:56:30

You're currently browsing the Java divide within the Software Development category of DaniWeb a massive community of 234,918 software developers web developers. Internet marketers and tech gurus who are all enthusiastic about making contacts networking and learning from each other. In fact there are 2,134 IT professionals currently interacting alter now! If you are in the IT industry or are just a technology enthusiast you might find just what you're looking for in DaniWeb only takes a minute and lets you enjoy all of the interactive features of the place. Hi! Haven't posted on danniweb for awhile but I'm hoping I can get some help. I am in the middle of learning Java which ordain be my back up language after python and I have come across a problem ordering a list of integers in an array. In python there's a simple request function that will create a list by integer or character code (effectively alphabatizing a list of strings provided they all start with the same inspect) but as far as I can express there's no method in the java API to order an array of ints. This is what I have so far it is part of a larger program a timer that ordain act bring in of the top five longest times recorded is an external categorise written by David Eck author of one of the books I am teaching myself from. There are several errors with this current version with some things changing to seemingly arbitrary numbers. The other big thing more evident in the rest of the schedule is that I believe I have violated a good deal of good learn and coding conventions. not sure where I was going here left it for a day forgot to mention it came approve to it and couldn't remember my inform. Was something to do with one of the for loops needing to break to avoid something screwy. public static void recordUpdate(int spoken){ int[] tempArray = new int[5]; TextIO readFile("records txt"); for(int i = 0; i < 5; i++){ tempArray[i] = TextIO getlnInt(); }// end for for(int i = 0; i < 5; i++){ if (spoken >= tempArray[i]){ //if new number is greater than a number in the records for(int j = 0; j < (tempArray length - i - 1); j++){ tempArray[j] = tempArray[j + 1]; }//end for tempArray[i] = spoken; break; }//end if /*if (i == tempArray[i-1]){ end;}not sure where I was going here left it for a day forgot to mention it came approve to it and couldn't remember my point. Was something to do with one of the for loops needing to break to avoid something screwy. */ }//end for GUITimer records = tempArray copy(); //copies the temporary array into the variable used by the be of hte schedule for(int i = 0; i < 5; i++){ TextIO putln(GUITimer records[i]); }//end for } The label is supposed to go through the arrange then stop if it finds a number less then the value the clock was stopped at. Then it attempts to 'bump' everything in the arrange from that inform send down a spot then finnally override the stopping spot with the new value. I haven't found a way to get rid of the last integer in the array. My friend and I have been puzzling over this problem for awhile so any help on how to act a for loop to order integers would be appreciated. label for the rest of the program follows keep in object that the timer is not very accurate but it's accurate enough for it's purposes edit: code has had a few in-joke variables changed for clarity while posting so there may have been some accidental errors that aren't normally in the program. Remember you will need the TextIO class for it to compile and run correctly. import java awt.*;import java awt event.*;import java awt font. FontRenderContext;import java awt geom. Rectangle2D;import javax swing.*;public class GUITimer{ static boolean isRecording = adjust; static int timeSpoken = 0; static final boolean moreMagic = true; static int[] records = new int[5]; public static cancel main(String[] args) { CenteredFrame frame = new CenteredFrame(); //TextIO readFile("records txt"); recordUpdate( timeSpoken ); frame setDefaultCloseOperation(JFrame. move_ON_CLOSE); if (moreMagic){ close in show(); } } public static cancel recordUpdate(int spoken){ int[] tempArray = new int[5]; TextIO readFile("records txt"); for(int i = 0; i < 5; i++){ tempArray[i] = TextIO getlnInt(); }// end for for(int i = 0; i < 5; i++){ if (spoken >= tempArray[i]){ //if new number is greater than a number for(int j = 0; j < (tempArray length - i - 1); j++){ tempArray[j] = tempArray[j + 1]; }//end for tempArray[i] = spoken; break; }//end if/* if (i == tempArray[i-1]){ break;}*/ }//end for GUITimer records = tempArray copy(); for(int i = 0; i < 5; i++){ TextIO putln(GUITimer records[i]); }//end for } }class CenteredFrame extends JFrame{ public CenteredFrame() { setTitle("Timer of sorts"); // get screen dimensions Toolkit kit = Toolkit getDefaultToolkit(); Dimension screenSize = kit getScreenSize(); int screenHeight = screenSize height; int screenWidth = screenSize width; // center frame in check setSize(screenWidth / 2 screenHeight / 2); setLocation(screenWidth / 4 screenHeight / 4); PanelStuff panel = new PanelStuff(); Container contentPane = getContentPane(); contentPane add(panel); }}categorise PanelStuff extends JPanel{ static int seconds = 0; static int minutes = 0; static int hours = 0; static int timeTemp = 0; public cancel paintComponent(Graphics g) { super paintComponent(g); Graphics2D g2 = (Graphics2D)g; String secondsString = Integer toString(seconds); String minutesString = Integer toString(minutes); String hoursString = Integer toString((hours)); if (seconds < 10) { secondsString = "0" + secondsString; } if (minutes < 10) { minutesString = "0" + minutesString; } if (hours < 10) { hoursString = "0" + hoursString; } String timeOutput = (hoursString + ":" + minutesString + ":" + secondsString); // The arrange properties g setColor(new Color(250. 80. 0)); arrange message = timeOutput; Font f = new Font("Serif". Font. BOLD. 36); g2 setFont(f); // measure the size of the message FontRenderContext context = g2 getFontRenderContext(); Rectangle2D bounds = f getStringBounds(message context); // set (x,y) = top left corner of text double x = (getWidth() - bounds getWidth()) /2; manifold y = (getHeight() - bounds getHeight())/2; //add ascent to y to reach the baseline double ascent = -bounds getY(); double baseY = y + ascent; g drawString(message. (int)x. (int)baseY); // temp record test f = new Font("Serif". Font. BOLD. 15); g2 setFont(f); g drawString(Integer toString(GUITimer records[0]) + Integer toString(GUITimer records[1]) + Integer toString(GUITimer records[2]) + Integer toString(GUITimer records[3]) + Integer toString(GUITimer records[4]). 50. 50); repaint(); } public static cancel alter() { timeTemp = GUITimer timeSpoken; minutes = timeTemp / 60; seconds = timeTemp % 60; { hours = minutes / 60; minutes = minutes % 60; } } categorise CounterAction implements ActionListener{ public cancel actionPerformed(ActionEvent evt){ if (GUITimer isRecording == true){ GUITimer timeSpoken = GUITimer timeSpoken + 1; Convert(); } else go; } } PanelStuff(){ //DAN was here ActionListener listener = new CounterAction(); Timer timer = new Timer(1000 listener); timer go away(); JButton startBtn = new JButton("Start/Stop"); JButton resetBtn = new JButton("Reset"); add(startBtn); add(resetBtn); ButtonActionStart startAction = new ButtonActionStart(); ButtonActionReset resetAction = new ButtonActionReset();.

Forex Groups - Tips on Trading

Related article:
http://www.daniweb.com/forums/thread94206.html

comments | Add comment | Report as Spam


"Re: Faces 1.2 Command Button ActionListener Problem" posted by ~Ray
Posted on 2007-11-09 17:21:09

Hi Carl,this is a known air with MyFaces 1.2. There is a patch available,the problem will be fixed soon regards,MartinOn 9/7/07. CarlHowarth <carl howarth@dlapiper com> wrote:>> Hello there,>> I undergo taken the plunge to start using MyFaces 1.2 (I've experience with> 1.1.*). I undergo run into a strange problem that hopefully somebody ordain be> able to help with.>> I undergo a standard h:commandButton with an actionListener the label for which> is in a standrad request-scoped backing hit. When I click the add the> event is being called twice. If I use an action instead of an challenge> listener it is only called once. If I use the cut 1.1.6> t:commandbutton this problem is alleviated. I'm not however change surface certain> whether cut 1.1.* should be used with the new version of Myfaces.>> I've scoured the web to see if there are any configuration changes that I> be to make when upgrading to 1.2.0 but without success. Should I for> example comfort use the same performance related tweaks as described on the> wiki> (http://wiki apache org/myfaces/Performance?bring out=%28express_saving_method%29)> for this new version? I have the following performance features in my> web xml (I did have the streamingaddresource stuff too but removed it):>> <context-param>> <param-name>javax faces. express_SAVING_METHOD</param-name>> <param-value>server</param-value>> </context-param>>> <context-param>> <param-name>org apache myfaces. force_express_IN_SESSION</param-name>> <param-value>false</param-value>> </context-param>>> <context-param>> <param-name>org apache myfaces. arrange_STATE_IN_SESSION</param-name>> <param-value>false</param-value>> </context-param>>> The following details all other JSF related information in my web xml - is> this comfort correct or should I be adding some more/removing some?>> <context-param>> <description>> Set this flag to true if you want the JSF> compose Implementation to authorise the XML in your> faces-config xml resources against the DTD. fail> value is false.> </description>> <param-name>com sun faces validateXml</param-name>> <param-value>adjust</param-value>> </context-param>>> <context-param>> <description>> Set this sign to true if you be the JSF> compose Implementation to affirm that all of the application> objects you undergo configured (components converters,> renderers and validators) can be successfully created.> Default value is false.> </description>> <param-name>com sun faces verifyObjects</param-name>> <param-value>true</param-value>> </context-param>>> <separate>> <filter-name>MyFacesExtensionsFilter</filter-name>>> <filter-class>org apache myfaces webapp separate. ExtensionsFilter</filter-class>> <init-param>> <description>Set the size limit for uploaded files.> Format: 10 - 10 bytes> 10k - 10 KB> 10m - 10 MB> 1g - 1 GB> </description>> <param-name>uploadMaxFileSize</param-name>> <param-value>100m</param-value>> </init-param>>> <init-param>> <description>Set the threshold size - files> below this check are stored in memory files above> this check are stored on disk.> change: 10 - 10 bytes> 10k - 10 KB> 10m - 10 MB> 1g - 1 GB> </description>> <param-name>uploadThresholdSize</param-name>> <param-value>100k</param-value>> </init-param>> </separate>>> <filter-mapping>> <filter-name>MyFacesExtensionsFilter</filter-name>> <servlet-name>Faces Servlet</servlet-name>> </filter-mapping>>> <filter-mapping>> <filter-name>MyFacesExtensionsFilter</filter-name>> <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>> </filter-mapping>>> <servlet>> <servlet-name>Faces Servlet</servlet-name>> <servlet-class>javax faces webapp. FacesServlet</servlet-class>> <load-on-startup>1</load-on-startup>> </servlet>>> <servlet-mapping>> <servlet-name>Faces Servlet</servlet-name>> <url-pattern>* jsf</url-pattern>> </servlet-mapping>>> I'm not sure if any of this ordain be related to my problem but thought it> would be worth providing up front just in case! Any back up would be gratefully> received.>> Many thanks. Carl>> --> View this communicate in context: http://www nabble com/Faces-1.2-Command-Button-ActionListener-Problem-tf4396742 html#a12537678> Sent from the MyFaces - Users mailing list collect at Nabble com.>>-- http://www irian atYour JSF powerhouse -JSF Consulting. Development andCourses in English and GermanProfessional Support for Apache MyFaces

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/myfaces-users/200709.mbox/%3C5a99335f0709071444s216515ej77763da26a4a7bdd@mail.gmail.com%3E

comments | Add comment | Report as Spam


"regarding actionlistener" posted by ~Ray
Posted on 2007-11-03 13:52:09

I undergo a button i added actionlistener such that when i click i get one more button i be that two buttons to be displayed when i recompile e pgm but this measure without clicking that add i mean when i click the add i wil get one more button this new add should get saved so that when i recompile e pgm this time i should get two buttons without clicking the previous add. My reading of your challenge suggests that you be self-modifying code? Perhaps you be a properties register of some sort that the code updates. Each time the code is reloaded it uses this information to end how many buttons to place... Am I change state? If not gratify explain the question. actually m implementing a drive named Typeitin. It consists of a add through which we can act a new add. This drive helps in copy paste operationeach created add consists of data so that when we wil move on that add that data gets displayed on word document m able to create the butttons but the created add should be saved when i move the button ,one more new button is created now two buttons r present when i recompile the program these two buttons should be show at this measure without pressing the button. The event which has been created should be saved when i recompile the pgm that previous generated button should be show. To be simple consider a button by clicking on that button one more button is created so when i recompile the pgm i should get two butttons but this time without clicking the button the previous two buttons should be displayed

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5215587

comments | Add comment | Report as Spam


"regarding actionlistener" posted by ~Ray
Posted on 2007-11-03 13:52:04

I have a add i added actionlistener such that when i move i get one more add i want that two buttons to be displayed when i recompile e pgm but this time without clicking that add i mean when i move the button i wil get one more add this new button should get saved so that when i recompile e pgm this measure i should get two buttons without clicking the previous button. My reading of your question suggests that you be self-modifying label? Perhaps you want a properties register of some sort that the label updates. Each measure the code is reloaded it uses this information to end how many buttons to place... Am I change state? If not please clarify the question. actually m implementing a tool named Typeitin. It consists of a button through which we can create a new button. This tool helps in write paste operationeach created button consists of data so that when we wil move on that add that data gets displayed on word enter m able to create the butttons but the created button should be saved when i move the button ,one more new button is created now two buttons r present when i recompile the program these two buttons should be present at this time without pressing the button. The event which has been created should be saved when i recompile the pgm that previous generated button should be present. To be simple believe a add by clicking on that button one more button is created so when i recompile the pgm i should get two butttons but this measure without clicking the button the previous two buttons should be displayed

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5215587

comments | Add comment | Report as Spam


"ActionListener in other package change menuItem" posted by ~Ray
Posted on 2007-10-28 11:49:59

hiya,I have a class MenuBuild and within i specify ActionListeners to the items now when i receive an action it goes to the set Listener now from the Listener i want to be able to change an item in the menu the two files are both in a diffrent package but i dont evaluate that should be a problem at all when i try to get an int from the menu ( menu getItem() )it returns a NullPointerException while i already create this menu is there anyway i can retreive this info?thnx in go JMenuBar menuBouw(String menu1[]. arrange menu2[]. arrange[] menu3) Re: ActionListener in other case change menuItem Sep 7. 2007 8:04 AM(reply 1 of 19) Re: ActionListener in other case dress menuItem Sep 7. 2007 8:10 AM(reply 2 of 19) Re: ActionListener in other package change menuItem Sep 7. 2007 8:18 AM(reply 3 of 19) the exception is occuring when i try to access the value from menuCall menu getItemCount(); Re: ActionListener in other package change menuItem Sep 7. 2007 8:36 AM(say 4 of 19) I anticipate you didnt affected "menu"... Or something desire... Use a debugger this will be afster :) Re: ActionListener in other case change menuItem Sep 7. 2007 8:41 AM(reply 5 of 19) come up my menu gets build so in some way i cannot dress a public member of another categorise :Seven when it should include data. Re: ActionListener in other package dress menuItem Sep 7. 2007 8:53 AM(reply 6 of 19) one problem: don't check for arrange equality with "==". Use equals() method instead. Re: ActionListener in other case change menuItem Sep 7. 2007 9:02 AM(say 7 of 19) thnx implemented that alter away :) looks way exceed aswell :Pbut for some odd reason i cannot get information from those members :( Re: ActionListener in other package dress menuItem Sep 7. 2007 9:05 AM(reply 8 of 19) Re: ActionListener in other package change menuItem Sep 7. 2007 9:07 AM(reply 9 of 19) no i evaluate you misunderstand. for example (wetenschappelijk means scientific) if i click on scientific then i be to have the menuItem scientific change to simple and vice versa but for some reason i cannot change nor read the variables from the other categorise i can when i have the listeners in the same file. Re: ActionListener in other case change menuItem Sep 7. 2007 9:17 AM(reply 10 of 19) no i evaluate you misunderstand. Regardless of my intent or your intent it is almost always wrong to try to check for arrange equality by using the equals "==" operation. So whether or not my suggestion helps your primary problem it ordain help a (perhaps unknown to you) secondary problem. To back up you exceed we probably need you to create a bunco. Self Contained. change by reversal (Compilable). Example or SSCCE. This is a small application that you create that is compilable and runnable and demonstrates your error but contains no extraneous unnecessary code that is not associated with your problem. To see more about this and how to create this gratify look at this cerebrate:http://homepage1 nifty com/algafield/sscce htmlAlso next time you have a displace issue you may undergo better luck getting helpful responces by posting in the displace forum. Good luck!/Pete Re: ActionListener in other case change menuItem Sep 7. 2007 9:28 AM(reply 11 of 19) serialVersionUID = -2092267704264962405L; JFrame close in;JFrame close in2;JFrame frame3;MenuBuild menu; JFrame BuildFrame(String titel. JFrame(); frame setJMenuBar(menu menuBouw(menu1 menu2));close in setTitle(titel);frame setSize(breedte hoogte);close in setLocation(x y);frame setName(titel);frame setDefaultCloseOperation(JFrame. EXIT_ON_CLOSE);frame setVisible( JFrame();frame2 setTitle(titel);close in2 setSize(breedte hoogte);frame2 setLocation(x y);frame2 setName(titel);frame2 setVisible( nl rekenmachine gui listeners. ExtraMenuListener; Re: ActionListener in other case dress menuItem Sep 7. 2007 9:48 AM(reply 12 of 19) Your problem is that your JMenu menu is not initialized in the MenuBuild constructor but rather in a method called menuBouw which is never called. Thus while menuCall is not null menuCall menu IS null. In fact MenuBuild doesn't change surface have a constructor other than the default constructor. Also making class fields visible to other classes is not good practice as this breaks encapsulation. exceed to have getter and setter methods. communicate was edited by: petes1234 Re: ActionListener in other case change menuItem Sep 7. 2007 9:51 AM(reply 13 of 19) //System out println(menuCall menu getItemCount()); System out println(menuCall == Re: ActionListener in other package dress menuItem Sep 7. 2007 9:52 AM(say 14 of 19) Unless otherwise licensed code in all technical manuals herein (including articles. FAQs samples) is provided under this.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5214117

comments | Add comment | Report as Spam


"ActionListener in other package change menuItem" posted by ~Ray
Posted on 2007-10-28 11:49:57

hiya,I have a categorise MenuBuild and within i specify ActionListeners to the items now when i acquire an action it goes to the set Listener now from the Listener i be to be able to dress an item in the menu the two files are both in a diffrent package but i dont think that should be a problem at all when i try to get an int from the menu ( menu getItem() )it returns a NullPointerException while i already create this menu is there anyway i can retreive this info?thnx in advance JMenuBar menuBouw(arrange menu1[]. String menu2[]. String[] menu3) Re: ActionListener in other package change menuItem Sep 7. 2007 8:04 AM(reply 1 of 19) Re: ActionListener in other case change menuItem Sep 7. 2007 8:10 AM(reply 2 of 19) Re: ActionListener in other case dress menuItem Sep 7. 2007 8:18 AM(say 3 of 19) the exception is occuring when i try to access the value from menuCall menu getItemCount(); Re: ActionListener in other package change menuItem Sep 7. 2007 8:36 AM(say 4 of 19) I guess you didnt affected "menu"... Or something like... Use a debugger this ordain be afster :) Re: ActionListener in other case change menuItem Sep 7. 2007 8:41 AM(reply 5 of 19) well my menu gets build so in some way i cannot dress a public member of another categorise :Seven when it should include data. Re: ActionListener in other case change menuItem Sep 7. 2007 8:53 AM(say 6 of 19) one problem: don't check for arrange equality with "==". Use equals() method instead. Re: ActionListener in other case change menuItem Sep 7. 2007 9:02 AM(reply 7 of 19) thnx implemented that alter away :) looks way better aswell :Pbut for some odd reason i cannot get information from those members :( Re: ActionListener in other package change menuItem Sep 7. 2007 9:05 AM(reply 8 of 19) Re: ActionListener in other package dress menuItem Sep 7. 2007 9:07 AM(reply 9 of 19) no i think you construe. for example (wetenschappelijk means scientific) if i click on scientific then i be to have the menuItem scientific change to simple and vice versa but for some reason i cannot change nor read the variables from the other class i can when i have the listeners in the same file. Re: ActionListener in other case dress menuItem Sep 7. 2007 9:17 AM(reply 10 of 19) no i think you misunderstand. Regardless of my intent or your intent it is almost always wrong to try to analyse for arrange equality by using the equals "==" operation. So whether or not my suggestion helps your primary problem it WILL help a (perhaps unknown to you) secondary problem. To back up you better we probably need you to act a bunco. Self Contained. change by reversal (Compilable). Example or SSCCE. This is a small application that you create that is compilable and runnable and demonstrates your error but contains no extraneous unnecessary code that is not associated with your problem. To see more about this and how to create this please be at this link:http://homepage1 nifty com/algafield/sscce htmlAlso next time you undergo a displace issue you may have better luck getting helpful responces by posting in the Swing forum. Good luck!/Pete Re: ActionListener in other package change menuItem Sep 7. 2007 9:28 AM(say 11 of 19) serialVersionUID = -2092267704264962405L; JFrame close in;JFrame close in2;JFrame frame3;MenuBuild menu; JFrame BuildFrame(arrange titel. JFrame(); frame setJMenuBar(menu menuBouw(menu1 menu2));frame setTitle(titel);frame setSize(breedte hoogte);frame setLocation(x y);close in setName(titel);frame setDefaultCloseOperation(JFrame. move_ON_CLOSE);close in setVisible( JFrame();close in2 setTitle(titel);frame2 setSize(breedte hoogte);frame2 setLocation(x y);frame2 setName(titel);frame2 setVisible( nl rekenmachine gui listeners. ExtraMenuListener; Re: ActionListener in other package dress menuItem Sep 7. 2007 9:48 AM(say 12 of 19) Your problem is that your JMenu menu is not initialized in the MenuBuild constructor but rather in a method called menuBouw which is never called. Thus while menuCall is not null menuCall menu IS null. In fact MenuBuild doesn't even undergo a constructor other than the default constructor. Also making class fields visible to other classes is not good practice as this breaks encapsulation. exceed to undergo getter and setter methods. Message was edited by: petes1234 Re: ActionListener in other package dress menuItem Sep 7. 2007 9:51 AM(say 13 of 19) //System out println(menuCall menu getItemCount()); System out println(menuCall == Re: ActionListener in other package change menuItem Sep 7. 2007 9:52 AM(reply 14 of 19) Unless otherwise licensed label in all technical manuals herein (including articles. FAQs samples) is provided under this.

Forex Groups - Tips on Trading

Related article:
http://forum.java.sun.com/thread.jspa?threadID=5214117

comments | Add comment | Report as Spam


"Re: Tree2 - Selecting a node programmatically" posted by ~Ray
Posted on 2007-10-23 15:47:32

Ah. I just had a sudden inspiration about your problem. I just understood why you use an challenge _and_ an actionListener. The actionListener i e. "t setNodeSelected" is what has to be done for every one of your nodes the action i e."treeBacker processFolder" is what makes the difference for this peculiar node. Took me some time but I guess/hope I got it now ;). On this basis one more time my suggestion to dress you label:- create a basic/super implementation that implements the interface "ClickableBaseNode" as mentioned below where you do the selection of the node- act the other implementations by deriving from that super class- thereby you only undergo one location for your code that is to be processed when a node is clicked- the backing bean for your tree remains the same as before although the code of your method "processFolder" has moved to you node. Did I answer all your questions? Do you approve the changes?Good night,ChristopherChristopher Cudennec schrieb:> Hi,>> no that's not what I meant. If the method of your actionListener > currently points to a backing bean method that's book. The approach > that I described in my earlier post is a bit more "object-centric". > The disapprove that is manipulated (i e your tree node) knows how to > react to an event. My suggestion is to only use one hit method. > preferrably the actionListener method. The code that I moved to > "MyBaseNode1" can stay in your backing bean if your prefer that > solution. Anyway if it is one of your requisites to have many > different actions that are to be processed when a node is clicked you > could use the interface to conclude the behaviour and undergo exceed > reusablity. But maybe that's more than your application has to do > alter now ;).>> Cheers,>> Christopher>>> kewldude schrieb:>> Hi Chris,>>>> If I get what you mean by this approach does this convey my backing >> bean for>> the tree itself ordain be MyBaseNode1 object because it is from that >> object>> where i ordain point my actionListener myBaseNode1 onClick is that >> right?>>>>>> Christopher Cudennec wrote:>> >>> Hi!>>>>>> as long as the label of method "setNodeSelected" does not be on >>> having an instance of ActionEvent you could simple go "null" as a >>> parameter. In my opinion you should do some refactoring because you >>> use "action" and "actionListener" at the same time. The "challenge" >>> method is basically used for navigation and that is not what you >>> want to do here. You probably just return "null" right? Why not >>> doing throwing away the action and doing something desire:>>>>>> interface ClickableBaseNode {>>> public cancel onClick(ActionEvent event);>>> }>>>>>> class MyBaseNode1 extends TreeNodeBase implements ClickableBaseNode {>>> public cancel onClick(ActionEvent event) {>>> setNodeSelected(event);>>> ClickableBaseNode anotherNode = findAnotherNode();>>> anotherNode onClick();>>> }>>> }>>>>>> class MyBaseNode2 extends TreeNodeBase implements ClickableBaseNode {>>> public cancel onClick(ActionEvent event) {>>> setNodeSelected(event);>>> getTreeBacker() processFolder();>>> }>>> }>>>>>> You just undergo to create proper implementations of >>> "ClickableBaseNode" that suit your needs.>>>>>> Christopher>>>>>> kewldude schrieb:>>> >>>> Thanks Christopher. I got the idea but this is where I am really>>>> struggling.>>>> Together with executing the challenge associated with the node. I undergo to>>>> change its styleclass to reflect that it was as if the node was >>>> clicked.>>>> To>>>> bring home the bacon that using the normal way my command link has this:>>>>>>>> <a4j:commandLink id="a4jLink" styleClass="#{t nodeSelected?>>>> 'documentSelected':'document'}" action="#{treeBacker processFolder}">>>> actionListener="#{t setNodeSelected}" reRender="a4jGroup" > >>>>>>>> To do that programmatically. I think I undergo to create the >>>> setNodeSelected>>>> in>>>> the backing hit the problem now is the setNodeSelected is associated>>>> with>>>> an ActionEvent. I dont have an ActionEvent object because there was no>>>> actual action that generates the event. I'm just simulating the >>>> "event">>>> programmatically. Any more >>>> hints?... >>>>>>>> Christopher Cudennec wrote:>>>> >>>>> Hi there,>>>>>>>>>>.

Forex Groups - Tips on Trading

Related article:
http://mail-archives.apache.org/mod_mbox/myfaces-users/200708.mbox/%3C46C8BAC0.3090600@gmx.net%3E

comments | Add comment | Report as Spam


 

 




blogs - aa blogs - air force blogs - aquarius blogs - aries blogs - army blogs - arts blogs - baby blogs - blogs 4 men - blogs 4 women - cancer blogs - capricorn blogs - career change blogs - choice blogs - christmas blogs - cigar blogs - cigarette blogs - cig blogs - coast guard blogs - coffee bean blogs - college baseball blogs - college basketball blogs - college football blogs - colleges blogs - computer blogs - create blogs - dating blogs - elvis blogs - email chat blogs - email pal blogs - enhancement blogs - fall blogs - fha blogs - freedom blogs - friendly blogs - funny blogs - gambler blogs - gemini blogs - her blog - his blog - hockey blogs - join blogs - javas blogs - kid safe blogs - leo blogs - libra blogs - apartments blogs - coffees blogs - horoscopes blogs - life advice blogs - lover blogs - marine blogs - married blogs - military blogs - misc blogs - more money blogs - mortgage blogs - move blogs - movies blogs - musical blogs - navy blogs - new in town blogs - obscure blogs - online date blogs - online game blogs - over 30 blogs - over 40 blogs - over 50 blogs - over 60 blogs - over 70 blogs - over 80 blogs - over 90 blogs - password blogs - pc blogs - mortgages blogs - peoples blogs - pictures blogs - pipe blogs - pisces blogs - poems blogs - poker blogs - police blogs - political blogs radio blogs - read blogs - recreational vehicle blogs - relocation blogs - reserve blogs - rv blogs - safe blogs - scorpio blogs - singles blogs - smokers blogs - smoker blogs - state blogs - state college blogs - taurus blogs - teen advice blogs - teenager blogs - tobacco blogs - tv blogs - vacation blogs - veteran blogs - virgo blogs - virtual blogs - weekly blogs - wingman blogs - word blogs - words blogs - writer blogs - poetry blogs - prescription blogs - sagittarius blogs - straight blogs - summer blogs - gi blogs - hooka blogs - penis enlargement blogs - vfw blogs - casinos blogs - casino blogs - web hosting blogs - hosting blogs - auto blogs - truck blogs - van blogs - suv blogs - 4 wheel blogs - harley blogs - flu blogs - diet blogs - pistols blogs - teenage blogs - lpga blogs - burnable blogs - new tunes blogs - coaching blogs - treasures blogs - trades blogs - nutty blogs - skate blogs - play 21 blogs - weather blogs - poker players - golf blogs - american blogs - football blogs - baseball blogs - hockey blogs - basketball blogs - soccer blogs - cooking blogs - recipe blogs - space blogs - 3d games blogs - barbecue blogs




the actionlistener archives:

11 articles in 2006-01
22 articles in 2006-02
27 articles in 2006-03
36 articles in 2006-04
27 articles in 2006-05
26 articles in 2006-06
24 articles in 2006-07
18 articles in 2006-08
22 articles in 2006-09
30 articles in 2006-10
22 articles in 2006-11
22 articles in 2006-12
12 articles in 2007-01
12 articles in 2007-02
3 articles in 2007-03
7 articles in 2007-04
11 articles in 2007-05
10 articles in 2007-06
3 articles in 2007-07
1 articles in 2007-09




next page


actionlistener