beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ture Hoefner" <>
Subject Hidden databinding to array properties
Date Mon, 06 Feb 2006 19:27:29 GMT

  I have a problem in which I have a pageflow with a form bean that has
several properties, one of which is an array: String[].  In a form on my
JSP I use databinding to allow the user to edit every property EXCEPT
that array property.  It is edited on a separate form.  I tried to use
hidden inputs to databind to the String[] property so it won't be null
in the form bean passed to the edit action in my pageflow:




                <netui:hidden dataSource="container.item" />




It looks good in the generated HTML source:

        <input type="hidden"
ntTypes[0]}" value="AddToCartEvent">

        <input type="hidden"
ntTypes[1]}" value="BuyEvent">




        <input type="hidden"
ntTypes[15]}" value="UserRegistrationEvent">




During databinding, I get an ArrayIndexOutOfBoundsException because it
thinks the array is empty.  I tried a few experiments:  I changed the
String[] to a List<String> in my get/set methods in my bean and see
basically the same problem:


     [exec] [ERROR] ProcessPopulate - NetUI Warning: Unable to update

 "{actionForm.persistedEventTypes[15]}".  The typical cause is that the
object represented by the expression is not available or is the wrong
type for updating.

  Cause: org.apache.beehive.netui.script.ExpressionUpdateException:
Exception when attempting to update the expression
"{actionForm.persistedEventTypes[15]}" with available binding contexts
[actionForm, pageFlow, globalApp]. Root cause:
java.lang.RuntimeException: An error occurred setting a value at index
"15" because the list is of size 0.  Be sure to allocate enough items in
the List to accomodate any updates which may occur against the list.


For now, I am going to work around it by not using databinding for this
property.  Am I doing something wrong, or is this a bug?










Ture Hoefner
WebLogic Portal Engineering  


BEA Systems, Inc.
4001 Discovery Drive

Suite 340
Boulder, CO  80303 <> 






  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message