Announcement Announcement Module
Collapse
No announcement yet.
Spring ROO 1.2.3 - web jsf all - use only primefaces to view instead of HtmlOutput Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring ROO 1.2.3 - web jsf all - use only primefaces to view instead of HtmlOutput

    Hi,

    I am new in spring roo and a I have a question.

    I want to create a JSF Project with spring roo, and i use web jsf setup , web jsf all. But I do not like how spring roo generate the code, beacause I would like that the code of view page only have in xhtml, not in Java files. This is an example that spring roo generate.

    Code:
     @PostConstruct
        public void ApplicationBean.init() {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            Application application = facesContext.getApplication();
            ExpressionFactory expressionFactory = application.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            
            menuModel = new DefaultMenuModel();
            Submenu submenu;
            MenuItem item;
            
            submenu = new Submenu();
            submenu.setId("pessoaSubmenu");
            submenu.setLabel("Pessoa");
            item = new MenuItem();
            item.setId("createPessoaMenuItem");
            item.setValueExpression("value", expressionFactory.createValueExpression(elContext, "#{messages.label_create}", String.class));
            item.setActionExpression(expressionFactory.createMethodExpression(elContext, "#{pessoaBean.displayCreateDialog}", String.class, new Class[0]));
            item.setIcon("ui-icon ui-icon-document");
            item.setAjax(false);
            item.setAsync(false);
            item.setUpdate(":dataForm:data");
            submenu.getChildren().add(item);
            item = new MenuItem();
            item.setId("listPessoaMenuItem");
            item.setValueExpression("value", expressionFactory.createValueExpression(elContext, "#{messages.label_list}", String.class));
            item.setActionExpression(expressionFactory.createMethodExpression(elContext, "#{pessoaBean.displayList}", String.class, new Class[0]));
            item.setIcon("ui-icon ui-icon-folder-open");
            item.setAjax(false);
            item.setAsync(false);
            item.setUpdate(":dataForm:data");
            submenu.getChildren().add(item);
            item = new MenuItem();
            item.setId("associarPessoaMenuItem");
            item.setValueExpression("value", expressionFactory.createValueExpression(elContext, "#{messages.label_list}", String.class));
            item.setActionExpression(expressionFactory.createMethodExpression(elContext, "#{pessoaBean.displayList}", String.class, new Class[0]));
            item.setIcon("ui-icon ui-icon-folder-open");
            item.setAjax(false);
            item.setAsync(false);
            item.setUpdate(":dataForm:data");
            menuModel.addSubmenu(submenu);
        }
    Has a way to generate the code for pages only in XHTML files ?


    Thanks =D
Working...
X