Yep, pass true as the 2nd argument to CustomDateEditor's constructor
Type: Posts; User: mbeards; Keyword(s):
Yep, pass true as the 2nd argument to CustomDateEditor's constructor
You must be using passing an existing model to your ModelAndView constructor. I'm instantiating my new ModelAndView with only the view name. Then, I can add to the empty model if I choose to instead...
Use org.springframework.beans.propertyeditors.CustomDateEditor
In your controller:
protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception
{
...
You only have to write property editors for objects that Spring doesn't know how to bind from the HTML view for you.
API Documentation
You'll probably find yourself defining custom date editors...
For non-form pages (that is, pages that don't need to gather and process user input), I just use a single MultiActionController.
For example, if you have something like:
<a...
I've done this before without issue.
<bean id="someController" class="SomeControllerClass">
<property name="successView" value="redirect:step2.html" />
...
</bean>
protected...
I think you'll either have to use JavaScript to select the appropriate options, or you'll need to write your own loop to create the select/option list instead of using the Spring JSP tag so that you...
HTML forms aren't really designed to work this way... You could mess around with JavaScript and hidden input fields... Why use a form at all?
Why not just use the links to direct to the correct...
You would bind to the "properties" attribute of your WorkStep object you're using as the command class.
The name for the textarea tag would be the same as it is for the text input tag (...
You can create a custom org.springframework.beans.propertyeditors.ClassEditor for your Section class to translate a identifying string value from the HTML page into a Section instance. This is...
Cheschu,
What transaction management are you using?
I've had success with the following:
Set up a bean with org.springframework.jdbc.datasource.DataSourceTransactionManager as its class.
...
An update:
I had previously tried setting ServletRequestDataBinder's bindEmptyMultipartFiles to false without success (it only worked when there were binding errors, but not when there were no...
I don't believe Commons Validator can work that way. There is a one-to-one mapping between command object and <form> tag in validator.xml.
You could use your "attr" objects as command objects for...
It looks like you've told Commons Validator to validate a wirelessDevicePhysicalAttrForm object but your command object that you're sending to it is wirelessDevice.
I have a work-around in place for this issue and asked if anyone had any better ideas, but got no replies. See http://forum.springframework.org/showthread.php?t=44615
I'm using the same form for...
You can try:
<form name="account">
<field property="accountNumber" depends="required">
<arg position="0" key="user.required">
</field>
<field property="user.username"...
Hello All,
I'm wondering if there is a more elegant solution to this than I've come up with.
I have a command class with a byte[] field for an image which is "optional". WebDataBinder seems to...
Assuming your database looks something like:
CREATE TABLE Model
(
Model_Id SERIAL PRIMARY KEY,
Model_Code VARCHAR(16) NOT NULL UNIQUE
);
CREATE TABLE Henkaten
(
I can't seem to get Velocity Toolbox set up correctly. I'm using VelocityLayoutViewResolver with VelocityLayoutView as my viewClass (which extends VelocityToolboxView).
I am successfully using the...