Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

struts tags problem

 
hani Ibrahim
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
i have a strange problem that i use struts tags inside html:form this page send its parameters from selected menues values to the Action class.It is work perfectly in mozilla but with Internet explorer No data reach to Action class always null.
Even i call using javascript before submit to assure that we hvae data..but after submit in the server side reach null values.

here sample code from page:
<html:form action="/test" method="POST" styleId="testForm">
<html:select property="sectorIdLeve11" styleId="mainSector" size="1">
<html ption>A</html ption>
</html:select>
please help with any suggesstions,tips,best practices please please please...
 
Alaa Nassef
Ranch Hand
Posts: 471
Hibernate Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Hani,

First of all, I suggest that when you are posting code, please put it in a code tag so that it can be readable.

Secondly, regarding your problem, your option tag does not have a "value" attribute, which means that the value will be sent to the action as null.
 
Taciano Morais Silva
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the same problem here. Using get method, the form submits just fine. However, even assigning the value of a textfield (input type text), I get no data in the action only on Internet Explorer.

Where should I look?
 
Joe Ess
Bartender
Posts: 9340
10
Linux Mac OS X Windows
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using the "Disable smilies in this post" option helps as well...

I don't know about your IE versus Mozilla issue. When you say "No data reach to Action class always null"...what exactly is null? What is the type of your sectorIdLeve11 property? Do you really want that property to end in two ones or is it supposed to be the letter L followed by a one? Why do you just have one htmlption that does not have the required value attribute?

- Brent
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic