0

I am using Struts2 <s:radio> today:

Following Struts doc, I have the following code in my jsp:

<s:radio name="outputFormat" label="Choose an output format" list="#{'01':'Biological Outcome Only','02':'Raw Binary Data Only','03':'Biological Outcome and Raw Binary Data'}" value='01' />

NetBeans is not happy with my code and marks the whole list component list="#{'01':'Biological Outcome Only','02':'Raw Binary Data Only','03':'Biological Outcome and Raw Binary Data'}" in red. But it allows me to run the program. The three radio buttons are displayed, but the first button is not pre-selected, as we want. In other words, value='01' is not working.

Now following mkyong example, I change my code as follows:

<s:radio name="outputFormat" label="Choose an output format" list="#{'1':'Biological Outcome Only','2':'Raw Binary Data Only','3':'Biological Outcome and Raw Binary Data'}" value="1" />

This time, everything is working perfected: the three radio buttons are displayed and the first button is pre-selected. But even that, NetBeans is not happy either in that it marks the whole list component list="#{'1':'Biological Outcome Only','2':'Raw Binary Data Only','3':'Biological Outcome and Raw Binary Data'}" in red. Do you know why?

student
  • 289
  • 2
  • 14

0 Answers0