1 2 Previous Next 17 Replies Latest reply: Apr 12, 2011 5:48 AM by elisei RSS

CDK4 guide

Bernard Labno Master

Hi, I would like to rewrite my components (focus,notify,schedule) for RF4. I've read articles about repository structure and have to tell you that some more explanations would be helpful. Root has sub-projects, each with it's own trunk/branch/tags. Is there any way to checkout stuff needed for development in one step (right now i'm checking out folder by folder), without checking out all tags and branches?

 

I'v tried creating component witch richfaces-ui-singlemodule-archetype, but it just generated pom with groupId and artifactId, which is worthless. No parent pom reference even!

 

Please post some short guide for creating simple component with CDK4 so that community can start rolling.

  • 1. Re: CDK4 guide
    Ilya Shaikovsky Master

    for now unfortunatelly we have only descriptions which placed at wiki and referenced from doc's page. And you could also check existent components. Kickstart for CDK - in progress for M1 and will be announced as far as some draft available for sure! thanks for your patience.

  • 2. Re: CDK4 guide
    Bernard Labno Master

    I'm carving my way through. My notes on working with CDK4 will be here : https://docs.google.com/Doc?docid=0AU_Xm4aXKuUrZGZobndrZndfMTBkZjVweHdndw&hl=en&authkey=CI617aML

     

    This will be updated day by day. Comments and questions are welcome in this thread.

  • 3. Re: CDK4 guide
    Jay Balunas Master

    This is a great start to a document we really need!

     

    Our plan is to create several wiki pages follow a similar concept.  Specifically "How to checkout & build RichFaces 4.0", "Development Guidelines for RichFaces 4.0", and "Component Development with RichFaces 4.0 & the CDK".

     

    If you are interested, and it seems like you are ;-) I think it would be great to work together on this, and get an outside perspective on areas that need updates, or that are clumsy.

     

    I'm going to be busy at JBoss World this week, but will try to contact later in the week, or next, and I'll review.  In the mean time I think it would be good to have Alex write up more of the basics with CDK. 

     

    Thanks,

    Jay

  • 4. Re: CDK4 guide
    Bernard Labno Master

    How do I set tag namespace without faces-config.xml?

    Can I mix faces-config.xml and annotations?

    Why do you name some classes AbstractXXX? I see that there is AbstractAjaxFunction and it generates UIFunction. Is there no longer anything like HtmlFunction?

    Why do we have renderer attribute in @JsfComponent since we have it also in template?

    I have @Attribute annotated method returning Boolean (not boolean) named getIsRTL, which allows null. CDK generates getters using "isIsRTL" prefix, which causes generated class not to override all methods and what is more, it can throw nullpointers:

    Boolean.valueOf(getStateHelper().eval(Properties.isRTL, null).toString())

    If state helper evaluates isRTL attribute to null then there should be no toString call !

    I know that as a workaround I could pass defaultValue, but that is not flexible.

  • 5. CDK4 guide
    Alexander Smirnov Master

    Sorry for a long delay, but I only got the time to pay attention for documentation after 4.0.Final release.

    There are my points:

    - build instructiona are outdated, I think it's not a part for CDK document.

    - Jboss moved Maven repositories to the Nexus, urls were changed. Same for java.net.

    - bom and parent  are not necessary, you can use it to omit versions of JSF/RichFaces dependencies and plugins configuration. See cdk/maven-cdk-plugin/src/it projects for example.

    - cdk reads constants COMPONENT_TYPE and COMPONENT_FAMILY from class, so you can skip them in annotation.

    - you can use Java keywords as attribute names, it was fixed before CR2

    On TODO's:

    - you can add custom dependencies where you wish. CDK relays on the standard Maven plugin only, so you free to organize your project as you wish.

    - <h:scripts> substituted as @ResouceDependencies annotation.

    - all scripts rendered by JSF, according to their target ( HEAD,FORM,BODY)

    - If you use the single template with base class, put renderer type and base class to template. You can use annotations to assign the same template to different base class ( supposed for components like UIMessage/UIMessages )

    - source locations readed form Maven pom.

    - TagHandler generated if you have attribute with MethodExpression.

    - listener tags generated for all events marked as @JsfEvent

    - taglib namespace can be defined it faces-config extention or by package-level @Taglib

    - Servlet and JSF detect mime type by file extension.

    - to generate TagHandler for non-default caes, explicitly define it by @Tag attribute inside @JsfComponent, @JsfBehavior etc.

    - ecss issue should be already fixed.

    - clientId evaluation in JSF 2 performed my framevork, see JSF documentation.

    - viewLocale evaluated on createView call.

  • 6. CDK4 guide
    elisei Newbie

    Is there some kind of draft of the CDK4 guide? Or some hints (other than the Google doc nothes)?

     

    A small HowTo in building own components and extending existing ones would be great. Thanks

  • 7. CDK4 guide
    Jay Balunas Master

    One of the things we are working on right now ;-)  https://issues.jboss.org/browse/RFPL-1360

  • 8. CDK4 guide
    Ilya Shaikovsky Master

    more complete documents will be avilable really soon. Alex working on them hard.

  • 9. CDK4 guide
    Ilya Shaikovsky Master

    he he.. you beat me Jay

  • 10. CDK4 guide
    elisei Newbie

    Great. Any details about how long it will take?

    Even if it the prediction is not accurate, it would help me. Just to know if it takes 1 day, 1 month or 1 year.

     

    If I can help somehow (e.g. by testing) let me know. Thanks for the answer.

  • 11. CDK4 guide
    Jay Balunas Master

    WIthin a month! 

     

    That would be AWESOME if you could review it and see if there are missing aspects.  A new view point is always a good thing in that case!

     

    -Jay

  • 12. CDK4 guide
    elisei Newbie

    At least I can try. Im am rather new to jsf and component libs, but this could also be a good test to see if a newbie understands the doc.

    So let me know when you have a draft or something similar.

     

    Greets,

    Elisei

  • 13. CDK4 guide
    elisei Newbie

    How can I use CDK4 without maven? To call the generate function?

  • 14. CDK4 guide
    Alexander Smirnov Master

    First, I put some articles to the wiki . You can also see them at the my blog.

    Second, CDK supposed to use with any build tool - core project has no dependencies from Maven or other system. Unfortunately, I had no time to implement ANT task or something like Groul.

    Watch for the wiki and blog for description how to run CDK.

    The only thing that I hope to finish is running CDK as the Annotation Processor, to use it inside IDE or any Java compiler.

1 2 Previous Next