Re: [Zope] Why can't I subclass a ZSQLMethod?

2000-07-03 Thread Ivan Raikov


What do you mean, you cannot get a view to it? I can change in the
management area. I believe ZSQL methods are not supposed to provide
the user interface; you use them the way you would use an external
method. That means you have to create the form that sends the query
parameters to the SQL method, and you have to write the DTML code that
obtains the result set, and displays it accordingly.

At least that's way I do it; there might be a better way, I don't
know. 

Best,
Ivan

"Cary O'Brien" <[EMAIL PROTECTED]> writes:

> I tried that.  You can't add a ZSQLMethod unless there is a connection
> for it to connect to.  There isn't a connection in the products area.
> 
> Actually
> 
> If I put a dummy gadfly connection in the Product folder, I can
> indeed add a zsql method to my ZClass.  However I can't get a
> view to it.  I can configure it as a view, but it doesn't show
> up in the management tabs.
> 
> I guess it may be possible to leave it invisible and use
> other methods to set the query, arguments, and database
> connection.  More digging through the .py files!
> 
> -- cary
> 

___
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] Why can't I subclass a ZSQLMethod?

2000-06-30 Thread Cary O'Brien


I tried that.  You can't add a ZSQLMethod unless there is a connection
for it to connect to.  There isn't a connection in the products area.

Actually

If I put a dummy gadfly connection in the Product folder, I can
indeed add a zsql method to my ZClass.  However I can't get a
view to it.  I can configure it as a view, but it doesn't show
up in the management tabs.

I guess it may be possible to leave it invisible and use
other methods to set the query, arguments, and database
connection.  More digging through the .py files!

-- cary

> 
> Why don't you create a ZClass and make the ZSQLMethod to be one of its
> methods? Then the ZClass can provide the user interface to the SQL
> query and the result set.
> 
> Regards,
> Ivan Raikov
> 
> "Cary O'Brien" <[EMAIL PROTECTED]> writes:
> 
> > I want to wrap a presentation layer around ZSQLQueries, so that
> > they will have methods to generate an input form [1] for the query,
> > and generate tabular results if so desired.
> > 
> > I tried to create a ZClass to do this, but I can't subclass from a
> > ZSQLMethod.
> > 
> > Any other ideas on how to do this (besides a class where you have
> > to tell it the ZSQLMethod to use)?
> > 
> > -- cary
> > 
> > [1] Using sql.arguments_str to find out the arguments.  Finding THAT was
> > a struggle!  
> > 
> > 
> 


___
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] Why can't I subclass a ZSQLMethod?

2000-06-30 Thread Ivan Raikov


Why don't you create a ZClass and make the ZSQLMethod to be one of its
methods? Then the ZClass can provide the user interface to the SQL
query and the result set.

Regards,
Ivan Raikov

"Cary O'Brien" <[EMAIL PROTECTED]> writes:

> I want to wrap a presentation layer around ZSQLQueries, so that
> they will have methods to generate an input form [1] for the query,
> and generate tabular results if so desired.
> 
> I tried to create a ZClass to do this, but I can't subclass from a
> ZSQLMethod.
> 
> Any other ideas on how to do this (besides a class where you have
> to tell it the ZSQLMethod to use)?
> 
> -- cary
> 
> [1] Using sql.arguments_str to find out the arguments.  Finding THAT was
> a struggle!  
> 
> 

___
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] Why can't I subclass a ZSQLMethod?

2000-06-30 Thread Andy McKay

ZSQLMethod is not registered as a base class. I dont know why, but you could
try changing it in the init.py... But Im sure there is a good reason why it
isnt.
- Original Message -
From: "Cary O'Brien" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, June 30, 2000 12:59 PM
Subject: [Zope] Why can't I subclass a ZSQLMethod?


>
> I want to wrap a presentation layer around ZSQLQueries, so that
> they will have methods to generate an input form [1] for the query,
> and generate tabular results if so desired.
>
> I tried to create a ZClass to do this, but I can't subclass from a
> ZSQLMethod.
>
> Any other ideas on how to do this (besides a class where you have
> to tell it the ZSQLMethod to use)?
>
> -- cary
>
> [1] Using sql.arguments_str to find out the arguments.  Finding THAT was
> a struggle!
>
>
> ___
> 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 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 )