Matt RaibleMatt Raible is a writer with a passion for software. 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.
You searched this site for "form". 326 entries found.

You can also try this same search on Google.

Adding a form element on the fly.

I used this code on my project yesterday and thought I'd share.

<script language="text/javascript">
    function addActionToForm() {
        // get the form to add the input element to
        var form = document.getElementById("noteForm");
        
        // Add a action input element
        var action = document.createElement("input");
        action.setAttribute("type", "hidden");
        action.setAttribute("name", "action");
        action.setAttribute("id", "action");
        action.setAttribute("value", "Save");
        
        form.appendChild(action);
        form.submit();
    }
</script>

This works great for me when I want to simulate a button named "action" being clicked, but I want to submit the form with JavaScript.

Hmmm, doesn't seem to work in IE5/Mac. Any tips?

Posted in The Web at Aug 28 2002, 12:03:57 AM MDT 1 Comment

XDoclet and Struts Validator

From the struts-dev list and Erik Hatcher:

My XDoclet Struts Validator validation.xml (for Struts 1.1) has been posted to the XDoclet tracker.
I'm hoping it will be added to the codebase and put into the upcoming new release of XDoclet (although I'm using XDoclet from CVS builds). Read the HTML file attachment on the issue page above for an example of how it works. If you're hand-coding validation.xml and using ValidatorForm extensions then this is for you!

I can't wait to use XDoclet in my next project! On my current project, I've already written most of the ValidationForms I need. I used the Generator package to do this, but I hope to either (1) refactor my current project to use Castor/XDoclet like Roller, or (2) use it on my next project.

I ordered an Ant book this evening in hopes of learning a lot more about Ant. I think I know a lot, but there's always room for more knowledge.

Posted in Java at Aug 25 2002, 03:47:45 PM MDT Add a Comment

Struts Console version 2.1

is now available.

http://www.jamesholmes.com/struts/

Struts Console is FREE software. This release adds support for the IntelliJ IDEA IDE, one of the favorites of many developers.

Changes with Struts Console v2.1

  • Fixed bug where the "initial" attribute of the <form-property> element was getting set to blank when it wasn't specified.
  • Added plugin support for IntelliJ IDEA.

I don't use the Struts Console, but it does look like a nice product. I DO like IDEA, so it's nice to see the compatibility. I have installed it with Forte4J (now Sun ONE Studio 4) and it seemed to install and work pretty well. On my current project, I don't modify the struts-config.xml enough to really use a visual editor. I usually just use Homesite or XML Spy - of course, it helps that I know the struts-config DTD.

Posted in Java at Aug 20 2002, 01:12:34 AM MDT Add a Comment

Struts 1.1 Beta 2

is released! Your 1.0.x application should work just fine with this latest release - if they don't, post a question to the Struts User List. One reason to upgrade (in my opinion) is that my favorite features, Validator and Tiles, are now part of the core package. And they are now easily configured as "plug-ins" in your struts-config.xml file. Here is how I configure them in my application:

<!-- ========== Plug Ins Configuration ================================== -->
<!-- Validator Plug-In Configuration -->
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
</plug-in>

<!-- Tiles Plug-In Configuration -->
<plug-in className="org.apache.struts.tiles.TilesPlugin">
    <set-property property="definitions-config" value="/WEB-INF/tiles-config.xml" />
    <set-property property="definitions-debug" value="0" />
    <set-property property="definitions-parser-details" value="1" />
    <set-property property="definitions-parser-validate"
value="true" />
</plug-in>

There is also DynaBeans which make it easy to configure a FormBean in your struts-config.xml file without creating a concrete .java file. Here's an example:

<form-bean name="messageForm" type="org.apache.struts.action.DynaActionForm">
    <form-property name="toName" type="java.lang.String"/>
    <form-property name="toEmail" type="java.lang.String"/>
    <form-property name="subject" type="java.lang.String"/>
    <form-property name="content" type="java.lang.String"/>
</form-bean>

Posted in Java at Aug 13 2002, 02:19:44 AM MDT Add a Comment

Centering tables with CSS on IE5/Mac

I've been using <table align="center"> in my pages for a few months now because I couldn't get my tables to center align with style="margin: 0px auto". Until today, I found this tip with a simple search on Google.

As demonstrated in this simple example page, IE5/Mac centers tables using the correct margin styles if they are written in long-form as margin-left:auto; margin-right:auto;. The shorthand forms such as margin:0 auto; do not work. Fortunately this bug is easily worked around by using the long-form syntax.

Good to know, life just got a little easier.

Posted in Mac OS X at Aug 06 2002, 04:34:37 AM MDT Add a Comment

Roller Login Enhancement

I added an enhancement to roller today. Basically, it's a trick I learned with form-based authentication. Rather than having 2 different pages (one for the login, and one for the login failure), you use one page and specify a paramter, such as /login.jsp?error=true for the <form-error-page> value. This makes it easy to add a error message at the top with something like this:

<div class="error">
<logic:present parameter="error">
     <bean:message key="error.password.mismatch"/>
</logic:present>
</div>

Posted in Roller at Aug 04 2002, 06:16:46 AM MDT Add a Comment