[aida] Sort elements with links

Francisco A. Lizarralde st.easy.rider at gmail.com
Mon May 11 15:09:26 CEST 2009


Hi Janko,

El lun, 11-05-2009 a las 10:03 +0200, Janko Mivšek escribió:
> It is possible to sort columns with links too. Can you send the code
> building that WebGrid? 

viewStudents
	"Lista los estudiantes"
        | e entryList |

	e := WebElement new.
	e addTextH1: 'Alumnos'.
	e add: self viewTabComponent.
 	entryList := WebGrid new.
	entryList columnNames: #('' 'Matricula' 'Apellidos' 'Nombres' 'Email');
		setNumbering;
		columnFilters: #(nil true true nil nil);
		sortOn: 2;
		collection: self observee students;
		columnAspects: #(nil #studentId #surname #name #email);


"IF I COMMENT THE NEXT LINE, i CAN SORT THE COLUMN"
		column: 2 addBlock: [ :each |
			(WebElement new) addLinkTo: each text: each studentId].


	e addTextH1: ''.	
	e addBreak.
	e add: entryList.

     self pageFrameWith: e title: 'Alumnos'

> Is id a string or number?
It's a String.

Thank you, so much

Best regards,

Francisco



More information about the Aida mailing list