WALabelledFormDialog renders the visible input fields with a default length.
How can one change that length? Thank you, Ernst _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi,
Where do I ask beginner's questions like this? Tank you, Ernst On Thursday 01 November 2007 22:52, Ernst wrote: > WALabelledFormDialog renders the visible input fields with a default > length. How can one change that length? > > Thank you, Ernst > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Hi,
Where do I ask beginner's questions like this? Tank you, Ernst I can adjust the width of the text area with CSS. But how can I adjust the number of rows? renderCommentOn: html html textAreaOn: #comment of: model. ^self style " The relevant page source is (I have to represent double quote with a star!): <div id=*dialog-row-comment* class=*dialog-row*> <span class=*dialog-form-label*> Comment </span> <span class=*dialog-form-field*> <textarea cols=*25* name=*30* rows=*3* id=*comment*> Some Comment </textarea> </span> </div>" ^'#comment { width: 700px; }' , super style _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
AnyComponent>>renderCommentOn: html
html div id: 'comment'; with: [ html textAreaOn: #comment of: model]. AnyComponent>>style ^' #comment textarea{ height: 100px; width: 220px;} ' Though style method is not preferable in Seaside 2.8, but it still works. You may go through the new Seaside Tutorial to learn faster and better. http://www.swa.hpi.uni-potsdam.de/seaside/tutorial Hope That Helps, Rajeev On 11/3/07, Ernst <[hidden email]> wrote: Hi, -- Rajeev Lochan Co-founder, AR-CAD.com http://www.ar-cad.com +91 9243468076 (Bangalore) 080 65355873 _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
>>>>> "Rajeev" == Rajeev Lochan <[hidden email]> writes:
AnyComponent> renderCommentOn: html Rajeev> html div id: 'comment'; with: [ Rajeev> html textAreaOn: #comment of: model]. Since an ID can be used only once, and you might end up with this component twice on the same page, it'd be better to either dynamically generate the ID (aside: there's gotta be a way to do that for AJAX, but I'm not quite up to speed on that), or use a class rather than an ID. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <[hidden email]> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Ernst-2
2007/11/3, Ernst <[hidden email]>:
> Hi, > Where do I ask beginner's questions like this? Here :) > Tank you, > Ernst > > I can adjust the width of the text area with CSS. > But how can I adjust the number of rows? > > renderCommentOn: html > html textAreaOn: #comment of: model. > ^self This looks like the old rendering API. This is fine for existing software but for new ones we recommend the new API which is the default with Seaside 2.7 and newer. With the new API you would do: renderCommentOn: html html textArea rows: anInteger; on: #comment of: model This doesn't use CSS but CSS has no real attribute for setting the number of rows. Setting the height absolute in pixels is very brittle and not guaranteed to match the exact number. Cheers Philippe > style > " The relevant page source is (I have to represent double quote with a > star!): > <div id=*dialog-row-comment* class=*dialog-row*> > <span class=*dialog-form-label*> > Comment > </span> > <span class=*dialog-form-field*> > <textarea cols=*25* name=*30* rows=*3* id=*comment*> > Some Comment > </textarea> > </span> > </div>" > > ^'#comment { > width: 700px; > }' , super style > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Ernst-2
2007/11/3, Ernst <[hidden email]>:
> Hi, > Where do I ask beginner's questions like this? That's the right place. The short answer is you can't change the length. The long answer is subclass WALabelledFormDialog or the class you use and override the necceasary methods. In your case probably #renderDefaultFieldForSelector:on: A general comment about the WADialog hierarchy. They are ok to get started fast, but for more serious projects with special requirements (like yours) you'll probably end up writing your own. Cheers Philippe > Tank you, > Ernst > > On Thursday 01 November 2007 22:52, Ernst wrote: > > WALabelledFormDialog renders the visible input fields with a default > > length. How can one change that length? > > > > Thank you, Ernst > > _______________________________________________ > > seaside mailing list > > [hidden email] > > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > _______________________________________________ > seaside mailing list > [hidden email] > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside > seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
> A general comment about the WADialog hierarchy. They are ok
> to get started fast, but for more serious projects with > special requirements (like yours) you'll probably end up > writing your own. > > Cheers > Philippe He's right, you will want to write your own. You should consider the dialog hierarchy as examples rather than controls you'd actually use. Their presence does lead to the mistaken assumption that they're supposed to be used and then you find you can't customize them enough, I wonder if these could be candidates for removal from Seaside 2.9 to further slim down the core? Ramon Leon http://onsmalltalk.com _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
In reply to this post by Philippe Marschall
> renderCommentOn: html
> html textArea > rows: anInteger; > on: #comment of: model > Learn to fish. Look in WARenderCanvas>>tagName to see what tag is returned. #textArea for example looks like this... WARenderCanvas>>textArea ^ self brush: WATextAreaTag new Then go look at the tag class and you'll see #rows: as a valid selector. Chasing down the appropriate tag object is by far the fasted method for figuring out how to write valid code and seeing just what is and isn't supported. The code really is the best documentation. Ramon Leon http://onsmalltalk.com _______________________________________________ seaside mailing list [hidden email] http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside |
Free forum by Nabble | Edit this page |