Win a copy of Java Challengers this week in the Java in General forum!

Bryce Martin

Ranch Hand
+ Follow
since Nov 19, 2007
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bryce Martin

So after doing some more looking around I thought that I might give it a try. And it worked! As long as you have the class compiled at the same level as the deployed EAR you can replace a class of the same compile level in the war file.
11 years ago
I'm not sure where to put this question so if it doesn't belong here just move it.

I have a deployed EAR on our server. It has been well over a year since I have worked with this particular project but recently realized that I needed to retype a couple of variables from float to double to stop an overflow math issue. I need to put this updated class into the EAR and was wondering if I could just replace the current class with my updated one without any issues? I don't have a way to test this as this is deployed in production and I'd like to avoid any hiccups if possible. Can I do this "hot swap"? Will I have to restart the server or will the application pick up the new class upon the next use of the application?

Thanks for any pointers.
Bryce
11 years ago
What do you see as the largest problem in people writing bad HTML? From what I've read on your blog I'm already doing these standard and basic methods of writing well formed code. How in depth do you go? How much deeper do you go than standards compliance, well-formed code, doc types and the like? I have yet to jump onto the XML train as I've been using JSON and Serve Side SQL for my data processing since starting in web development a year ago.

For someone who already writes clean code by hand and pays attention to these details and does not really do anything in the ways of XML, is there anything in this book for me?
Yeah, I know, I got off on a thought and didn't contain myself. My bad. I'll repost it as a question. Sorry about that. Welcome again
Hey guys, I haven't been lurking around too much but when I got the email about this book I had to stop over and check it out. Is there a chapter list on Amazon? I can't seem to find one. Any excerpts? I read the chapter 3 stuff that you posted on your blog and it looked great.

At any rate, what do you see as the largest problem in people writing bad HTML? From what I've read on your blog I'm already doing these standard and basic methods of writing well formed code. How in depth do you go? How much deeper do you go than standards compliance, well-formed code, doc types and the like? I have yet to jump onto the XML train as I've been using JSON and Serve Side SQL for my data processing since starting in web development a year ago.

For someone who already writes clean code by hand and pays attention to these details and does not really do anything in the ways of XML, is there anything in this book for me?
I just upgraded my WDSC and it now uses java 5.0. This is cool, except now I'm getting all these warnings pertaining to generics. Originally I didn't realize that this update was going to upgrade the compiler (guess I should have read the docs first). Since I was working in the earlier version of java I hadn't read up on the new version.

So after looking around the boards for a bit and seeing the issues that people are having with this I come to the question...

Is it really worth worrying about? My code is going to run the same as it did before if I don't go through and make a bunch of these generics in my eleventy thousand classes. Is it worth fixing up? What are the pros/cons of just suppressing the warnings and forgetting about it for now and just try to do it on new code?

Thanks guys.
12 years ago
Thanks for the quick response Bear. I've never used conditional operators. I've always opted for the more wordy approach but thought I might give it a shot to learn something new today. I learned something new, looks like wordy is the way to go with this one. Thanks for the clarity, I understand them much better now.

Bryce
I have this if condition block...


I would like to plop it into one line with conditional operators...is this possible?

This didn't work...


Can this be done?
Usually File --> Print works too Just have a style sheet that is media="print".
Hey Rama,

SQL has the ability to do calculations and add columns to the resultset as it processes. Take a look at SQL column functions. Things like Count() and Sum() and Avg(). These might help you to summarize your data. If you know how you want to group your data you can use GROUP BY as well. There are tons of things that can be done with SQL that will get you extremely close to what you want if not all the way there.

Thanks
Bryce
I totally agree with Bear on this. I came into this whole page authoring bit just about 8 or 9 months ago. Learning javascript and the jquery library have been invaluable. A couple of answers to your questions. JQuery is completely open source. Use it, abuse it, build your own plug ins for it. JQgrid is just another library that supports JQuery's style of javascript coding (namely its selector functionality). The reason why jqGrid does not handle java objects is because its not java. Its javascript. Javascript cannot work directly with java objects. They need to be JSONized and pushed back to the browser for digestion. jqGrid works so smoothly because it does the heavy lifting on the server side and just sits int he browser to digest and display the data you send back to it. For example, if you want to change the sort order from ascending to descending jqGrid just sends a request to the server telling it to give it data in the new order. You have to have the code on the server side to do the sort (usually just changing a keyword in sql from (asc to desc) and giving back the requested number of rows.

You need to remember that the browser is for DISPLAY. All the heavy work needs to be done on the server. Converting of data to various formats such as cvs, xls, etc... need to be done on the server. The browser is just used to show the user results.

I hope this helped to clear some things up for you.

Bryce
I had toss around the idea of doing something like you are trying with your alternative jsp work around. Load the initial page and then make ajax calls at a certain interval to load more table rows. This is possible.

If you can feed the Hibernate table data as xml or json then jqgrid can digest it. You define the table column header names and then define the fields by giving them names, lengths, alignment properties, and others. Then you just name the xml tag or json key the name of the corresponding column. Its quite slick and has added a lot of new features recently. I'm not sure about the ability to total rows and the likes. I'm sure you could do it and just summarize it outside of the table itself....

Have a look here...

http://trirand.com/jqgrid/jqgrid.html#

I've done some pretty complex stuff with this. I've done ajax requests after loading the table and changed cell backgrounds and all kinds of stuff. It has so much flexibility.

Like I said, if you can feed the Hibernate/Struts table row data in an XML or JSON(my personal favorite) feed then it can work for you.

I hope this helps
Bryce
In a quick answer, yes. It can be done. One word of caution. When displaying 1000's of records in an HTML table the render time will be terrible. Also, the way to accomplish what you want to do involves rewriting parts of the DOM with javascript. This is perfectly ok to do, but be forewarned that when doing this in DOMs with 1000's of elements you will see performance issues. I currently use JQuery and its jqGrid plugin to handle displaying table data on a webpage with large result sets. This allows for paging to specific pages as well.
Thanks Bear. I brain farted on this. My coffee didn't work very well this Monday morning (it was a busy weekend with little rest). Thanks for the link. Have a great day.
Right now I create my objects manually based on some condition... Something like this...

if (some condition)
columnModel = [{name:'order',index:'order asc', width:70, align:"center"},{name:'job',index:'job',width:300,align:'right'}]

What I want to be able to do is insert or delete from that object. Is there a way to do this? I want to be able to delete the {name:'job',index'job',width:300,align:'right'} piece if a particular condition is met and add others if other conditions are met...

Am I clear? Is this possible?

Thanks
Bryce