cancel
Showing results for 
Search instead for 
Did you mean: 

GridLayout Issues

SidBhattacharya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Is anyone aware of issues with the GridLayout in HTMLB? I am trying to code an iview which uses GridLayout and for some reason the server crashes for certain layout elements in the GridLayout. I am almost certain its an issue with the Layout as there is no other component/code fragment that could cause this. I am using a JSP page with HTMLB tags.

Any help on this is greatly appreciated!

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Siddhartha,

This certainly is not an issue with the HTMLB Gridlayout. I have been using it for more than 2 years and have never been able to make my server crash. Only difference is that i have been using the Java API's.

It looks more like a problem in your jsp code. Posting a snippet of your jsp code where you create and put data in the gridlayout would be helpful.

Akhilesh

SidBhattacharya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Here is the code snippet. The cells 1,5 and 1,6 causing a crash..

Here is how the gridLayout declaration is


<hbj:gridLayout 
						id="myGrid" 
						rowSize="10" 
						cellPadding="5" 
						columnSize="40">


	<hbj:gridLayoutCell 
						id="gridCell11" 
						rowIndex="1" 
						columnIndex="4" 
						horizontalAlignment="10" 
						verticalAlignment="10" 
						width="25">
						<hbj:dropdownListBox 
							id="unit1" 
							tooltip="Unit Price" 
							selection="" 
							nameOfKeyColumn="KeyCol" 
							nameOfValueColumn="KeyVal" 
							onSelect="Select">
							<hbj:listBoxItem 
								key="USD" 
								value="USD" 
								selected="true" 
								/>
						</hbj:dropdownListBox>
					</hbj:gridLayoutCell>
					
					<hbj:gridLayoutCell 
						id="gridCell15" 
						rowIndex="1" 
						columnIndex="5" 
						horizontalAlignment="10" 
						verticalAlignment="10" 
						width="25">
						<hbj:inputField 
							id="upcharge" 
							maxlength="60" 
							value="">
						</hbj:inputField>
					</hbj:gridLayoutCell>
					
					<hbj:gridLayoutCell 
						id="gridCell16" 
						rowIndex="1" 
						columnIndex="6" 
						horizontalAlignment="10" 
						verticalAlignment="10" 
						width="25">
						<hbj:textView 
							encode="false" 
							text="Upcharge" 
							/>
					</hbj:gridLayoutCell>

Answers (2)

Answers (2)

Former Member
0 Kudos

The documentation I have on gridLayoutCell says that the correct values for horizontalAlignment are LEFT, RIGHT, CENTER, CHAR, and JUSTIFY and that the correct values for verticalAlignment are BASELINE, BOTTOM, MIDDLE, and TOP. You have "10" for these attributes. I don't know why this would make your server crash, but maybe changing these attributes will fix the problem.

Brian

Former Member
0 Kudos

Hi,

This problem is exactly similar to the one I'm having right now. I've used a gridview tag in the JSP of an iview and the server crashes when I add a certain cell that contains absolutely no coding !! This situation is reproducable. Did you find a solution for this strange problem? I've lost an entire day with it :-(.

Any help is much appreciated.

Thanks

Manuel.

SidBhattacharya
Product and Topic Expert
Product and Topic Expert
0 Kudos

If you are using JDK 1.3.x ( x < 9 i think) version then there is a limitation of 64kb code segment. So whenever you jsp code crosses that ( the generated class file size ) it gives an error 'code too large for outer try catch block'. the solution for this is

1. Upgrade the JVM

2. Reduce the code size of ur jsp if you wanna work with the same JVM.

darrell_merryweather
Active Contributor
0 Kudos

Just to add to this point, which is generally the case when using GridLayouts. I only every use a grid layout in the following circumstances

1) If I am using the API in the Java code and not in JSP

2) If the contents of the GridLayout is minimul

If this is not the case and you need to present a lot of columns/rows then I would use raw HTML for this layout using <table><tr><td></td></tr></table> for the layout instead. This will be better with regards to performance and you won't have the problem of having too much code in the JSP

I hope this helps

Thanks

Darrell

Former Member
0 Kudos

Thanks all. I'm gonna go with raw html tags for now.

Best regards,

Manuel