Monday, March 10, 2008

Dirty IE.... IE7: All crap.

Open source products are far better. We buy Mocrosoft products and finally screw up our selves totally. Today i was totally working with div tags and now i understand that the bug is in IE7 and not my code. Aaaaah!!!! big pain !!!!

Sunday, March 2, 2008

Sun Tech days

I had been to suntech days held at Hyderabad International convocation center. It was good... though only 50% of the technologies presented were of use to me... i still like the visit. A fashion show was done to entertain the pple here... the bad thing is that the way the models were projected... i felt like they are being shown as an objects rather human beings... I was very angry with it..... wanted ot post this on the Sun forums....

How ever to the middle of the show the Sun guy came up and took the mike trying to anchor the event... his words tried to mitigate the effect... and i felt better... But what ever i wanted to ask the sun guys as to how far was it right to give such a bad projection about women! but had no chance to do it...

The biggest and immediate use i found by the tech days was the advantages of taking up the Java 6 ... its internals... Ruby and ruby on rails.... Here at my company we have CI running every night and i often used to wonder why its written in Ruby when it could be done on java too... (by java process) Netbeans IDE, was one the ohter things.... though i wouldnt go for it in the near future... the cool thing abt this ide was the profiling tool inbuilt into it. I remember the eclipse and its profiling plugin... which never works... wasted abt a weeks time of mine.... netbeans does it very nicely... with much improved features....

The worst of all the presentations was the Ajax framework: woodswork and dyna faces for JSF. It was a very important session for me... but the session was screwed up.... The next bad one was the last session on glass fish... he started by saying: "i know most of u are not interested... weekend ... and every ones planning for a picture.. this being the last session..... even i feel the same" OOPS! what a dirty introduction is it!!!!

in btw i attended one of the solaris sessions it was good.. shifting to linux itself.... i would nt enourage ... forget solaris...

finally, i felt like glassfish and solaris could be fruitful only if you can afford support for the sun guys... and if i remmeber it right it could cost u as much as 4500$ ... quite costly... :( and more over now i am using tomcat since 3 years and *known devil is better than unknown devil*. I already have a bad experience using ICEFACES -open source technology on JSF...

Friday, February 22, 2008

surprising experience with Struts2

The action class has a Dto, which contains a Map<String, String> object. I want to 'put' an entry into it from the UI layer /jsp. or in otherwords... i will say <s:textfield name="dto.map['xyz']" /> and say the user enters 123 into the text field then it will result into an entry: ["xyz","123"]. Till here things are fine but in one case this wouldn't work...!!! Its a catch.


suppose the dto is enclosed in session scope then the same would result into ["xyz",""] i.e. null string. I found that this is never getting updated and when i removed the dto from the session scope then it gave ["xyz","123"] result. so whats the session scope doing here?

i tried thisway in the jsp:
<s: textfield name="dto.map['xyz']" />
<s:property value="dto.map" />

this resulted a textbox and a text: [xyz,''] thats the catch: i.e. when the jsp is being rendered itself the map is being put with key xyz if its not present in the map. and for this reson the text [xyz,] is being printed... supposing that this is not the case then it would have rendered a text as [,] i.e. empty map.

for this reason when the textbox is trying to put the value into the map, as the key is already present its unable to do so...

To discover this it took me 2 days of effort.. may b it saves some of ur efforts and stops u from reinventing the wheel...

thats for now.. watch the space for more interesting things to come up...

Monday, February 18, 2008

bank details,

i was searching the net to get the customer care number of UTI and found this site valuable in getting the banks number... : http://www.indianbanksguide.com/phone-banking-numbers/uti-bank-phone-banking-numbers/

probably someone is also looking for it... its simple googling that gave me this url.. ;)

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.

Saturday, October 13, 2007

inspiring story 2

BUTTERFLY

A man found a cocoon of a butterfly. One day a small opening appeared. He sat and watched the butterfly for several hours as it struggled to force its body through that little hole. Then it seemed to stop making any progress. It appeared as if it had gotten as far as it could, and it could go no further.

So the man decided to help the butterfly. He took a pair of scissors and snipped off the remaining bit of the cocoon.

The butterfly then emerged easily. But it had a swollen body and small, shriveled wings.

The man continued to watch the butterfly because he expected that, at any moment, the wings would enlarge and expand to be able to support the body, which would contract in time.

Neither happened! In fact, the butterfly spent the rest of its life crawling around with a swollen body and shriveled wings. It never was able to fly.

What the man, in his kindness and haste, did not understand was that the restricting cocoon and the struggle required for the butterfly to get through the tiny opening were God's way of forcing fluid from the body of the butterfly into its wings so that it would be ready for flight once it achieved its freedom from the cocoon.

Sometimes struggles are exactly what we need in our lives. If God allowed us to go through our lives without any obstacles, it would cripple us.

We would not be as strong as what we could have been. We could never fly!

Inspirational story

i discovered something good when surfing the net. its a story:

A story is told about a soldier who was finally coming home after having fought in Vietnam. He called his parents from San Francisco.

"Mom and Dad, I'm coming home, but I've a favor to ask. I have a friend I'd like to bring home with me."

"Sure," they replied, "we'd love to meet him."

"There's something you should know the son continued, "he was hurt pretty badly in the fighting. He stepped on a land mind and lost an arm and a leg. He has nowhere else to go, and I want him to come live with us."

"I'm sorry to hear that, son. Maybe we can help him find somewhere to live."

"No, Mom and Dad, I want him to live with us."

"Son," said the father, "you don't know what you're asking. Someone with such a handicap would be a terrible burden on us. We have our own lives to live, and we can't let something like this interfere with our lives. I think you should just come home and forget about this guy. He'll find a way to live on his own."

At that point, the son hung up the phone. The parents heard nothing more from him. A few days later, however, they received a call from the San Francisco police. Their son had died after falling from a building, they were told. The police believed it was suicide. The grief-stricken parents flew to San Francisco and were taken to the city morgue to identify the body of their son. They recognized him, but to their horror they also discovered something they didn't know, their son had only one arm and one leg.

The parents in this story are like many of us. We find it easy to love those who are good-looking or fun to have around, but we don't like people who inconvenience us or make us feel uncomfortable. We would rather stay away from people who aren't as healthy, beautiful, or smart as we are. Thankfully, there's someone who won't treat us that way. Someone who loves us with an unconditional love that welcomes us into the forever family, regardless of how messed up we are.

Tonight, before you tuck yourself in for the night, say a little prayer that God will give you the strength you need to accept people as they are, and to help us all be more understanding of those who are different from us!!!

good one right!
cheers,