• 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
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • salvin francis

html:text as an array

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my web form, i have many similar fields. I have
> named all of them the same.
> for example <html:text property="referenceName"
> name="someForm"/> and there are
> five of these. my actionform bean has an array
> declared for these fields and so
> hopefully the five fields should populate the array.
> and in fact it does. but
> my problem is that if my form is invalidated, and my
> action class takes me back
> to the same page the all the text fields show some
> funny junk something like
> [Ljava.lang.String;@55a
> instead of the original value that i had entered.
> (if there was no error, and i
> access the field through the form i get the correct
> value).
> which is probobaly the memory address for that array
> cell, i don't know. why is
> this happening? is there any documentation out there
> that shows how to deal
> with this type of form? in my jsp form i have
> explicitely typed out these five
> fields and not used any iteration function to
> display it. does this have
> something to do with this.
>
> your help will be much appreciated.
Thanks & Regards
krish
 
Sheriff
Posts: 67554
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
Please be sure to ask Struts questions in the Struts forum. I have moved this post there for you.
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It seems odd that your solution is (partially) working. It sounds like you need to use indexed properties. There is a section in this forum's FAQ with an example that I put together.

- Brent
 
and POOF! You're gone! But look, this tiny ad is still here:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic