Win a copy of Java by Comparison (eBook) this week in the Java in General forum!

Zane Tofie

Greenhorn
+ Follow
since Jul 02, 2003
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 Zane Tofie

I have a property on a form bean that stores an object that contains an array list.
The array list contains a wrapper object that contains 4 other objects - each of a different type.
I try to access the respective properties of each of the four objects contained in the wrapper object in the following way:
<nested:nest property="propertyList">
<nested:iterate id="objects" property="cachedProperties" indexId="cachedPropertiesIndex">
<TABLE>
<TBODY>
<TR>
<TD><TABLE border="0" width="100%" bgcolor="#ff0000">
<TBODY>
<TR>
<TD nowrap width="10%" bgcolor="#ffffff"><FONT size="1" color="#000000" face="Verdana"><B>
ZAR: <nested:write property="property.formattedPrice"/></B></FONT></TD>
To be precise:
The propertyList property contains the array list and this array list is called cachedProperties.
The array list contains PropCargo objects.
Each propCargo object contains a:
1. Property object
2. Features object
3. Images object
4. Client object
I want to access properties of these objects in the same nested:iterate clause by going something like: property="property.formattedPrice" for example.
Am I doing this correctly or have I missed something?
The HTML table doesn't render.
Help will be greatly appreciated.
Zain
14 years ago
Great stuff, spot on - thank you guys! I removed the call to the java script and implemented image button beans as explained in a tip by Ted Husted - and it works just fine now.
14 years ago
I have a vexing problem. When a user clicks a struts html:image button, it seems that the POST is executed twice - resulting in two database inserts when only one should have been made. I'm using WSAD 501 and a tomcat 406 server.
The flow of execution is as follows:
The user clicks a menu item to request the page.
This 'fires an init action' that places several arraylists in the session scope - and then the init action forwards to the actual jsp that the user will use to enter his details.
This JSP contains two sets of logic:equal tags.
When the user makes a certain selection he has to fill in more details which is shown as a second 'view' in a wizard-style fashion.
The logic:equal tag sets enclose two tables each with its own html:image button.
After the user has filled in his details and if the user is not required to do the extra step and the user clicks to submit the form, then the console shows that the POST was executed twice for the /registrationAction. For a single click, all the sys outs appear twice and two inserts are made into the db. The interesting things is that each of the two inserts have unique ids that a business bean provides.
I'm at a loss as to why this is happening - a single click executes the POST twice.
I would really appreciate any advice. I've googled and can't seem to find any solution. I've changed scopes and implemented the registration differently but still the same thing happens.
Please let me know if I need to provide code etc.
Many thanks in advance.
14 years ago