• 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

Looking for ideas to create field level help

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wonder if anyone can help.
I'm using struts 2, and am creating a basic data entry form. For some of the fields I would like to implement a help facility - basically a html anchor that launches a new html window, probably served by a struts action. I want to do this without any client side javascript, so have decided against the standard S2 tooltips. My html anchor will be generated by the ftl template and will look something like this:


I have extended the S2 field components, and have added a new attribute called helptext; so in my jsp I am doing this kind of thing:


My question is - ideally without passing it as text on the querystring, how do I get the help text from the helptext property into the help action?

Does this make sense? Am I barking up the wrong tree? Is there a suitable help system already in place in S2? (I hope so )

Cheers

Nathan
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why bother with a Struts action? (Why bother with a new window, unless they have JavaScript turned off? It's a pretty crappy user experience to get an entirely new browser window for "Please enter your user name.")

Or if you *are* going to bother, pass a resource key to the action. In the URL.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would last less than 30 seconds at a site that used new browser windows for field-level help. Is this a requirement? Why avoid JavaScript as a tool for the job?
 
Nathan Russell
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your replies. I'll try to give some background, and also some real examples rather than my simplified one that I originally posted with

OK, agreed, field level help in a new browser window or tab is a bad user experience. However, for a number of stupid political reasons (mainly based around managers not understanding accessibility vs. browser capability - they basically think that WAI accessibility means no javascript ) I need to be able to support delivering help in a 'low tech' way of a new browser window, plus 'more modern' (we might call them standard these days ) ways such as div overlays etc.
So, whilst we are in agreement that its a cruddy solution, I need to do it

To answer David's comment of a new browser window just for a single sentance such as "Please enter your user name" - that was more my mis-direction in that I used a very very simple example in my original post. Sorry! In relality, the text will be more verbose than that, usually covering several paragraphs etc. I guess some of it could be termed as faqs. For the username field for example, there may be a help link that describes why you are encouraged to login, what you can do once you are logged in, how you can register for an account if you've not already done so etc. The text will be from marketing, full of waffle, and therefore lots of it

As I need to support both new browser window, plus some 'new fangled' js/div solution, I thought I'd tackle the easier of the two - the new browser window.
Given that there will be lots of help text (more that a single sentance) thats why I dont want to pass the text as a query string param (in fact most of the time I would probably exceed the length limit of a GET query string for some browsers)

I like the idea of using a resource key, where presumably I have a properties file defining the help text?

Then in my AboutYou.jsp I might do

The in my ftl for a textarea component I was planning on doing

Where the action can lookup the resource key and display the text.
But what I dont know is how I pass the value of the helptext parameter ("AboutYou.username" in this example) to the help action. I guess I could do it on the qs, but it would nice to know of other solutions.

Thanks in advance of any ideas;
Cheers

Nathan
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're submitting to an action via a link I don't know how else you'd pass it except as a parameter--that's kind of how links work. The other option would be to pass an ID and look in up in a DB (a better solution if the text is going to be changed a lot anyway). Or just use the field's existing "key" attribute and append the string ".help" or something.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic