10 Replies Latest reply on Oct 19, 2007 8:11 AM by demetrio812

    New blog post on CDK

    demetrio812

      Hi,
      I just published a new post on my blog that explain how to make a skypecall button component (very simple!) and how to use it, here it is the link:

      http://demetrio812.blogspot.com/2007/10/creating-jsf-component-using-richfaces.html

      I'm still learning CDK so every suggestion are welcome!

      Thank you!

      Demetrio

        • 1. Re: New blog post on CDK
          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

            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

              I meant abstract getters and setters to them actually.

              • 4. Re: New blog post on CDK
                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

                  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

                    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

                      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

                        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

                          Developer, who wrote unit tests for this component use them. No other reason.

                          • 10. Re: New blog post on CDK
                            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