Hello,
 
I am working with the lab 4918 Spring MVC. I have 2 questions with spring:bind 
tag and formView property in the exercise springMVCSimpleController. 
 
1) My first question is:  Is spring:bind tag used to display and to populate 
(i.e. to GET and to SET) only the content of a command object which is 
associated with a SimpleFormController or we can use it to display and to 
populate the content of another kinds of bean? 
 
For example, in this exercise, we have a following controller (configured in 
the file sampleBankingServlet-servlet.xml):
 
    <bean id="loginBankController"
          class="springexample.contoller.LoginBankController">
        
        <property name="sessionForm">
            <value>true</value>
        </property>
       
        <property name="commandName">
            <value>loginCommand</value>
        </property>
         .... blah blah blah 
        <property name="formView">
            <value>login</value>
        </property>
        
        .... blah blah blah         
    </bean>
 
Suppose that in the same configuration file, we declared another bean:
 
    <bean id="testClass"
          class="testpackage.TestClass">
        <property name="personname">
            <value>A typical name</value>
        </property>
    </bean>
 
As defined in the above configuration, the formView page of loginBankController 
is login.jsp. Can we use spring:bind tag in this page to display and  to set 
the property personname of the bean testClass? I tried but it did not work. I 
thought that maybe the login.jsp is reserved for the command object of the 
loginBankController bean, therefore I created another jsp page to display/set 
its content but it also failed.
 
 
2) My second question is that: Can we use the same formView page (e.g 
login.jsp) for 2 different SimpleFormController controllers? I tried but it did 
not work.
 
Can anyone help me?
 

Thank you very much.
T. N.


      Hình thức của người đàn ông có quan trọng đối với phụ nữ không? Tìm câu 
trả lời tại Yahoo! Hỏi & Đáp. http://vn.answers.yahoo.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to