The code I posted works fine for me..  Here is a working example.

Component:

  | @Name("testController")
  | @Scope(ScopeType.PAGE)
  | public class TestController {
  |     public void hello() {
  |             try {
  |                     FacesContext context = 
FacesContext.getCurrentInstance();
  |                     HttpServletResponse response = (HttpServletResponse) 
context.getExternalContext().getResponse();
  |                     response.setContentType("text/plain"); //fill in 
contentType 
  |                     OutputStream os = response.getOutputStream();
  |                     os.write("HELLO THERE".getBytes()); //fill in bytes
  |                     os.flush();
  |                     os.close();
  |                     context.responseComplete();
  |             } catch (Exception x) {
  |                     x.printStackTrace();
  |             }
  |     }
  | }
  | 

View:


  | 
  | <ui:composition xmlns="http://www.w3.org/1999/xhtml";
  |                 xmlns:s="http://jboss.com/products/seam/taglib";
  |                 xmlns:ui="http://java.sun.com/jsf/facelets";
  |             template="templates/template.xhtml"
  |                >
  |             <s:button action="#{testController.hello}" value="test"/>
  |     
  | </ui:composition>
  | 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4122839#4122839

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4122839
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to