You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Muhammad Gelbana <m....@gmail.com> on 2011/09/23 17:52:17 UTC

[t5.2.6] Non compatible component declaration in tml and java class not firing an exception

I tried to have the most descriptive subject..that was my best shot

Here is what happened. I by mistake, declared a select input field in a page
template and tied it to a component declared in the page's java file using
the component type TextField. And so the input field showed up as a text
field which drove me crazy for around 20 mins not knowing whats wrong (I
really needed to sleep then !)

Here is in example of what I mean:

*Index.tml*
<t:select model="literal:a,b,c" value="select" t:id="select"/>

*Index.page*
@Property
private String select;

@Component(id="select")
private *TextField* select


Again, it's obviously a tapestry user mistake, but should this raise an
exception to point out what's wrong ?
If this is a feature offered, I just can't see how I use it !

Thank you all :)

-- 
Regards,
Muhammad Gelbana
Java Developer

Re: [t5.2.6] Non compatible component declaration in tml and java class not firing an exception

Posted by Steve Eynon <st...@alienfactory.co.uk>.
Yeah, it's generally safer to use the @InjectComponent annotation



On 24 September 2011 06:58, Muhammad Gelbana <m....@gmail.com> wrote:
> I opened a jira issue as Thiago suggested:
> https://issues.apache.org/jira/browse/TAP5-1667
>
> On Fri, Sep 23, 2011 at 5:52 PM, Muhammad Gelbana <m....@gmail.com>wrote:
>
>> I tried to have the most descriptive subject..that was my best shot
>>
>> Here is what happened. I by mistake, declared a select input field in a
>> page template and tied it to a component declared in the page's java file
>> using the component type TextField. And so the input field showed up as a
>> text field which drove me crazy for around 20 mins not knowing whats wrong
>> (I really needed to sleep then !)
>>
>> Here is in example of what I mean:
>>
>> *Index.tml*
>> <t:select model="literal:a,b,c" value="select" t:id="select"/>
>>
>> *Index.page*
>> @Property
>> private String select;
>>
>> @Component(id="select")
>> private *TextField* select
>>
>>
>> Again, it's obviously a tapestry user mistake, but should this raise an
>> exception to point out what's wrong ?
>> If this is a feature offered, I just can't see how I use it !
>>
>> Thank you all :)
>>
>> --
>> Regards,
>> Muhammad Gelbana
>> Java Developer
>>
>>
>
>
> --
> *Regards,*
> *Muhammad Gelbana
> Java Developer*
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: [t5.2.6] Non compatible component declaration in tml and java class not firing an exception

Posted by Muhammad Gelbana <m....@gmail.com>.
I opened a jira issue as Thiago suggested:
https://issues.apache.org/jira/browse/TAP5-1667

On Fri, Sep 23, 2011 at 5:52 PM, Muhammad Gelbana <m....@gmail.com>wrote:

> I tried to have the most descriptive subject..that was my best shot
>
> Here is what happened. I by mistake, declared a select input field in a
> page template and tied it to a component declared in the page's java file
> using the component type TextField. And so the input field showed up as a
> text field which drove me crazy for around 20 mins not knowing whats wrong
> (I really needed to sleep then !)
>
> Here is in example of what I mean:
>
> *Index.tml*
> <t:select model="literal:a,b,c" value="select" t:id="select"/>
>
> *Index.page*
> @Property
> private String select;
>
> @Component(id="select")
> private *TextField* select
>
>
> Again, it's obviously a tapestry user mistake, but should this raise an
> exception to point out what's wrong ?
> If this is a feature offered, I just can't see how I use it !
>
> Thank you all :)
>
> --
> Regards,
> Muhammad Gelbana
> Java Developer
>
>


-- 
*Regards,*
*Muhammad Gelbana
Java Developer*