You need to sign in to do that
Don't have an account?
h8r41d
Why can't I do this?
Visualforce page reduction:
<apex:inputText value="{!mytest[0]}"/>
Apex class :
Public class test { public List mytest {get; set; } public test() { mytest = new List<String> {'testing!!!', 'whatever!!!'}; } }
I get an unspecified error when I use arrays in my inputs.
This will work.
List Declaration is wrong.
To declare a list, use the List keyword followed by the primitive data, sObject, nested list, map, or set type within <> characters
http://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_collections_lists.htm
Oops, I wrote this up off the cuff as an isolation of the issue instead of posting my entire class and VF page. The declaration is correct in my code. I fixed it to avoid confusion.
The issue is somehow related to calling a save method which copies the string list values into an sobject field. I'm doing it this way to get around the problem of not being able to expose a field in the contact table to the customer portal. I put a "return" at the top of my save method for testing, the error is being thrown in the standard controller somewhere.
When I take the list out of the inputText and replace it with a string variable, it works. But with a string list item, it does not.
I think there is currently a bug with using lists in input components in this way.
Bug... as in it just plain don't work, right? :)
yes, i think you will need to do this in some other way for now (without using a subscripted lsit reference in your inputText attribute).