Sign in to follow this  
ratroy

JSF Events

Recommended Posts

OK, this is my temporal UGLY solution B):

 

 

 

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this