Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.

10+ YEARS


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

Improving JSF in AppFuse

I've noticed the number of AppFuse users using JSF starting to pick up lately. This is probably mostly because Sanjiv Jivan and Thomas Gaudin (both committers) have started to use it on their projects. Thomas has been nice enough to write a couple of interesting blog entries on JSF and AppFuse. Click on the links below to read more.

Posted in Java at Dec 29 2005, 05:09:51 PM MST 1 Comment

Use Ant to auto-build your AppFuse project in Eclipse

One of the issues that AppFuse has is it's not that IDE-friendly. When I first started creating AppFuse (December 2002), Eclipse had already been released. However, I only used it as a fancy text editor, and didn't structure AppFuse to be Eclipse-friendly. Most of the unfriendliness is caused by XDoclet, but there's a way to fix that. Rather than using the default "Java Builder" to auto-build your Eclipse project, you can use Ant. Below is a set of instructions that show how to configure Eclipse 3.1 to use Ant as the builder for an AppFuse project.

Step 1: Right-click on your project and go to Properties. Select the Builder menu on the left and click the "New" button.

Builders

Step 2: Select "Ant Build" in the Configuration Type dialog.

Builders

Step 3: In the Properties window, select the appropriate locations for Buildfile and Base Directory (in the Main tab). In the Targets tab, set everything to the default target. Finally, in the Classpath tag set Ant Home to where you have Ant installed.

Builders

Personally, I haven't used this setup to work on an AppFuse project yet, but it seems quite useful. Hat tip to Erik Weibust to showing me how to do this while at The Spring Experience.

Posted in Java at Dec 29 2005, 12:26:20 PM MST 3 Comments

The future of the DisplayTag Library

From the displaytag-devel mailing list:

I am sorry if I am asking a stupid question but is there any activity going on in the project? There are no new releases for almost a year... Neither are there any news on the project page. In our project we have modified the 1.0 version a bit and would like to share these changes with the community.

Fabrizio's response:

See http://displaytag.sourceforge.net now ;)

the website was frozen to the last 1.0 release, also due an extensive refactoring to the build/documentation system (migration to maven 2, splitting of optional modules and examples, ...) but activity on the project never stopped.

1.1 is now near, and I switched the default homepage to the 1.1 documentation. Warning: it's not released yet, but nightly builds are up.

The biggest feature of 1.1 has to be the ability to do external sorting and paging.

If you're looking for Ajax support in the displaytag, look no further than AjaxTags. I haven't been able to get ajax:displayTag working in my projects because I'm using a newer version of Prototype. However, it looks like the next version of AjaxTags supports the latest version of Prototype.

In addition to AjaxTags, you can also use AjaxAnywhere. Here's the code you'll need to do that (after adding AjaxAnywhere to your project):

<aa:zone name="userTable">

<display:table name="users" class="list" requestURI="" id="userList" export="true" 
    excludedParams="*" pagesize="5" sort="list">
    <display:column property="id" sort="true" href="editUser.html"
        paramId="id" paramProperty="id" titleKey="user.id"/>
    <display:column property="firstName" sort="true" titleKey="user.firstName"/>
    <display:column property="lastName" sort="true" titleKey="user.lastName"/>
    <display:column titleKey="user.birthday" sort="true" sortProperty="birthday">
        <fmt:formatDate value="${userList.birthday}" pattern="${datePattern}"/>
    </display:column>
</display:table>

</aa:zone>

<script type="text/javascript">
    ajaxAnywhere.getZonesToReaload = function() { return "userTable" }
    ajaxAnywhere.onAfterResponseProcessing = function() { replaceLinks() }
    function replaceLinks() {
        // replace all the links in <thead> with onclick's that call AjaxAnywhere
        var sortLinks = $('userList').getElementsByTagName('thead')[0]
                                     .getElementsByTagName('a');
        ajaxifyLinks(sortLinks);
        if (document.getElementsByClassName('pagelinks').length > 0) {
            var pagelinks = document.getElementsByClassName('pagelinks')[0]
                                    .getElementsByTagName('a');
            ajaxifyLinks(pagelinks);
        }
    }
    function ajaxifyLinks(links) {
        for (i=0; i < links.length; i++) {
            links[i].onclick = function() {
                ajaxAnywhere.getAJAX(this.href); 
                return false;
            }
        }
    }
    replaceLinks();
</script>

Libraries used in above code: AjaxAnywhere 1.0.2, DisplayTag 1.0 and Prototype 1.4.0_pre4. You can also see a demo online or download the code.

Posted in Java at Dec 29 2005, 10:46:56 AM MST 26 Comments