Coming Up for Air

Mojarra Scales 1.3.1 Has Been Released

Tuesday, April 21, 2009 |

Early this morning, I published Mojarra Scales 1.3.1. I’ve been remiss in making good updates where when I make release, so, rather than creating a new post for each release long after the fact, I’ll try to being everyone up to the current state in just one.

Much has changed over the past few weeks. We started using Scales in the GlassFish Administration Console as part of UI update, which has been a great vehicle for driving change and finding bugs. One of the most pressing changes, which should have been in since day 1, is the namespacing of the JavaScript code. In 1.3 and earlier, all the JS functions and vars were in the global namespace. As of 1.3.1, they are now in the scales namespace. For the most part, this shouldn’t affect most users, except, perhaps, for those sc:panel. This namespace should go much farther in preventing naming collisions, which is is nice for all of us. :)

In case I haven’t mentioned this (it’s really late here, and I honestly don’t remember : ), Scales is now available via the java.net Maven 2 repository. The dependency element looks like this:

1
2
3
4
5
<dependency>
    <groupId>com.sun.mojarra</groupId>
    <artifactId>mojarra-scales</artifactId>
    <version>1.3.1</version>
</dependency>

Furthermore, all documentation and issue tracking are now done on Kenai.com (which, I must say, has been really nice so far).

One of the things I’ve disliked about the build for the longest time was its dependence on Java 5. This was due to a very odd bug regarding the ant-run plugin, apt, and Java 6. I had never been able to track it down, so I just noted the Java 5 requirement and moved on. I finally got tired of it, and removed the need for apt, which was the annotations that produced the JSF metadata. This change, while certainly fixing the build system, brought another important, and not wholly distasteful change: the removal of JSP support. The XML for custom UIComponent`s in both `faces-config.xml and taglib.xml is not that onerous (though I’ll be happy to see it go in JSF 2 ; ). The TLD (and Tag class) required for JSP, however, is truly awful. Since fewer people are using JSP these days, and that it is all but deprecated in JSF 2, I decided not to reproduce all the JSP support metadata manually and just drop it altogether. If you’re using JSP, I know this may not be good news, but you really should be using Facelets anyway. :)

I’ve also removed the dependency on JSFTemplating, which was being used for template-based Rendering. While the feature was nice for me, I had personally run into issue with the dependency in applications (e.g., JSFTemplating was processing my views and not Facelets. While that’s fixable, it’s a hurdle I’d rather not require). Furthermore, many of the components were using Java-based `Renderer`s anyway, so I decide to convert the others and remove the extra dependency. This allowed me to reorganize and clean up a lot of code.

I also introduced the use of FacesTester, which I’ve mentioned here a couple of times. While FacesTester is still young and maturing, it has allowed me to test for certain classes of bugs, namely, I can easily insure that all components render correctly, and that UIInput components behave correctly on POST-back. I also test that the state saving code is accurate and complete for each component. In addition, I’m slowly expanding the suite of tests to cover as much of the library as possible, which is good for both libraries. In addition, I’ve added the use of Cobertura to help track and analyze unit test coverage, and Hudson for continuous integration.

In addition to those "big ticket items," here’s a quick run down of some other smaller changes, in no particular order:

  • Bug fix in Layout rendering and handling

  • Added a helper function (getLayout()) to acquire a handle to a specific LayoutManager instance

  • Do not render LayoutUnits if rendered=false

  • Added the YUI compressor to the build. This saved up to 53% on some files

  • Got rid of that ugly blue background on sc:layout

I think that covers the highlights. If there are any issues I’ve missed or features you’d like to see, please feel free to open an issue, and I’ll get to it as quickly as I can. :)

Search

    Quotes

    Sample quote

    Quote source

    About

    My name is Jason Lee. I am a software developer living in the middle of Oklahoma. I’ve been a professional developer since 1997, using a variety of languages, including Java, Javascript, PHP, Python, Delphi, and even a bit of C#. I currently work for Red Hat on the WildFly/EAP team, where, among other things, I maintain integrations for some MicroProfile specs, OpenTelemetry, Micrometer, Jakarta Faces, and Bean Validation. (Full resume here. LinkedIn profile)

    I am the president of the Oklahoma City JUG, and an occasional speaker at the JUG and a variety of technical conferences.

    On the personal side, I’m active in my church, and enjoy bass guitar, running, fishing, and a variety of martial arts. I’m also married to a beautiful woman, and have two boys, who, thankfully, look like their mother.

    My Links

    Publications