You are currently browsing the archives for the Web related category.

Paginated lists made really easy (part 2 of 2 - back-end)

In our first installment we reviewed the front-end part of developing a paginated list using AJAX and Java. Now we will dive into the back-end of our pagination mechanism.
More »

Setup your web server to properly serve MS Office 2007 files

20-October-2008 | Tags: , , , ,
Posted in Tips, Web related | No Comments »

Most web servers are missing the new MIME types needed for Office 2007 files (docx, xslx, etc.) and when you server one of this files from your web application the users browser typically tries to open them as ZIP files.
More »

Download a file using Java

10-October-2008 | Tags: , , , , ,
Posted in Tips, Web related | No Comments »

Download a file using Java from a URL should be a simple task, well it is :P. If you just don’t want to think too much about it here is a sample method to do it.
More »

Simple & nice Javascript date picker

2-September-2008 | Tags: ,
Posted in JavaScript, Tips, Web related | No Comments »

Check it out at http://www.styledisplay.com/mootoolsdatepicker/, it’s quite simple to use and looks great.

Paginated lists made really easy (part 1 of 2 - front-end)

You have to display a list of items in a web application, for each item allowing several operations (ie modification, deletion, etc.). The list can potentially be quite long, so pagination is required.
This scenario is common in backoffice web applications and public web sites, be it for administering information or as search results display, etc.

I’ll describe a simple way to implement a lightweight pagination engine that minimizes load on the server and gives the user the better experience possible. In this first installment I’ll focus on the front-end side, describing how to lay out the HTML, load it using AJAX and implementing the basic operations the user needs to navigate in your paginated list.
More »

AJAX autocomplete

Using a nice AJAX auto completable input box is much nicer (for the user) than a combo box with 100 options. If you use jQuery, you may use a quite easy yet powerful plug-in called jquery.autocomplete (original, eh?). Grab it at http://www.pengoworks.com/workshop/jquery/autocomplete.htm.
More »

Long fields breaking your HTML?

6-April-2008 | Tags: , , , ,
Posted in Tips, Web related | No Comments »

I guess in more than one time you needed to display some text in a space where it not always will fit. For example graphical designers love to lay out lists and tables and purposely forget about how long each field will really be ;)

A solution I like is to display always a fixed number of characters and add the full text as a title (mouse over display). A really easy way to do this is using the substring function from the JSTL functions library, for example:

1
2
3
<span title="${myBean.myProp}">
${fn:substring(myBean.myProp,0,25)}
</span>