Re: [Zope] reindex when a zclass is edited

2001-01-14 Thread Aleksander Salwa

On Sat, 13 Jan 2001, Tim Hicks wrote:

> 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).
> 
> 
>   
>  
>  
>
>
>
>
>  
> 
> 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?

It uses cookies (named 'dtpref_rows' and 'dtpref_cols') storing size of
your textarea. Have you turned off cookies by accident ?
If it receives (from edit form) a variable named 'SUBMIT' with value equal
to one of the above ('Taller', etc.), then it sends new cookie values to
the browser.

Source file: lib/python/OFS/DTMLMethod.py,
methods 'manage_edit' and '_er'.


[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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 )




Re: [Zope] reindex when a zclass is edited

2001-01-13 Thread Tim Hicks


- 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:
>
> 
>  
>"manage_edit(data,title,SUBMIT,dtpref_cols,dtpref_rows,REQUEST)">
>  
>   
>  
> 
>  
>"manage_edit(data,title,SUBMIT,dtpref_rows=dtpref_rows,REQUEST=REQUEST)">
>  
>   
>  
> 
> 
> 
>
>

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).


  
 
 
   
   
   
   
 

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 )




Re: [Zope] reindex when a zclass is edited

2001-01-12 Thread Aleksander Salwa


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:


 
  
 
  
 

 
  
 
  
 





[EMAIL PROTECTED], [EMAIL PROTECTED]

/--\
| `long long long' is too long for GCC |
\--/


___
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 )




Re: [Zope] reindex when a zclass is edited

2001-01-11 Thread Tim Hicks


- Original Message -
From: Ivan Cornell <[EMAIL PROTECTED]>
To: Tim Hicks <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 7:53 PM
Subject: Re: [Zope] reindex when a zclass is edited


> Tim Hicks wrote:
>
> >  I can't for the
> > life of me figure out or find anywhere that can tell me how to make the
> > instance get reindexed when it is edited.  I'm assuming that it is
similar
> > to the process for reindexing when the properties are changed, but I'm
just
> > not sure of the details. If it's not too much trouble, could someone
give me
> > detailed instructions (or a link) on how to do this. I'd really
appreciate
> > it.
> >
>
> In your method which is called by your edit form, insert a  "this().reindex_object()"> after updating the properties.
>
> Eg, in my manage_edit method I have
>
> 
> 
> 
>
> Regards, Ivan
>
>

Much obliged Ivan, I have managed to do it now.  I ended up creating
my_editForm and my_edit methods within the zclass and then using the source
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?
my_edit looks like this btw,







Does this seem appropriate?

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 )




Re: [Zope] reindex when a zclass is edited

2001-01-10 Thread Ivan Cornell

Tim Hicks wrote:

>  I can't for the
> life of me figure out or find anywhere that can tell me how to make the
> instance get reindexed when it is edited.  I'm assuming that it is similar
> to the process for reindexing when the properties are changed, but I'm just
> not sure of the details. If it's not too much trouble, could someone give me
> detailed instructions (or a link) on how to do this. I'd really appreciate
> it.
>

In your method which is called by your edit form, insert a  after updating the properties.

Eg, in my manage_edit method I have





Regards, Ivan



___
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 )




[Zope] reindex when a zclass is edited

2001-01-10 Thread Tim Hicks

I know this has been asked numerous times before (once by me!), and I'm
sorry to cover the same ground again, but I've spent all afternoon searching
through the list archives to no avail. I have a zclass that is catalogaware
(selected first and all that).  When I add an instance, it gets cataloged
and all is fine.  I followed the how to
(http://www.zope.org/Members/AlexR/CatalogAware) and successfully made my
instance get reindexed when the properties are changed, but I can't for the
life of me figure out or find anywhere that can tell me how to make the
instance get reindexed when it is edited.  I'm assuming that it is similar
to the process for reindexing when the properties are changed, but I'm just
not sure of the details. If it's not too much trouble, could someone give me
detailed instructions (or a link) on how to do this. I'd really appreciate
it.

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 )