You could check out the wwShowCursor class. Although Rick says it's deprecated, it is still supported for backwards compatibility. (And I sincerely hope it support will continue since I have a lot of legacy code that uses it...)It has a showrecord method for showing the current record of the selected cursor:
loSc = CREATEOBJECT("wwShowCursor")
loSC.cTableWidth = "450"
loSC.ShowRecord()
loSC = CREATEOBJECT("wwShowCursor")
loSC.lAlternateRows = .T.
loSC.ShowCursor()
Response.Write( loSC.GetOutput() )
There is some info in the help file - do a search for "wwshowcursor". As Rick says, you're going to get pretty basic generic output but if that's all you want, it may work for you. And you can always subclass it and add your own enhancements. (Just don't expect much in the way of support from the vendor if you have problems!)
--stein
Rick,
1st of all, thanks for the quick answer.
What can I say? I am disappointed with the answer. As a VFP programmer, I was hoping for more VFP and less HTML/CSS in WebConnection; more automation/RAD. I know you cannot make 100% of developers happy, but 30%, 50%, or 80% might be happy with a generic tool/class/function. I am talking here about very basic functionality for a data-driven website. I wouldn't need WebConnection for a static website with just a few data entry fields.
BTW, [[The problem with those kinds of things is that everyone then wants a million little enhancements to do this or that a little different and it's just too much of a hassle to maintain this]] this is a problem with everything! This is why you provide basic classes/code which developers can customize.
Thanks again,
San2013
No we don't have a template tool that automatically provides record viewing and browsing.
The problem with those kinds of things is that everyone then wants a million little enhancements to do this or that a little different and it's just too much of a hassle to maintain this, so this feature which we previously had roughly as part of wwShowCursor has been deprecated.
+++ Rick ---
Hi,
I have many tables (20+) in my project. The users will create and edit data in those tables through a website.
I could use something looking like the Sample Guest Book, but simpler, working with a single record at the time.
Does WebConnection have a tool/class/function to automatically generate HTML code to create/edit a single record in a table?
Input parameters would be:
- cursor/table record, object or a set of memory variables representing a single record,
- field captions,
- field descriptions,
- field types and sizes (text, numeric, date, time, date and time, boolean...)
- simple validation rules (required, range...)
- default value.
I see that the Guest Book is done through a template. It is not extremely complex, but not trivial either. I could imagine a WebConnection tool/class/function generating a generic HTML code for me. Does something like this exist?
I am new to Web Connection, so sorry if the above doesn't make sense,
San2013