Okay, new problem. When attempting to create labels for the radio
inputs I am getting exceptions:

<li jwcid="@For" source="ognl:suggestedAmounts" element="li"
value="ognl:currentSuggestedAmount">
   <label jwcid="@FieldLabel" field="sug"><span jwcid="@Insert"
value="ognl:currentSuggestedAmount.label" /></label>
   <input type="radio" jwcid="[EMAIL PROTECTED]"
value="ognl:currentSuggestedAmount.amount" />
</li>

Produces:
Error converting value for template parameter field: No type converter
for type org.apache.tapestry.form.IFormComponent is available

Any thoughts? It says also "No type converter for type
org.apache.tapestry.form.IFormComponent is available." but should I
need to create a TypeConverter for a built in Tapestry component?

Thanks

On 10/23/06, Todd Orr <[EMAIL PROTECTED]> wrote:
nevermind, im an ass

On 10/23/06, Todd Orr <[EMAIL PROTECTED]> wrote:
> I'm having trouble getting the radiogroup component to handle a nested
> For component. The following is nested within a Form component:
>
> <div jwcid="@RadioGroup" selected="ognl:suggestedAmount">
>         <ul>
>                 <li jwcid="@For" source="ognl:suggestedAmounts" element="li"
> value="ognl:currentSuggestedAmount">
>                         <label><span jwcid="@Insert"
> value="ognl:currentSuggestedAmount.label" /></label>
>                         <input type="radio" jwcid="@Radio"
> value="ognl:currentSuggestedAmount.amount" />
>                 </li>
>         </ul>
> </div>
>
> The form allows the user to choose one of a number of pre-determined -
> suggested - amounts.These amounts are typically database driven, but
> hard coded for testing. The related java is shown below:
>
>
> public abstract SuggestedAmount getSuggestedAmount();
>
> public abstract void setSuggestedAmount(SuggestedAmount amount);
>
> public abstract SuggestedAmount getCurrentSuggestedAmount();
>
> public abstract void setCurrentSuggestedAmount(SuggestedAmount amount);
>
> private static List<SuggestedAmount> amounts = null;
>
> public List<SuggestedAmount> getSuggestedAmounts() {
>         if (amounts == null) {
>                 amounts = new ArrayList<SuggestedAmount>();
>                 SuggestedAmount a = new SuggestedAmount();
>                 a.setId("11111");
>                 a.setAmount(new BigDecimal(1000));
>                 a.setLabel("1K");
>                 amounts.add(a);
>                 a = new SuggestedAmount();
>                 a.setId("22222");
>                 a.setAmount(new BigDecimal(500));
>                 a.setLabel("0.5K");
>                 amounts.add(a);
>                 a = new SuggestedAmount();
>                 a.setId("33333");
>                 a.setAmount(new BigDecimal(250));
>                 a.setLabel("0.25K");
>                 amounts.add(a);
>                 a = new SuggestedAmount();
>                 a.setId("44444");
>                 a.setAmount(new BigDecimal(100));
>                 a.setLabel("0.1K");
>                 amounts.add(a);
>                 a = new SuggestedAmount();
>                 a.setId("55555");
>                 a.setAmount(new BigDecimal(50));
>                 a.setLabel("0.05K");
>                 amounts.add(a);
>         }
>         return amounts;
> }
>
> /**
>  * Listener for form submittal.
>  *
>  */
> public void doSubmit) {
>         BigDecimal amount = null;
>         SuggestedAmount suggestedAmount = getSuggestedAmount();
>         System.out.println(suggestedAmount);
>         if (suggestedAmount != null) {
>                 amount = suggestedAmount.getAmount();
>         }
>         System.out.println("AMOUNT" + amount);
> }
>
> No matter what I choose, I get null print to the console. Has anyone
> had any experience using the Radiogroup in this way before?
>
> Thanks,
> T
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to