Please never write this code:
if (value == null || value.equals("")) {This is what I like to call "bug hiding". Rarely does a person really mean 12/31/1969 when they pass you a null or blank value. That is all.
d = new Date(0);
} else {
if (value == null || value.equals("")) {This is what I like to call "bug hiding". Rarely does a person really mean 12/31/1969 when they pass you a null or blank value. That is all.
d = new Date(0);
} else {



String sql = "SELECT " +
"RM.RTITLE1, " +
"RM.RNAME, " +
"SR.USER_SEQ_NO, " +
"SR.INT_SEQ_NO AS SUBREQ, " +
"SRT.USER_SEQ_NO, " +
"SRT.TEXT, " +
"(SELECT SRA.COURSE FROM SUB_REQ_AR SRA WHERE SR.INT_SEQ_NO = SRA.SUB_INT_SEQ_NO AND SRA.USER_SEQ_NO = 1) AS COURSE " +
"FROM DPROG D JOIN DPROG_REQ DR ON D.INSTIDQ = DR.INSTIDQ " +
"AND D.INSTID = DR.INSTID " +
"AND D.INSTCD = DR.INSTCD " +
"AND D.DPROG = DR.DPROG " +
"AND D.DPFYT = DR.DPFYT JOIN REQ_MAIN RM ON D.INSTIDQ = RM.INSTIDQ " +
<bean id="darsCourseDao" class="edu.asu.eadvisor.onoff.dao.DarsCourseDaoImpl">
<property name="dataSource" ref="darsDataSource">
<property name="subreqsForCourseQuery" value="classpath:/edu/asu/eadvisor/onoff/dao/GetSubreqForCourse.sql">
</property>
</property></bean>
public void setSubreqsForCourseQuery(Resource subreqsForCourseQuery) throws IOException {
InputStream is = subreqsForCourseQuery.getInputStream();
try {
this.subreqsForCourseQuery = IOUtils.toString(is);
} finally {
IOUtils.closeQuietly(is);
}
}
See, at first, I was like "haha, noobs accidentally put in two references to the same menu". But, no. It is actually two different menus with different options. I don't get it, man.
<t:submit image="context:images/submit.gif"/>Much simpler than I was thinking. Sometimes I get really frustrated with these little Tapestry issues...