[Seaside] Add button not showing it's page
Avi Bryant
avi at beta4.com
Mon Jul 26 22:17:17 CEST 2004
On Jul 26, 2004, at 9:34 AM, s002 wrote:
> I have an object that shows a record from a GOODS database. I created
> a link to 'add' a new record. When I click on the link, the screen
> flashes and stays at the recordlist page. Can someone help me.
> PMLogsView>>renderContentOn: html
> | |
> html table: [
> html tableRow: [html tableHeading: 'View all Log Entries'; space;
> space; space.
> html tableData: [html anchorWithAction: [self renderAddOn: html]
> text: 'Add']]].
> html attributeAt: 'cellspacing' put: 0; attributeAt: 'cellpadding'
> put: 5; attributeAt: 'border' put: 2.
> html table: [
> allRecords do: [:i |
> html tableRow: [
> html tableData: [html anchorWithAction: [self delete: i from: db]
> text: 'Del'].
> html tableData: i type.
> html tableData: i entryDate.
> html tableData: i startTime.
> html tableData: i entryText.
> html tableData: i endTime.
> ].
> ].
> html tableRow: []
> ]
You don't want two methods on the same class here, you want two
different classes. So your #renderAddOn: method should be the
#renderContentOn: of a PMLogsAddItem component. And then your 'Add'
link should be this:
html anchorWithAction: [self call: PMLogsAddItem new] text: 'Add'.
Does that make sense?
> and here is the
> PMLogsView>>renderAddOn: html
> " show add new log form"
> aRecord := PMLogItem new.
> aRecord initialize.
> html form: [
> html table: [
> html tableRow: [html tableHeading: 'New Log Entry']].
> html text: 'TEST NEW ENTRY PAGE'.
> html text: aRecord entryDate.]
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
More information about the Seaside
mailing list