NetTalk Central

Author Topic: Browse and Form on Same Page  (Read 4359 times)

gavinwebb

  • Newbie
  • *
  • Posts: 40
    • View Profile
    • Email
Browse and Form on Same Page
« on: February 18, 2012, 07:23:39 AM »
Is there a good example of this anywhere.  I've looked in help and at example 5 but it doesn't seem to do this.

G

Rob de Jager

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Browse and Form on Same Page
« Reply #1 on: February 18, 2012, 09:49:16 AM »
Hi Gavin

I gave modified the Nettalk Accounts Example 31. I assumed you wanted the browse line update form to refresh every time you selected another record.

Make a copy of the accounts example directory and drop the attached app into that directory and run it. It opens and runs on the procedure  called BrowseInvoiceForm.

In your app, you should consider which cancel and save buttons you want to suppress and their applicable url's as well.

Cheers

Rob


[attachment deleted by admin]

gavinwebb

  • Newbie
  • *
  • Posts: 40
    • View Profile
    • Email
Re: Browse and Form on Same Page
« Reply #2 on: February 20, 2012, 12:41:22 PM »
Thanks Rob, I downloaded this but for some reason it won't compile.  Nevertheless I took a look at what you did.  In summary:
Create a memory web form
Put browse and update form on the web form
On the browse tick the box to send value back to server and get it to reset the update form (value)

That all makes sense :)  However on my simple example doesn't work - update form remains blank.

What am I missing?

Rob de Jager

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Browse and Form on Same Page
« Reply #3 on: February 20, 2012, 09:30:49 PM »
Gavin,

A easier place to start is to why the example I send you does not compile. What are the compile errors which you are getting?

Cheers

Rob

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Browse and Form on Same Page
« Reply #4 on: February 20, 2012, 10:22:12 PM »
hi Gavin,

I'm not 100% sure you can do what you're trying.
It's been a long time since I tried example 5 - and as far as I know it never actually worked. It's _possible_ that I might be able to get the technique working now, because some of the underlying html has changed, but the concept of having a browse, and the same form, in the same page was somewhat "abandoned" in favor of simple Edit-in-place.

I'll put the concept back on the list, but I can't make any promises that I can make it work. For starters, the Form inside another form is not allowed, so it'll have to be based on a page. I think if it did work it would have a fairly narrow scope.

cheers
Bruce



Rob de Jager

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Browse and Form on Same Page
« Reply #5 on: February 21, 2012, 10:52:53 AM »
Hi Gavin,

Which ever way I slice or dice my example I gave you, it still works. Hopefully you are on NetTalk 6??

What Bruce is saying though, is that a form on a form is not designed to work. So I was lucky. Unfortunately this is the only way I can get the solution to work for you out of the box, without some really fancy footwork and considerable time spend on this.

The risk of implementing the solution now, as it works on a form, is that it might stop working down the line when future changes are made to NetTalk. So probably best to change your UI design, until such time when we get an out of the box working example.

So I am thinking: You have netweb browse....below the netweb browse, the browse's netweb updateform...highlight a record on the netweb browse and the netweb form is populated with the selected row's data....a forward and backward button below the netweb form saves your changes and populates the next or previous record in the form.....and moves the netweb browse highlight bar as well...hmm.....were is Santa Claus when you need him or do we look for Santa and find Bruce? I just love finding work for others.....

Cheers


Rob
« Last Edit: February 21, 2012, 10:54:27 AM by Rob de Jager »