Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

path in spring form

// The path attribute is bound into java properties using java beans convention.
// For example for following form:
<form:form method="post" modelAttribute="theStudent">
  Name: <form:input type="text" path="name"/>
  Cool?: <form:input type"checkbox" path="cool"/>
  <button>Save</button>
</form:form>
// And following controller handler method:
@RequestMapping(...)
public String updateStudent(@ModelAttribute("theStudent") Student student) {
  // ...
}
// Will bind automatically if the Student class is defined with following properties:
public class Student {
  private String name;
  public String getName() { return this.name; }
  public void setName(String name) { this.name = name; }

  private boolean cool;
  public boolean isCool() { return this.cool; }
  public void setCool(boolean cool) { this.cool = cool; }
}
Comment

PREVIOUS NEXT
Code Example
Java :: position of an element in infinite sorted array 
Java :: nth fibonacci number java using for loop 
Java :: comments java 
Java :: binary tree traversal 
Java :: switch statement in java 
Java :: declare matrix in java 
Java :: How to Initialize Arrays in Java? 
Java :: display hello world in android app 
Java :: stringbuilder example in java 
Java :: new date api in java 8 
Java :: java enum in switch statement 
Java :: method 
Java :: logcat android 
Java :: list of arrays 
Java :: my canvas java 
Java :: Java float Keyword 
Java :: javafx combobox cell 
Java :: array 2 
Java :: intellij java fx new window 
Java :: empty map entry java 
Java :: java method overloading 
Java :: add image in loggin view spring boot security 
Java :: detect bluetooth headphones android programmatically 
Java :: no main attribute in java android 
Java :: guava-18.0.jar 
Java :: blast multiple protein files 
Java :: java find index of first alpha character in string 
Java :: Iterating & Adding to a Stack 
Java :: android studio setbackgroundcolor drawable 
Java :: what is datasnapshot.getkey() in android studio 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =