Well the way I respond is writing directly to the response stream with the help of Jackson Object Mapper.
sample code:
@ResourceMapping(value="stuff")
public void method(ResourceResponse...
Type: Posts; User: flavouski; Keyword(s):
Well the way I respond is writing directly to the response stream with the help of Jackson Object Mapper.
sample code:
@ResourceMapping(value="stuff")
public void method(ResourceResponse...
you only get 1 render
I'm sorry I didn't really understand your question. Could you be more specific?
I'll add a little in here at what I think you are going for?
so in your action you have a "ActionResponse"...
Ends up I overrode one of the interceptors and instead of not going onto a render I went and created some render's that went to the same page, but didn't have any functionality in it. And then when...
It seems odd to me that the variables went from request params to attributes, i doubt spring would be able to do that auto-like?
I have the auto-ish thing working for @ModelAttribute, not sure if...
I would say the best option would be override:
public boolean preHandleRender(RenderRequest request, RenderResponse response, Object handler) throws Exception {
You'd just extend:...
Since I'm on the portlet spec I'm not allowed to use responsebody, so i've been using @modelattribute instead, even on my ajax calls and that seems to work well with the @valid annotation.
yeah the post is a bit incomplete :\.
Definitely need a variable in with your mapping:
<portlet:resourceURL id="Id_Field"/>
On my controller I do have @Controller and...
Jackson can help turn it to JSON and back for objects, but we only use it for the to JSON portion. Spring is able to figure out where the JSON should be mapped to.
For a form submission if you...
you could use a ParameterMappingInterceptor. It will take an action and forward it to the render with the same name (@ActionRequest(value="action=blah1") @RenderRequest(value="action=blah1")). But...
In the modelandview object you have a:
Map<String,Object> getModel()
or
ModelAndView addObject(String attributeName, Object attributeValue)
Add an attribute to the model....
I'm using portlets, spring 3 and ajax (jquery) without dwr.
I didn't quite understand your post, what was your goal (the cross servlet portlet communication confused me)? Using servlets to handle...
The event phase would work for this scenario (assuming you are portlet-286 compliant). Also if you wanted to go the not so solid route, javascript.
I know you'll at least need an AutoPopulatingList for when the user updates the items.
Spring doesn't know how to handle a list because its an interface, and it doesn't know how to handle an...
I wanted to split the action and render phase of the application and am using ParameterMappingInterceptor which is working fine.
When the Action runs we use hibernate's validator to confirm fields...
ah yeah, I forgot about that. I didn't mention I was on Portlet MVC, but I forgot that there are parts (like the marshaller) the portlet code can't use.
Interesting on the Spring JS, haven't...
yes, asynch. I'm unsure how to plug them into springs taglibs. When I receive them back from the server-side I get them in JSON format.
Currently what I do is have a set of errors that exist...
echo echo echo echo
I am currently using spring's form taglib and am displaying errors when received back from the server and it works great:
<form:errors path="*"/>
What does everyone do for ajax errors? Do you...
yeah that is true. I can't be expecting Spring to know about the old response because the new request being sent from the client side won't contain enough information.
Future:
https://jira.springframework.org/browse/SPR-6817
Looks like it will be fixed in 3.1 M1
I was working with doing form validation and realized that there doesn't seem to be an easy way to return back to the original form that the client requested if an error was to occur. i.e.:
...
It looks like my @Valid and my Binder contain different validators due to the autowiredness, but I'm unsure how to correct this.
:confused:
Using Spring 3.0.2 and Hibernate Validator 4.0.2.GA
It looks like I have my validator setup correctly, but when I do:
//some of my imports
import javax.validation.Valid;
import...
Yeah the documentation needs to be a lot clearer. Some of the stuff in the "servlets" area is reusable (when in reality there should be a lot more). A lot of it drives me nuts because they require...