Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Process Manager (Stardust) » RowSelectorEvent and updating the controls on UI(selected rows data to be populated to other data on screen)
RowSelectorEvent and updating the controls on UI [message #1066297] Tue, 02 July 2013 04:51
Vikash Pandey is currently offline Vikash Pandey
Messages: 12
Registered: October 2011
Junior Member
I have a table that has rows of transactions, i select one of the rows and want to populate other data fields on the UI with the values of column data of the selected row:
here is my xhtml and backing bean code with which i am trying to achieve this:
<ice:rowSelector  value="#{entry.selected}" selectionListener="#{ManualActivity1Bean.selectionListener}" enhancedMultiple="true" multiple="true" toggleOnInput="false" dblClickDelay="200" preStyleOnSelection="true" />

//row selection event handler method
public void selectionListener(RowSelectorEvent event) {
		
		System.out.println("Selected Row is: "+event.getSelectedRows());
		int rowNum = event.getRow();
		
		Map selectedTransaction = transactions.get(rowNum);
		
		((Map)getData().get("ManualTransaction")).put("Branch", selectedTransaction.get("Branch"));
		((Map)getData().get("ManualTransaction")).put("TotalTxnAmount", selectedTransaction.get("TotalTxnAmount"));
		((Map)getData().get("ManualTransaction")).put("DateOfTxn", selectedTransaction.get("DateOfTxn"));
		((Map)getData().get("ManualTransaction")).put("RecordID", selectedTransaction.get("RecordID"));
		((Map)getData().get("ManualTransaction")).put("CardNo", selectedTransaction.get("CardNo"));
		((Map)getData().get("ManualTransaction")).put("MerchantName", selectedTransaction.get("MerchantName"));
		((Map)getData().get("ManualTransaction")).put("Currency", selectedTransaction.get("Currency"));
		((Map)getData().get("ManualTransaction")).put("OtherBank", selectedTransaction.get("OtherBank"));
		((Map)getData().get("ManualTransaction")).put("TieUp", selectedTransaction.get("TieUp"));
		
		

	
		System.out.println("ManualTransaction: "+getData().get("ManualTransaction"));
		//System.out.println("Selected Row TxnAmount: "+selectedTransaction.get("TotalTxnAmount"));
	}


i can see in the sysops that data is written to the desired data in the bacing bean but its not reflecting on the UI.


Here is what is needed to achieve this:
Edit the rowSelector tag in xhtml and include immediate="false" as shown below:
<ice:rowSelector  value="#{entry.selected}" selectionListener="#{ManualActivity1Bean.selectionListener}" immediate="false" enhancedMultiple="true" multiple="true" toggleOnInput="false" dblClickDelay="200" preStyleOnSelection="true" />
Previous Topic:Attaching Notes via Startdust API
Next Topic:Camel Application Type / Webmodeler
Goto Forum:
  


Current Time: Tue Sep 16 11:34:36 GMT 2014

Powered by FUDForum. Page generated in 0.01861 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software