[Seaside] Creating html tables

dirk newbold dirkdirk at gmail.com
Sat Apr 28 08:32:07 UTC 2007


Newbie to Newbie,

Here is a format David Shaffer set me up with (I hope I have interpreted
correctly David?).  Don't pay any attention to the input syntax as
apparently you should be using canvas but I don't know how to yet. - Note if
anyone does have some worked examples of canvas or knows where some thorough
tutorials are that would be great.

Also - 'Is there any place set up where simple pieces of code like this are
kept so that us Newbies can hunt around and see how things work - kind of
like http://www.oswd.org/ for style sheets.  If not can we set one up?  Even
if we could mimic http://www.oswd.org/ just on the style sheet side it might
help encourage more people to use Smalltalk and Seaside.

*Anyway code is  as follows - Any comments from the Pro's would be awesome:*

*renderContentOn: html*
 html divClass: 'contents'
  with:
   [html heading: 'Table Examples'.
   html table:
     [html tableRow:
       [html
        cssClass: 'col1';
        tableData: 'Name:'.
       html
        cssClass: 'col2';
        tableData: [html textInputWithValue: [] callback: []].
       html
        cssClass: 'col3';
        tableData: [html anchorWithAction: [] text: 'Edit']].
     html html tableRow:
       [html
        cssClass: 'col1';
        tableData: 'Gender:'.
       html
        cssClass: 'col2';
        tableData:
          [| group |
          group := html radioGroup.
          html
           radioButtonInGroup: group
           selected: []
           callback: [].
          html text: 'Male'.
          html
           radioButtonInGroup: group
           selected: []
           callback: [].
          html text: 'Female'].
       html
        cssClass: 'col3';
        tableData: [html anchorWithAction: [] text: 'Edit']]]]

*With the following Style Sheet:*

*style
 ^'*

 .contents {
  float: left;
  width: 100%;
  font-family: verdana;
 }

 .contents table{
  border-color: #BBBBBB;
  border-width: 1px;
  border-style: solid;
  background-color: ##DDDDDD;
  border-spacing: 3px;
 }

 .contents td.col1{
  text-align: right;
  font-family: verdana;
  font-size: 12px;
  border-right: 1px solid black;
  border-bottom: 1px solid black;
  width: 80px;
  background-color: #EEEEEE;
  padding: 5px 5px 5px 5px;
 }

 .contents td.col2{
  text-align: left;
  font-family: verdana;
  font-size: 12px;
  border-left: 1px solid black;
  border-bottom: 1px solid black;
  width: 300px;
  background-color: #EEEEEE;
  padding: 5px 5px 5px 5px;
 }

 .contents td.col3{
  text-align: center;
  font-family: verdana;
  font-size: 12px;
  border-left: 1px solid black;
  border-bottom: 1px solid black;
  width: 60px;
  background-color: #EEEEEE;
  padding: 5px 5px 5px 5px;
 }

 .contents input.text{
  width: 100%;
 }

 .contents imput.radio{
 }
'



On 4/27/07, John Brochan Collison <john at collison.ie> wrote:
>
> Thanks, that works perfectly.
>
> John
>
>  On 27 Apr 2007, at 13:50, Peter Osburg wrote:
>
>  using html as the renderer, you should do:
>
> html table with:[ html tableRow with: [ html tableData with: [] ] ]
>
> of course you can leave out the "with" messag but for having the code
> ready for further purposes you should use "with". later on you could do the
> following (if necessary)
> html table
>     id: 'any_id';
>     class: 'any_class';
>     with: [ anything ].
>
> John Brochan Collison schrieb:
>
> Newbie question:
>
> What's the correct syntax for creating html tables in Seaside? I've seen a
> few ways floating around, not sure if they're up to date.
>
> John
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
> --
> www.peter-osburg.de
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20070428/f7da42f1/attachment-0001.htm


More information about the seaside mailing list