Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2 autocompleter label and required fields have no effect

 
H Gadre
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I am developing a Struts 2 web application (struts version 2.0.14). When I use the autocompleter tag the label and required fields seem to be ignored. Has anybody faced similar problem? The rest of the functionality is working properly. But since,

1. It is ignoring the label attribute, I have to define a separate Label component in the HTML form (unlike other struts 2 tags).
2. Whenever the validation fails for this field, I am adding a field error by using the following

addFieldError("organizationByServiceConsumerId.organizationName", "Please specify a valid Service Consumer organization.");

On the client side, it gets displayed as an action error and not as a field error. Please check the image for your reference.

Here is the declaration,

<s:autocompleter label="Customer Name (Your company)"
name="organizationByServiceConsumerId.organizationName"
dataFieldName="organizations"
theme="ajax"
href="%{jsonList}"
cssStyle="width: 200px;"
autoComplete="false"
showDownArrow="false"
loadOnTextChange="true"
required="true" />
sample.jpg
Sample output
[Thumbnail for sample.jpg]
 
H Gadre
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also I forgot to mention adding following section has no impact.

<s:fielderror><s:param value="%{'organizationByServicePConsumerId.organizationName'}" /></s:fielderror>

You can see that the last combobox uses a standard select tag and hence the field error is displayed along with the input component unlike first two cases.
 
H Gadre
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can somebody please help me with this?
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic