Seam recommendations

Is there any document or article regarding best seam techniques.

+2


source to share


4 answers


Maybe one of the articles here can help.



+1


source


If you're looking for guidance and advice on a specific topic, you'll find plenty of neat tricks and advice in the Seam link itself. Many themes have more than one example and they show how you can do this in the most elegant way, for example. form log messages.



The latter is at http://docs.jboss.org/seam/2.2.0.GA/reference/en-US/html .

+1


source


  • Always create Seam project using seam-gen command line

From <SEAM_HOME> directory, call

seam setup

      

Answer a few questions: project workspace, JBoss home directory, project name, etc.

Will make sure you don't need a JBoss Application Server. You can use another one if you like

Then

seam create-project

      

In NetBeans

  • File> Open Project or Ctrl + Shift + o
  • Go to the generated project directory
  • Nothing more

If you are using Eclipse see Getting Started with Seam with JBoss Tools

  • Always test a Seam project using SeamTest (allows you to test your application outside of the Application Server)

    public class UserTest extends SeamTest {
    
        @Test
        public void saveUser() throws Exception {
    
            new FacesRequest("/user/save.xhtml") {
    
                // beforeRequest set up any request parameters for the request
                protected void beforeRequest() {
                    setParameter("someAttribute", "someValue");
                }
    
                protected void updateModelValues() {
                    setValue("#{user.name}", "Foo");
                    setValue("#{user.category}", UserCategory.GOLD);
                }
    
                protected void invokeApplication() {
                    invokeMethod("#{userRepository.saveUser(user)}");
                }
    
            }.run();
    
        }
    }
    
          

  • Read The Seam in Action Carefully

+1


source


I think as you look at the Seam examples, you will have a good recommendation for good practices.

0


source







All Articles