You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "F. Da Costa Gomez" <dc...@fixed.com> on 2003/04/11 14:12:52 UTC

PropertySelection example

Hi,

I was wondering about the following code in the PropertySelection example

public class PurchagePage extends BasePage {
    private String clothingItem;
    private ItemSelectionModel itemSelectionModel;

    public Item getClothingItem() { return clothingItem;  }

    public void setClothingItem(Item value) { clothingItem = value;  
fireObservedChange("clothingItem", value);
    }
...

How can the getClothingItem return a String whilst the method returns an 
Item?
Esp. since the setter tries to stuff an Item into a String as well.

If its is indeed incorrect then I will come up withh my second q otherwise 
I'll just struggle on with my problem at hand.

Thx,
Fermin DCG


-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

RE: PropertySelection example

Posted by David Solis <ds...@legosoft.com.mx>.

> -----Original Message-----
> From: F.R. Da Costa Gomez [mailto:dcg@fixed.com]
> Sent: Friday, April 11, 2003 8:06 AM
> To: Tapestry users
> Subject: Re: PropertySelection example
> 
> So
> 
> private String clothingItem;
> should read
> private Item clothingItem;
> ?
Yes, this is a typo error.

> Or the methods should use String instead of Item?
> 
> To be submitted in bugzila?
> 
Please to submit it in bugzilla.

BTW, the component reference was recently modified to Tapestry 2.4 new
syntax. It is in cvs.

Regards

David

> 
> Howard M. Lewis Ship wrote:
> 
> >Looks like a typo in the example to me.
> >
> >--
> >Howard M. Lewis Ship
> >Creator, Tapestry: Java Web Components
> >http://jakarta.apache.org/tapestry
> >
> >
> >
> >
> >
> >>-----Original Message-----
> >>From: F. Da Costa Gomez [mailto:dcg@fixed.com]
> >>Sent: Friday, April 11, 2003 8:13 AM
> >>To: tapestry-user@jakarta.apache.org
> >>Subject: PropertySelection example
> >>
> >>
> >>Hi,
> >>
> >>I was wondering about the following code in the
> >>PropertySelection example
> >>
> >>public class PurchagePage extends BasePage {
> >>    private String clothingItem;
> >>    private ItemSelectionModel itemSelectionModel;
> >>
> >>    public Item getClothingItem() { return clothingItem;  }
> >>
> >>    public void setClothingItem(Item value) { clothingItem = value;
> >>fireObservedChange("clothingItem", value);
> >>    }
> >>...
> >>
> >>How can the getClothingItem return a String whilst the method
> >>returns an
> >>Item?
> >>Esp. since the setter tries to stuff an Item into a String as well.
> >>
> >>If its is indeed incorrect then I will come up withh my
> >>second q otherwise
> >>I'll just struggle on with my problem at hand.
> >>
> >>Thx,
> >>Fermin DCG
> >>
> >>
> >>--
> >>Using M2, Opera's revolutionary e-mail client:
> >>
> >>
> >http://www.opera.com/m2/
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail:
tapestry-user-help@jakarta.apache.org
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail:
tapestry-user-help@jakarta.apache.org
> >
> >
> >
> >
> >
> >
> >
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: PropertySelection example

Posted by "F.R. Da Costa Gomez" <dc...@fixed.com>.
So

private String clothingItem;
should read
private Item clothingItem;
?
Or the methods should use String instead of Item?

To be submitted in bugzila?


Howard M. Lewis Ship wrote:

>Looks like a typo in the example to me.
>
>--
>Howard M. Lewis Ship
>Creator, Tapestry: Java Web Components
>http://jakarta.apache.org/tapestry
>
>
>
>  
>
>>-----Original Message-----
>>From: F. Da Costa Gomez [mailto:dcg@fixed.com] 
>>Sent: Friday, April 11, 2003 8:13 AM
>>To: tapestry-user@jakarta.apache.org
>>Subject: PropertySelection example
>>
>>
>>Hi,
>>
>>I was wondering about the following code in the 
>>PropertySelection example
>>
>>public class PurchagePage extends BasePage {
>>    private String clothingItem;
>>    private ItemSelectionModel itemSelectionModel;
>>
>>    public Item getClothingItem() { return clothingItem;  }
>>
>>    public void setClothingItem(Item value) { clothingItem = value;  
>>fireObservedChange("clothingItem", value);
>>    }
>>...
>>
>>How can the getClothingItem return a String whilst the method 
>>returns an 
>>Item?
>>Esp. since the setter tries to stuff an Item into a String as well.
>>
>>If its is indeed incorrect then I will come up withh my 
>>second q otherwise 
>>I'll just struggle on with my problem at hand.
>>
>>Thx,
>>Fermin DCG
>>
>>
>>-- 
>>Using M2, Opera's revolutionary e-mail client: 
>>    
>>
>http://www.opera.com/m2/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
>
>
>
>  
>



RE: PropertySelection example

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
Looks like a typo in the example to me.

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry



> -----Original Message-----
> From: F. Da Costa Gomez [mailto:dcg@fixed.com] 
> Sent: Friday, April 11, 2003 8:13 AM
> To: tapestry-user@jakarta.apache.org
> Subject: PropertySelection example
> 
> 
> Hi,
> 
> I was wondering about the following code in the 
> PropertySelection example
> 
> public class PurchagePage extends BasePage {
>     private String clothingItem;
>     private ItemSelectionModel itemSelectionModel;
> 
>     public Item getClothingItem() { return clothingItem;  }
> 
>     public void setClothingItem(Item value) { clothingItem = value;  
> fireObservedChange("clothingItem", value);
>     }
> ...
> 
> How can the getClothingItem return a String whilst the method 
> returns an 
> Item?
> Esp. since the setter tries to stuff an Item into a String as well.
> 
> If its is indeed incorrect then I will come up withh my 
> second q otherwise 
> I'll just struggle on with my problem at hand.
> 
> Thx,
> Fermin DCG
> 
> 
> -- 
> Using M2, Opera's revolutionary e-mail client: 
http://www.opera.com/m2/

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