-
1. Re: New blog post on CDK
demetrio812 Oct 17, 2007 7:01 PM (in response to demetrio812)For Sergey: in case you don't come back to my blog post here it is my fast reply:
-------------------
Hi, I saw the spacer example: there are some (not all) attributes in UI class but I can't see where they are used so I thought to put all...
Can you explain better this point so I can correct the article?
-------------------
Btw I will also see other components tomorrow to better understand the use of UI class. :)
Thanks!
Demetrio -
2. Re: New blog post on CDK
sergeysmirnov Oct 17, 2007 7:06 PM (in response to demetrio812)No. It is not about the correction yet.
I just wonder why you need to define all attributes as abstract properties in your UISkypecall class. -
3. Re: New blog post on CDK
sergeysmirnov Oct 17, 2007 7:09 PM (in response to demetrio812)I meant abstract getters and setters to them actually.
-
4. Re: New blog post on CDK
demetrio812 Oct 17, 2007 7:16 PM (in response to demetrio812)You are right I don't need them, in fact I just made a try removing them and it works.
I'm going to update the post but first I want to understand better when I need them and when not.
So can you make an fast example when they are needed?
Thanks!
Demetrio -
5. Re: New blog post on CDK
sergeysmirnov Oct 17, 2007 7:38 PM (in response to demetrio812)You need them if you use them explicitly in this abstract UI class. As soon as you have no one specific method in this class, it is not your case.
If you look at the generated rendering specific class that inherits the abstract UI, you can see the (non-abstract) getter and setter generated there.
The same for a Renderer Base class. If you have it (you have no in your case) and use some getters and setters, you need to declare them there as abstract ones. -
6. Re: New blog post on CDK
demetrio812 Oct 18, 2007 4:17 AM (in response to demetrio812)Now I see it!
So, if I understood well, the ones declared in UISpacer class are unuseful, isn't it?
Thank you!
Is there something else to correct in my blog post?
Thanks!
Demetrio -
7. Re: New blog post on CDK
sergeysmirnov Oct 18, 2007 9:02 AM (in response to demetrio812)It depends. Take a look at the real RichFaces components in the SVN. UI class is not always empty.
-
8. Re: New blog post on CDK
demetrio812 Oct 18, 2007 11:04 AM (in response to demetrio812)In fact I was looking at the real spacer component, there are getter and setter in UISpacer class but I don't understand why...do I miss something?
thanks
Demetrio -
9. Re: New blog post on CDK
sergeysmirnov Oct 18, 2007 9:52 PM (in response to demetrio812)Developer, who wrote unit tests for this component use them. No other reason.
-
10. Re: New blog post on CDK
demetrio812 Oct 19, 2007 8:11 AM (in response to demetrio812)Yes...stupid me!!
I did not consider unit test (I have to look at the example to learn how to write them too)...I just checked and yes you are right!
Thanks for your support!!
Demetrio