• 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

limit the width of error message

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I put two textfields on the struts2 form. I am using qxhtml theme - this is a custom theme, you could check vitavara.com. It is similar to xhtml.

The form looks like below when I start to input the data:


I leave the value in textfield1 empty and I click the submit button. I get an error that textfield1 should not be empty. Label2 and textfield2 move right because error message belonging to textfield1 is displayed in one row and the length of errormessage in bigger then textfield1, also the textfield1 width increase. The form looks like below after the submit button is pressed:


I would like to fix the width of error message like below.



Is it possible to fix the errormessage width?

I think I should modify the row in controlheader-core.ftl:
<span class="errorMessage">${error?html}</span><#t/>

If I manually modify the row like in the example below, then it works. But I would like to get a dynamic width of textfield not fixed to 100px like in te statement below.
<span class="errorMessage" style="display: inline; width: 100px">${error?html}</span><#t/>

Best regards,
javanus
 
I can't beleive you just said that. Now I need to calm down with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic