final String onclick = commandLink.getOnclick(); if (onclick != null) { sb.append(onclick);
public void processEvent(SystemEvent event) { HtmlCommandLink link = (HtmlCommandLink) event.getSource(); String onClick = link.getOnclick(); Map behaviors = link.getClientBehaviors(); //This is the same check that MyFaces makes to see if the link should render //out with the Ajax handler. if (onClick == null && (behaviors.isEmpty() || (!behaviors.containsKey("click") && !behaviors.containsKey("action")))) { //Here we add an 'action' AjaxBehavior to help MyFaces process the link //as an 'ajax-ified' one. The normal ICEfaces mode is to execute/render //@all so we'll do the same by default here. If an f:ajax tag is present, //our various checks should prevent this from being applied at all. AjaxBehavior actionAjax = new AjaxBehavior(); actionAjax.setExecute(AJAX_ALL); actionAjax.setRender(AJAX_ALL); link.addClientBehavior("action", actionAjax); // AjaxBehavior clickAjax = new AjaxBehavior(); // clickAjax.setExecute(AJAX_ALL); // clickAjax.setRender(AJAX_ALL); // link.addClientBehavior("click", clickAjax); } } }
if (component instanceof HtmlCommandLink) commandOnclick = ((HtmlCommandLink)component).getOnclick();
if (component instanceof HtmlCommandLink) commandOnclick = ((HtmlCommandLink)component).getOnclick();
if (component instanceof HtmlCommandLink) commandOnclick = ((HtmlCommandLink)component).getOnclick();
if (component instanceof HtmlCommandLink) commandOnclick = ((HtmlCommandLink)component).getOnclick();
commandOnclick = ((HtmlCommandLink) component).getOnclick();
commandOnclick = ((HtmlCommandLink) component).getOnclick();
if (component instanceof HtmlCommandLink) commandOnclick = ((HtmlCommandLink)component).getOnclick();
if (component instanceof HtmlCommandLink) commandOnclick = ((HtmlCommandLink)component).getOnclick();
if (component instanceof HtmlCommandLink) commandOnclick = ((HtmlCommandLink)component).getOnclick();
if (component instanceof HtmlCommandLink) commandOnclick = ((HtmlCommandLink)component).getOnclick();
if (component instanceof HtmlCommandLink) commandOnclick = ((HtmlCommandLink)component).getOnclick();
if (component instanceof HtmlCommandLink) commandOnclick = ((HtmlCommandLink)component).getOnclick();
if (component instanceof HtmlCommandLink) commandOnclick = ((HtmlCommandLink)component).getOnclick();