----- Original Message -----
From: Aleksander Salwa <[EMAIL PROTECTED]>
To: Tim Hicks <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, January 12, 2001 8:34 AM
Subject: Re: [Zope] reindex when a zclass is edited


>
> On Thu, 11 Jan 2001, Tim Hicks wrote:
>
> > from a builtin edit form as my template.  One thing doesn't work now
though,
> > and that's making the textarea wider/narrow/etc.  Obviously, this is
because
> > I have static values put in for the dimensions of the text area, but I'm
not
> > sure how to alter this to make it work... any pointers?
>
> I use this code for that purpose:
>
> <dtml-if "REQUEST.has_key('dtpref_cols')">
>  <dtml-if "REQUEST.has_key('dtpref_rows')">
>   <dtml-var
> "manage_edit(data,title,SUBMIT,dtpref_cols,dtpref_rows,REQUEST)">
>  <dtml-else>
>   <dtml-var "manage_edit(data,title,SUBMIT,dtpref_cols,REQUEST=REQUEST)">
>  </dtml-if>
> <dtml-else>
>  <dtml-if "REQUEST.has_key('dtpref_rows')">
>   <dtml-var
> "manage_edit(data,title,SUBMIT,dtpref_rows=dtpref_rows,REQUEST=REQUEST)">
>  <dtml-else>
>   <dtml-var "manage_edit(data,title,SUBMIT,REQUEST=REQUEST)">
>  </dtml-if>
> </dtml-if>
> <dtml-call "reindex_object()">
> <dtml-call "RESPONSE.redirect(manage_edycjaTresciForm.absolute_url())">
>
>

Thanks very much for the help Aleksander, but when I drop your code into my
method, it doesn't work (it doesn't break either). I simply copied and
pasted your code, then edited the final redirect at the bottom.  Here is the
submission part of my edit form (if it makes any difference).

<TD align=left>
          <INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Change">
 </TD>
 <TD align=left>
   <INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Taller">
   <INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Shorter">
   <INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Wider">
   <INPUT NAME=SUBMIT TYPE="SUBMIT" VALUE="Narrower">
 </TD>

I had a look on the ZQR, and found the section on manage_edit, but I still
don't really understand how the dtpref_cols/rows works.  Any insight?

Cheers

tim


_______________________________________________
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )

Reply via email to