• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts2 autocompleter label and required fields have no effect

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
[Thumbnail for sample.jpg]
Sample output
 
H Gadre
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can somebody please help me with this?
 
reply
    Bookmark Topic Watch Topic
  • New Topic