I have the following class in Pharo
WARestfulHandler subclass: #PgUserAddHandler
instanceVariableNames: ' employeeId'
classVariableNames: ''
poolDictionaries: ''
category: 'abc-Model'
I want to implement a function which renders a page of a WAComponent class, something like shown below from within the above class.
searchFor: aString
<get>
<path: '/userAdd?add={aString}'>
self render: (PgEmployeeRegisterComponent new) employeeId:aString.
Please help !!
Thanks in advance !!
Replace your last line with:
The
WAHtmlCanvas builder render:
returns a string of the rendered data. To have more flexibility you can also pass in a block, like to any brush:Note that a new instance of your component will be created for each request. No state is automatically preserved and callbacks do not work out of the box.