Friday, January 25, 2008

Annoyying IGoogle -custom gadget !!!

i configured my custom gadget of igoogle to hold a forum, set the height to abt 1100px. The issue is im my Firefox, i always see the height going off to 300/ 400px size and when i check the settings it shows 1100 !!!. This is annoyying... if i refresh the page twice/ trice and my luck permits... the gadget recovers to its state and shows me the forums...

the magic is that this happens even when its displayed and kept idle for abt 2/ 3 hrs. huh! what a gadget????


Powered by ScribeFire.

Tuesday, January 22, 2008

JS editor

Finally my voyage for a good Java script editor seem to find a solution. I had been looking for an IDE for javascript since years. At first it was FirstJavascript editor. but it was just 7days trial period and even before i understood its features, the trial perriod was over.

Just recently i had seen JSEditor, given by Adobe. It has many cool features, maily its integrable with YUI and its very light weight esp when installing into eclipse.

and today i found still better editor. Aptana IDE ! This one integrates not only with your IDE (Eclipse) but also with Mozilla Firefox enabling runtime debugging possible. Its really cool, but at the same time very heavy on eclipse (consumes abt 100MB :o) how ever i think its features will stick u to it: context sensitive help, code completion, JS doc generation, YUI, DOJO, Adobe Spry integrations (thats all i know for now and overwhelmed by it). Most importantly its free at least the community edition and all the mentioned features are in it! WOW!. I haven't tried the profession one yet.

I could discover only to this extent for today. I shall post the new features as i discover them. For now all i would like to say: "Great work Aptana Team"




Powered by ScribeFire.

Wednesday, January 2, 2008

Eureka... Eureka... got the soln !! Ajax validations now happen!

Finally the problem melted down.. i am now able to validate the form by ajax, field level with out the page refresh. Thanks to 'Vita Rara' -the info was vital in achieving this.

Some how i strongly feel error in js files (jira). So the steps go as follows:
  1. created a new theme cajax (custom ajax) 'Vita Rara'
    1. create a directory template/cajax in ur java source (src/)
    2. explode struts-core.jar and...
    3. copy the struts2-core-2.0.9\template\ajax\* into cajax folder. For struts 2.0.9 there are abt 21 files
    4. go to the jsp and in context create a folders scripts, scripts/ajax, scripts/xhtml in it. The idea is that the url: http://site:8080/context/scripts should show the script files.
    5. copy the validation.js (s) from struts2-core-2.0.9\template\xhtml and struts2-core-2.0.9\template\ajax into the into
    6. copy clientValidation.js from struts2-core-2.0.9\org\apache\struts2\static\ to scripts folder of step 3
    7. This completes the basic infrastructure required to get things.
  2. register the theme (prop file)
changes to be done in the js files:

  1. Mainly we need to provide checkbox handling in the js
  2. modify the form.ftl etc ftls to take this js instead of the once in the struts-core.jar



Tuesday, January 1, 2008

DWR with struts 2

Struts-2 uses dwr(direct web remoting) to validate the forms; atleast 2.0.x version does it and struts promises that ajax validation would be available from 2.1x versions... i was working with checkboxes in a jsp (using struts2.0.9) the following is the issue:

there are 3 checkboxes in the form, c1,c2,c3 and now say u checked the box-c2 or u didnt check any of the boxes...; the idea is to validate the checkboxes; the surprise is that always the c3 would be submitted irrespective of what box is checked... i found the problem with the validateClient.js file. The same can be reproduced (simple by edititng quizAction.java of struts-showcase application) any idea asto what can be done???


i think that i should handle this by creating a new theme... let me post the same in JIRA. :)

--
coffee


Powered by ScribeFire.