Feed on
Subscription

Ajax Dragging and Dropping

Using AJAX, user interfaces such as dragging and dropping become possible. We will briefly cover that here.
Dragging and dropping involves two items

A dragging source, and
A drop target.
The source is something that you click on, and drag around. The target is where you release the source, and which potentially does something useful with it!
...

Ajax Saving Your Own Data in the Session

Earlier we learned about the session, and how to use it for form elements.
The session is a useful concept, and in addition to form elements, it can also be helpful to save your own data for a user.

The Jaxcent "session" matches the "session" of a Java Application Server if Jaxcent is running in a Java Application Server. Therefore if you have a legacy web application using a Java Application Server, you can use the session from both Jaxcent pages and the Application Server servlets/JSPs, and they can co-operate.
...

Ajax Creating New Elements and Moving Existing Elements

Sometimes just hiding and showing page elements is appropriate. At other times, it is more appropriate to create new elements and insert them in the page. Sometimes, elements just need to be moved around!
In AJAX programming, great effects can be achieved using all these techniques.
...

ajax Hiding and Showing Page Elements

A powerful UI technique is to hide and show elements to the user as needed.
Any individual elements can be hidden or shown by calling the "hide()" or "show()" methods.

But instead of hiding and showing various blocks of elements individually, in many cases it is much simpler to put them inside DIV tags, and then to hide/show entire DIVs.
...

Hello, World

The tutorial server is already set up with two files:
A HelloWorld.html file
A HelloWorld.java file
In addition, the default JaxcentConfig.xml file already map these two -- in other words, it tells Jaxcent to connect the HelloWorld.html file with the HelloWorld.java code.
...

Ajax Getting Started

Getting Started
Installing the Tutorial Server
In this tutorial, we want to focus on the AJAX details rather than installation and setup issues. There are various different setup scenarios available for Jaxcent, and discussing them will take the focus away from the actual programing.
...

Protecting your website with a login page

Some sites require that all users log-in using a username and password, before being able to visit any page.
This can be done using JSP sessions or servlets, and in fact this was a common technique for a while. But starting with a new release of Servlets specifications (2.2) from Sun, this feature is now very simple to implement.
...

Techniques for form editing

A tag library such as the one that comes with the Blazix server, may not be available in your environment. How can you allow similar features without using a tag library?
It is a little tedious, but it can be done. Basically, you must edit each HTML tag yourself, and put in a default value. The following examples shows how we modify GetName.jsp to provide features similar to blx:getProperty but with manual HTML tag editing:
...

Tag libraries

JSP Tutorial

Tag libraries
JSP 1.1 introduces a method of extending JSP tags, called "tag libraries". These libraries allow addition of tags similar to jsp:include or jsp:forward, but with different prefixes other than jsp: and with additional features.
...

Beans and Form processing

JSP Tutorial
Just After Sunset

Stephen King
The Graveyard Book

Neil Gaiman, Dave Mckean

Beans and Form processing
Forms are a very common method of interactions in web sites. JSP makes forms processing specially easy.
The standard way of handling forms in JSP is to define a "bean". This is not a full Java bean. You just need to define a class that has a field corresponding to each field in the form. The class fields must have "setters" that match the names of the form fields. For instance, let us modify our GetName.html to also collect email address and age.
...
« 1 2 »