Bootstrap Modals and Selenium

I’ve been playing around with Selenium. Today, I’ll add a simple automation task to my Jersey, Gson and DataTables project that uses an explicit selenium wait to handle the Bootstrap modal dialog.

The first step is to update our pom.xml. I’ll be using:

Read More

End of the Dream

I’m a Broncos fan. So I freely admit that my objectivity regarding DeflateGate is suspect. But one thing is clear.

Not so long ago, Jastremski and McNally would have said they were living the dream. Jastremski worked for one of the premier franchises in the NFL, perennial Super Bowl contenders. Half the male population of the United States wanted his job. McNally was a part time employee of the Kraft group, working Patriots home games. McNally is reported to have been associated with the Patriots for ⅔ of his life.

Now, Jastremski is indefinitely suspended without pay. He will probably never work for a professional sports team again. McNally will never be on the sidelines of an NFL game again.

However DeflateGate plays out, Robert Kraft, Bill Belichick and Tom Brady will be fine. Kraft will be a fabulously wealthy NFL owner, Belichick will be one of the best coaches in NFL history and Brady will be an all time great at quarterback. But the lives of Jastremski and McNally will never be the same again.

Fun with DataTables

I gave a presentation on DataTables to my local Linux User’s Group a while back. That presentation included a DataTables configuration samples page demonstrating the use of several modules.

The samples page starts with a standard bootstrap table. You can apply several different DataTables configurations to the table and view both the resulting DataTable and the corresponding javascript (in most cases).

I hope you find it useful.

What Makes This Book So Great

Thanks to a Tyler Cowen post, I just lost the better part of a day reading posts by Jo Walton on Tor.com this past week. If you love science fiction and fantasy, then you owe yourself a skim of her posts - there are only about 800 of them. And subscribe to the tor.com rss feed while you’re at it.

That is the title of the new Jo Walton book, and the subtitle is Re-Reading the Classics of Science Fiction and Fantasy. It is an extended paean to the pleasures of re-reading, exhibiting a taste which is interesting , useful, and yet uneven …

DataTables ajax error handling

Today, I’ll add the ability to edit users. This will be easy, as most of the pieces are already in place. First, I’ll add a new editUser method that accepts an updated user object, verifies that the user exists and then saves the updated user object. The only differences between the new editUser method and the existing postUser method are:

  1. Invert the test on users.containsKey() to throw an error when the user does not exist (editUser) rather than when the user already exists (postUser).
  2. New method name and @Path annotation

Read More

Saving Mr Banks

I caught Saving Mr Banks, on the making of the Mary Poppins Disney movie, on cable the other night. Worth seeing, especially if you prepaid via a cable subscription. Many reviewers praise the flashbacks to Mrs. Travers’ past and how it tied to her current behavior. Personally, I wasn’t that interested in why she was a pain. I just enjoyed watching the Disney team work their way through it.

The final scene has a tape recorder playing some of the original recordings between Mrs. Travers and the Disney team. I can’t be positive, but I believe my family owned a Wollensak T-1500 reel to reel tape recorder in the early 70’s.

Me and my Fitbit

I am a sterling example of:

Human beings adjust behavior based on the metrics they’re held against. Anything you measure will impel a person to optimize his score on that metric.

A daily weigh in on the Wii Fit helped me lose 15 pounds in 2010 (I gained about five pounds back over the next three years). I received a Fitbit Force as a present last year and I was able to ride that for another 15 pound loss. Another 15 pounds and I can declare victory.

I’d like to have a heart rate sensor in my next fitness tracker. The Fitbit Charge HR or Surge might be the answer. I just don’t know if I can wait that long - a new fitness tracker would be a great Xmas present.

DataTables Column Render

Today I’ll add an actions column to the DataTable. The column will contain an edit icon that will open up a dialog displaying the row parameters for update. I’ll keep this post to a reasonable length by just displaying an alert on submit rather than connecting to the back end.

First, I’ll add support for the Font Awesome font and CSS Toolkit. This will let me display an icon as the anchor text for the new actions column.

Read More

Well Rounded

It has always been my choice to focus on the server side rather than the client side. But my recent exploration into Bootstrap is really turning things around. The Bootstrap grid takes the complexity out of html layout. And the success of Bootstrap has created a market for Bootstrap Themes at {wrap}bootstrap, Start Bootstrap, Creative Market, et al. It is absolutely possible to create a good looking, mobile ready web application without an advanced degree in browser specific behavior.

I used to say I was full-stack because I could build a functional web application in basic html and css. But I wouldn’t have been proud of the front-end. With Bootstrap and Datatables in my toolkit, I don’t need to apologize for my front-end.

Modal Dialog for Jersey, Gson and DataTables

Today, I will add a modal dialog to add new users.

First, the table presentation is updated to use the appropriate bootstrap table presentation. The base table class defines light padding with horizontal dividers. I add the table-striped class to add zebra-striping and the table-bordered class to add borders on all sides of the table and cells.

1
2
3
4
5
6
7
8
9
@@ -20,7 +20,7 @@
<div class="row">
<div class="col-md-8">
<h2>DataTable with ajax object feed</h2>
- <table id="users" class="display">

+ <table id="users" class="table table-striped table-bordered">
<thead>
<tr>
<th>email</th>

Read More