Rocko Smith

Greenhorn
+ Follow
since Jul 12, 2005
Merit badge: grant badges
For More
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 Rocko Smith

I know the above description might be confusing. Let me rephrase my question;

I have a bean defined as an arraylist. I want to know if I can use an arraylist with the multibox or does it need to be a string array?
18 years ago
I have a bean efine that contains an arraylist. Each object in arraylist contains an accountId, which is displayed and exemptStatus, which represents the check in the checkbox. Could someone show me how I can get the check to show-up in the checkbox using multibox and an arraylist?


<bean efine id="exemptBtnData" name="erateExemptStatusForm" property="btnListToDisplay" type="java.util.ArrayList"/>


<logic:iterate id="exemptBtns" name="exemptBtnData" type="com.sbc.ctf.model.ExemptStatusList" >
<bean:write name="exemptBtns" property="accountId"/>
<html:multibox name="erateExemptStatusForm" property="selectedBtns">
<bean:write name="exemptBtns" property="exemptStatus"/> </html:multibox>
</logic:iterate>
18 years ago
Paul - Thanks for posting your solution, which I am using in my program.

Stu - Thanks for showing me other options along with an explanation.

I am new to java and am taking advantage of the long holiday week-end to get my struts application working. I am learning so much from reading and posting in this forum.
I posted in 2 seperate areas of this forum. I wasn't sure where it should go.

I'm trying to assign a date to a column in a oracle table. The format of the date I'm trying to pass is 06/01/2005. I have looked at the api for DATE, but can't figure out how to get the date of 06/01/2005 into the field on the table, which is defined as DATE.
Could somebody help me with this problem?

Here's what I have so far:

sql = "insert into table1(acct_id,date1,date2) values(?,?,?)"

String a = null;
String d1 = "06/01/2005";
String d2 = "06/01/2006";

stmt.setString(1,a);
stmt.setDate(2,d1);
stmt.setDate(3,d2);
I'm trying to assign a date to a column in a oracle table. The format of the date I'm trying to pass is 06/01/2005. I have looked at the api for DATE, but can't figure out how to get the date of 06/01/2005 into the field on the table, which is defined as DATE.
Could somebody help me with this problem?

Here's what I have so far:

sql = "insert into table1(acct_id,date1,date2) values(?,?,?)"

String a = null;
String d1 = "06/01/2005";
String d2 = "06/01/2006";

stmt.setString(1,a);
stmt.setDate(2,d1);
stmt.setDate(3,d2);
18 years ago
Should I use a union for the 2 tables because this only works if there is a record in the exempt_account table?
18 years ago
select
t1.ACCT_ID
from
account t1,
where exists
(select t2.ACCT_ID
from
exempt_account t2
where
t2.CTF_ENTY_ID = ?
and t2.EXMPT_STRT_DT = ?
and t2.EXMPT_END_DT = ?)
order by t1.ACCT_ID asc;

Problem:
I have to extract recs from exempt_account table by matching the enty_id from the enty_id that's passed in (refer to ? above) + comparing Strt_dt + End_dt dates to dates I passed in (refer to ? above).
If there is a match I then want to use enty_id to match to a rec on the account table where I capture the acct_id.
If there is no match to the exempt_account table I want to use the enty_id
that's passed in and match directly to the account table.
If rec exists in exempt_account table it's considered to be 'exempt' and I need to be able to create a field that I can later test to determine if it came from exempt_account table or just account table.
If it only exists in account table It's non-exempt.
18 years ago
Thanks for reply. I have another question concerning the conversion of the existing html <select> tag to the struts <html:select> tag.

The current select tag uses the name="action" attribute, which is referenced in multiple places in page to determine the current value in the <option> current value </option>. Now that I am changing the <select> to struts the name attribute is used to identify the form name(name=FormName).
Do you know if there's an attribute in the <html:select> tag that maps from the html <select name="FormName">?

Thanks!
18 years ago
I want to create an arraylist in the action class containing 4 entries (<option> Entry 1 - 4 </option> that will later be viewed in the jsp using the option tag. I want to create it in the action class and hold the 4 entries in the form class. Then I want to extract the 4 entries from the form bean in the html.

Heres the existing html:
td class="label">Action Taken:</td>
<td class="data" colspan="5">
<select name="action" onchange="updateAction(); if(test_selectio(this, 'No Action')){ alert('Please provide any explaination in the Notes box.'); }">
<option> how do I get the arraylist from the bean? </option>
</select>
</td>
18 years ago
I created a jsp. Do I need to do a setattribute for each i/p field so when I reference these fields in the action class module, I can retrieve the field contents by using a getParameter or does struts automatically save them into the session for me? As you can see, I'm using struts.
18 years ago