RE: How to create on-the-fly javascript code?

2005-09-14 Thread Paranj, Bala
I would make it part of a custom tag. This will also avoid the
copy/paste of javascript in all the jsps.

Bala
http://groups.yahoo.com/group/OOAD_UML/

-Original Message-
From: Thai Dang Vu [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 14, 2005 8:59 AM
To: user@struts.apache.org
Subject: How to create on-the-fly javascript code?


Hello,

I want to write something like this in a jsp file

script language=javascript
  function f() {
  return bean:write name=some_bean property=a_property/;
  }
/script

but the bean:write tag isn't processed. So how can I make it processed?

Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: To Whom it may concern

2005-09-14 Thread Paranj, Bala
I have seen code in open source projects like Commons Chain which does
not use some of the good design principles like command-query
separation. Are decisions like these made without any justifications? If
yes, then it needs to be documented. It is overwhelming to someone who
is new to open source development to do the documentation. Looks like
this requires lot of search in the email archives. Any thoughts on this?

Bala
http://groups.yahoo.com/group/OOAD_UML

-Original Message-
From: James Mitchell [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 14, 2005 12:33 PM
To: Struts Developers List
Cc: Struts Users Mailing List
Subject: Re: To Whom it may concern


Hi Mario, contributing to Open Source can be exciting and frustrating at

the same time.  I'm happy that you've decided to volunteer your time.

I would say your best bet is to decide on what you'd like to do.  This 
should be something that interests you, which, typically, would be 
something you are having to do at work for work, but that's not always 
the case.

If you aren't sure where you want to help out, a good place to start 
would be to help out with documentation.  This is often the area that is

lacking in *many* open source projects.  Of if you want write some code 
and not docs, you could add to or improve the projects test coverage.

There are many ways to help.  No need to send a resume.  Your work is 
your resume, a thriving community is your salary, and any thank you 
from a user is your bonus.

Welcome to Apache!


--
James Mitchell
Software Engineer / Open Source Evangelist
Consulting / Mentoring / Freelance
EdgeTech, Inc.
http://www.edgetechservices.net/
678.910.8017
AIM:   jmitchtx
MSN:   [EMAIL PROTECTED]
Skype: callto://jmitchtx


[EMAIL PROTECTED] wrote:
 Hello again.
 
 I've never contributed to the Apache Project before, but am a regular
user 
 of its tools and love working with it. This March, I will likely be
laid 
 off because of the merger between Federated and May companies. I will
be 
 given a severance package and have decided that I would like to spend
4-6 
 months living abroad and contributing to the project. Naturally I
wouldn't 
 expect to start out as anything more than a Volunteer, but would 
 appreciate the challenges of a Committer. I'm writing this now because

 when the time comes, I would like to jump in with a large load, just
to 
 keep the momentum going. That means I'd probably start doing some
small 
 contributing to a specific sub-project and stick with it. 
 
  I've worked for the USPS, the DOD, and now for May/Federated. I'm a
BS in 
 Com Sci with a math minor (like I'll ever use that again!), am of the 
 Meyer OOP school, with a clear understanding of j2ee development and 
 N-tier architecture.  I can provide my resume to whomever needs it, so

 just ask. 
 
 Thanks for your time, and looking forward to hearing from someone,
 
 Mariano Hernandez


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: core struts -- best practise fundementals

2005-08-29 Thread Paranj, Bala
The tag library allows reuse whereas scriptlets lead to copy/paste
oriented programming ;-). Separation of concerns is one of the main
principles of OOAD. It allows you to change the logic and presentation
layer objects independent of each other. It is easier to develop,
maintain and extend a system that conforms to this principle.

Bala

-Original Message-
From: peru cheppanu [mailto:[EMAIL PROTECTED] 
Sent: Monday, August 29, 2005 12:42 PM
To: user@struts.apache.org
Subject: core struts -- best practise fundementals


Hi all,
 
I am trying to understand the motivation behind seperation of logic and 
presentation in struts framework. I was wondering if any of you can 
provide some light if I am thinking in right direction. 
 
Now, if you write scriptlets in JSP, that is a bad practice.., however 
if you hide that functionality in a tag class and implement that tag 
like struts tags or any other tags.. thats a good practice.
 
For example, I want to send a concatenated string instead of a hashmap 
to display as per key-value relationship. I meant send [EMAIL PROTECTED] 
string rather than a hashmap and want to parse it for display. If I
write a 
scriptlet that I use to substring and display only that user is 
concerned with -- that is bad practice. If I use a tag lib that looks
more 
like 
logic:substring name=hashArr digits=4, -- good.
 
Am I getting this whole thing wrong? Pls excuse if I sound too stupid 
and this is my first post here..

--Ashrita



-
Yahoo! Mail for Mobile
 Take Yahoo! Mail with you! Check email on your mobile phone.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] How to load a csv file into java

2005-08-19 Thread Paranj, Bala
Parsing CSV files in 5 minutes or less! 

CsvJdbc - a JDBC driver for CSV files Rocks!

I was looking for an utility which can read and parse the CSV files. The
open source utility CsvJdbc was perfect for my requirements. It parses
the given CSV file with no problem. Just include the csvjdbc.jar in the
classpath and start using the API. The command line argument is C:\\test
(Java requires the escape character \ for the \, which is the
separator). The filename is anything.csv and is stored in the directory
specified above. Version is Version 0.10. 

The documentation says : 
The driver also now supports scrollable result sets.
This following example code shows how these are used. 
...

Connection conn = Drivermanager.getConnection(jdbc:relique:csv: +
args[0],props)

Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
0);

ResultSet results = stmt.executeQuery(SELECT ID,NAME FROM sample);

resulst.next();
...
results.first();
...
results.previous();
...
results.relative(2);
...
results.absolute(2);
...
But it looks like it is not implemented yet. I got : Oops-
java.lang.UnsupportedOperationException: ResultSet.relative()
unsupported error message.

Here is the modified example program that I am using for my purposes:

/*
* Created on Dec 16, 2004
* @author BXParanj
*/
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;

public class RegistrationParser {
private String userName;
private String password;

public RegistrationParser(String fileName) {

}

public static void main(String[] args) {

String index = fcgp001; 
try
{
// load the driver into memory
Class.forName(org.relique.jdbc.csv.CsvDriver); 

// create a connection. The first command line parameter is assumed to
// be the directory in which the .csv files are held
Connection conn = DriverManager.getConnection(jdbc:relique:csv: +
args[0] ); 

// create a Statement object to execute the query with
Statement stmt = conn.createStatement();

// Select the EBK_USERNAME and EBK_PASSWORD columns from lead.csv file

String sqlQuery = SELECT EBK_USERNAME, EBK_PASSWORD FROM lead WHERE
EBK_USERNAME = + index ; 
ResultSet results = stmt.executeQuery(sqlQuery);

// dump out the results
while (results.next())
{
System.out.println(EBK_USERNAME=  + results.getString(EBK_USERNAME)
+  EBK_PASSWORD=  + results.getString(EBK_PASSWORD));
}

// clean up
results.close();
stmt.close();
conn.close();
}
catch(Exception e)
{
System.out.println(Oops-  + e); 
}
}
}



-Original Message-
From: Richard Reyes [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 19, 2005 12:02 PM
To: Struts Users Mailing List
Subject: [OT] How to load a csv file into java


Hi Guys,

I need to load exported information ( csv file ) into POJOs. How do I do
this?

Thanks
Richard

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Struts weaknesses question

2005-08-16 Thread Paranj, Bala
Developers who are really busy don't have time to give a fancy name to
something that already has a name. Looks like there are enough idiots
out there who have lot of time in their hands to rename things that
already have names. This would spread their name and popularity among
the developer community??? POJO? WTF???

-Original Message-
From: Ted Husted [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 16, 2005 7:02 AM
To: Struts Users Mailing List
Subject: Re: Struts weaknesses question


On 8/15/05, Frank W. Zammetti [EMAIL PROTECTED] wrote:
 The latest buzzword being tossed around lately is RIA, Rich Internet
 Applications.  Some of us laugh at the term because we've been doing
 RIA's for 5+ years now and never thought to attach a special term to
it
 :)  But I digress...

Continuing the digression theme ... Buzzword would be one
categorization, but pattern name might be another. Many people used
Facade and Composite, et al, for years before the GOF gave them names.
Ditto for POJO. To name a thing is to own a thing. Of late, we've come
to own POJOs, Ajax, and RIAs. :)

-Ted.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [OT] : Web App Caching

2005-08-12 Thread Paranj, Bala
I like the CacheFilter of OpenSymphony. That will be good enough for my
needs. Thanks a lot. 

-Original Message-
From: Martin Gainty [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 12, 2005 11:56 AM
To: Struts Users Mailing List
Subject: Re: [OT] : Web App Caching


Ditto

check it out at  http://www.opensymphony.com/oscache/

Martin-

- Original Message - 
From: Ed Griebel [EMAIL PROTECTED]
To: Struts Users Mailing List user@struts.apache.org
Sent: Friday, August 12, 2005 10:42 AM
Subject: Re: [OT] : Web App Caching


I haven't used it in this capacity, but OSCache from opensymphony.com
supports web page caching.

-ed

On 8/12/05, Paranj, Bala [EMAIL PROTECTED] wrote:
 To be more specific I am currenlty looking at the web-tier caching,
 something that will cache the jsp pages. Thanks.
 
 -Original Message-
 From: Swapnil Patil [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 12, 2005 10:25 AM
 To: Struts Users Mailing List
 Subject: Re: [OT] : Web App Caching
 
 
 Hi Paranj,
 
 You can consider Hsql DB. Its free and has 2-3 modes.
 
 On 8/12/05, Paranj, Bala [EMAIL PROTECTED] wrote:
 
  Hi,
 
  Could someone share their views on the web application caching
 solutions
  available? Preferably open source :-) The requirement is for a site
 that
  has a component which is read-only most of the time. The frequency
of
  update is of the order of many hours.
 
  Thanks,
  Bala Paranj
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Why interface

2005-08-10 Thread Paranj, Bala
Program to an interface, not an implementation. 

This concept is different from deciding whether to use Java Interfaces
or abstract classes. The term interface in this context actually means
type. This is basically the same thing as the Liskov's Substitution
Principle. LSP is a well defined principle whereas the above phrase is
vague and leads to confusion among new developers. The interview with
Erich Gamma on Artima website clarifies this confusion.

So, the term interface could refer to all the public methods in an
abstract class or it could be an interface. This guideline implies that
when you write code, the variable that you declare will be of
appropriate type. If it is too far up the hierarchy you have to cast in
order to use methods that are defined somewhere lower down in the
hierarchy.

Bala Paranj

-Original Message-
From: user@struts.apache.org [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 10, 2005 11:03 AM
To: Paranj, Bala
Subject: Why interface


--0-1585081136-1123685253=:83126
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit


In Java/J2EE community, it seems that a lot of experienced developers
tend to use a lot of interfaces, however, a lot of junior developers
ignore using interface. I am not sure why interfaces seem to be favorite
to some experienced developers. Can some on
e explain this?Can you give examples where an interface is preferred?

Thanks.

 



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
--0-1585081136-1123685253=:83126--

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]