ratroy Report post Posted March 3, 2010 Hi, Could you guys share your ideas on firing a JSF ActionEvent by clicking a data set? Thanks. Share this post Link to post Share on other sites
srividya_sharma Report post Posted March 3, 2010 Hi I am not sure how it would work. I would have to try it out once. Will keep you posted. Thanks for your patience Srividya Share this post Link to post Share on other sites
ratroy Report post Posted March 4, 2010 OK, this is my temporal UGLY solution : A javascript function: function dsClick() { var link = document.getElementById("form1:link1"); return document.getElementById("form1:link1").click(); } the java code: public HtmlPanelGrid getPanel() { if (panel == null) { this.panel = new HtmlPanelGrid(); this. panel.setId("panel1"); this.panel.getChildren().add(getForm()); } return panel; } public HtmlCommandLink getLink() { if (link == null) { this.link = new HtmlCommandLink(); this.link.setId("link1"); this.link.setVisible(false); this.link.addActionListener(new ActionListener() { public void processAction(ActionEvent arg0) throws AbortProcessingException { System.out.println("click"); } }); } return link; } public HtmlForm getForm() { if (form == null) { this.form = new HtmlForm(); this.form.setId("form1"); this.form.getChildren().add(this.getLink()); this.form.getChildren().add(this.getChart()); } return form; } in the page: ice:panelGrid binding="#{example.panel}" and in the data set: set name='Jan' value='462' link='javascript: dsClick();' Share this post Link to post Share on other sites
srividya_sharma Report post Posted March 4, 2010 (edited) Good work around, I should say. I cannot think of any other alternative as of now. Thanks for posting. Srividya Edited March 4, 2010 by Guest Share this post Link to post Share on other sites