-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Issue resolving char array in struts
PostPosted: Mon Aug 25, 2008 10:42 pm 
Newbie

Joined: Mon Aug 25, 2008 10:17 pm
Posts: 1
Hello,

Very new to hibernate/struts so forgive me if this is obvious.

I have an object which contains a char[] instead of a string. I'd like to display that char array in struts just like I would a string.


After my query returns the list of objects I'm able to verify that the char array holds the correct values. However I'm not exactly sure how to correctly display the char array using struts:

Here my object contains the following fields:


Object StFileInfo

private Long id;
private SaveSetting saveSet;
private char[] TechID = new char[ResultStructure.MAX_LEN_TECH_ID];
private char[] TechName = new char[ResultStructure.MAX_LEN_TECH_NAME];
private char[] Company = new char[ResultStructure.MAX_LEN_COMPANY];
private char[] SoftVersionNumer = new char[32];
private byte[] SerialNum = new byte[32];
private STime completionTime = new STime();



Object SaveSetting

private Long id;
private char[] jobID = new char[ResultStructure.SAVE_JOB_ID_LEN];
private char[] location = new char[ResultStructure.SAVE_LOCATION_LEN];
private char[] comment = new char[ResultStructure.SAVE_COMMENT_LEN];
private char[] Locator = new char[ResultStructure.MAX_LEN_LOCATOR];
private char[] Type = new char[ResultStructure.MAX_LEN_TYPE];



Here's the iterator:


<s:iterator value="stFileInfoResults" status="status">
<tr class="<s:if test="#status.even">evenListRowS1</s:if><s:else>oddListRowS1</s:else>">
<td></td>
<td><s:property value="jobId"/></td>
<td><s:property value="techID"/></td>
<td><s:property value="completionTime"/></td>
<td><s:property value="type"/></td>
<td><s:property value="location"/></td>
</tr>
</s:iterator>


None of the fields display correctly, most are blank, but the others are just random characters. No errors are displayed in the Apache console.

Thank you for any suggestions, and my apologies if this is more struts then hibernate.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.