sexta-feira, 20 de setembro de 2013

JSF - Associar mais de dois métodos a um evento


<h: commandLink value ="Salvar" action ="acao1" actionListener ="acao2">
     <f: actionListener type ="br.com.alexandrepalmeira.MudarCor"/> // acao3 ...
</h: commandLink >


br.com.alexandrepalmeira;
public class MudarCor implements ActionListener {
     @Override
     public void processAction ( ActionEvent e) {
          UICommand c = ( UICommand ) e. getComponent ();
          c. getAttributes (). put(" style ", " color : red ;");
     }
}

Nenhum comentário:

Postar um comentário