[richfaces-issues] [JBoss JIRA] Resolved: (RF-6951) List shuttle causes "invalid value expression" error.

Nick Belaevski (JIRA) jira-events at lists.jboss.org
Wed Apr 29 07:22:50 EDT 2009


     [ https://jira.jboss.org/jira/browse/RF-6951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Belaevski resolved RF-6951.
--------------------------------

    Resolution: Cannot Reproduce Bug
      Assignee: Tsikhon Kuprevich


Works ok for me with current 3.3.1-snapshot:

	private String[] availableLine = {"Line 1", "Line 2", "Line 3"};
	
	private String[] selectedLine = {};
	
	public String[] getAvailableLine() {
		return availableLine;
	}
	
	public void setAvailableLine(String[] availableLine) {
		this.availableLine = availableLine;
		System.out.println("forum5Bean.setAvailableLine() " + Arrays.toString(availableLine));
	}
	
	public String[] getSelectedLine() {
		return selectedLine;
	}
	
	public void setSelectedLine(String[] selectedLine) {
		this.selectedLine = selectedLine;
		System.out.println("forum5Bean.setSelectedLine() " + Arrays.toString(selectedLine));
	}

	<h:form>
		<rich:listShuttle id="LineConfigs" sourceValue="#{forum5Bean.availableLine}"
			targetValue="#{forum5Bean.selectedLine}" var="variable"
			sourceListWidth="280" listsHeight="250" targetListWidth="280">
			
			<rich:column>
				<h:outputText value="#{variable}"/>
			</rich:column>
			
		</rich:listShuttle>
		
		<a4j:commandButton value="Submit" />
	</h:form>



> List shuttle causes "invalid value expression" error.
> -----------------------------------------------------
>
>                 Key: RF-6951
>                 URL: https://jira.jboss.org/jira/browse/RF-6951
>             Project: RichFaces
>          Issue Type: Bug
>          Components: component-input
>    Affects Versions: 3.3.0
>         Environment: Windows XP,Eclipse  3.4.1, Sun JDK1.5.
>            Reporter: aasia samreen
>            Assignee: Tsikhon Kuprevich
>            Priority: Critical
>
> I found this thread by search "invalidvalue expression". 
> Initially i was getting this exception for source list and after  implementing the workaround using object array,it was working for source list.
> And now iam getting the same exception for target list.
> I tried to use an object array for target list as well but was not able to initialize the array (i need to specify the size but in this case array size is dyamic.) 
> Please have a look at the code:
> <rich:listShuttle id="LineConfigs"
> 		sourceValue="#{bean.availableline}"
> 		targetValue="#{bean.selectedLine}" var="varaible"
> 		sourceListWidth="280" listsHeight="250" targetListWidth="280"		
> 		binding="#{bean.ShuttleList}"			
> 		converter="convertor">
> </rich:listShuttle>
>  public Object[] getAvailableLine() {
>         if (availableline== null) {
>             availableline = initialLineList.toArray();
>         }
>         return availableline ;
>     }
> public Object[] getSelectedLine() {
>         if selectedLine== null) {
> 	// how to initialize the array. as i dont have any control on the number of selected lines.?
>               }
>      return selectedLine;

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the richfaces-issues mailing list