This is not ajax. Just a try. Makes utilize of DOJO on behalf of the servlet call as well as widgets. I never thought anything like this before. It works.
// Initialize the bean with session scope
<jsp:useBean>
<jsp:setProperty name=”penc” property=”*”/>
<html>
<head>
<script type=”java/script ” and rest of the code ……
// Hit the server, populate the bean available in session as well as Handle the Response below
function handleResponse()
{
// Fill the Controls (dojit widgets here) with the response available as bean
dijit.byId(”accexp”).setValue(”<%= penc.getPencilName()%>”);
dijit.byId(”pencilmake”).setValue(”<%= penc.getPencilName()%>”);
}
……………
</script>
</head>
<body> …….. </body>
</html>
|