PRStructure subclass: #PRAdHocForm instanceVariableNames: '' classVariableNames: '' package: 'Pier-Forms'! !PRAdHocForm methodsFor: 'configuration' stamp: 'JohnCBorden 12/2/2025 22:31'! viewComponentClass ^ PRAdHocFormView! ! PRViewComponent subclass: #PRAdHocFormView instanceVariableNames: '' classVariableNames: '' package: 'Pier-Forms'! !PRAdHocFormView methodsFor: 'rendering' stamp: 'JohnCBorden 12/4/2025 20:27'! renderContentOn: html | component | (self context isValidCommand: PREditCommand) ifTrue: [ html form: [ html render: (component := PRAdHocObject new asComponent). html submitButton callback: [ component save. Transcript show: 'The button was pushed: '; show: component model parameter; cr ]; with: 'Push' ] ] ifFalse: [ html render: 'Edit is not valid in this context - no button to push' ]! ! "-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "! PRAdHocFormView class instanceVariableNames: ''! !PRAdHocFormView class methodsFor: 'testing' stamp: 'JohnCBorden 12/2/2025 22:35'! isAbstract ^ false! ! !PRAdHocFormView class methodsFor: 'accessing' stamp: 'JohnCBorden 12/2/2025 22:35'! label ^ 'ad hoc'! ! Object subclass: #PRAdHocObject instanceVariableNames: 'parameter' classVariableNames: '' package: 'Pier-Forms'! !PRAdHocObject methodsFor: 'accessing' stamp: 'JohnCBorden 12/4/2025 20:20'! parameter: aString parameter := aString! ! !PRAdHocObject methodsFor: 'accessing' stamp: 'JohnCBorden 12/4/2025 20:21'! parameter ^ parameter ifNil: [ parameter := '' ]! ! !PRAdHocObject methodsFor: 'accessing-description' stamp: 'JohnCBorden 12/4/2025 20:21'! descriptionParameter ^ MAStringDescription new parameterName: 'parameter'; accessor: #parameter; beSearchable; priority: 120; label: 'Parameter'; beRequired; beEditable; yourself! !