Re: Re: [Visual Web] Updating a Text Field
Brad Oleson <oleson <at> igist.com>
2007-08-01 02:31:09 GMT
Paul -
I've worked it all out so that the form table displays things correctly when the drop down is changed. Same with the static text fields, where I have tested them But the regular text field only loads the first record it is tied to, then won't update when the drop down changes. I'll send you a screen shot or two tomorrow. Actually, I could deploy my development copy and you could probably test it live. I will message you in the morning with more so you can check it out. Thanks for your help!
Brad
--------------- Original Message Follows ------------------
From: Paul.Fussell <at> Sun.COM (Paul Fussell)
Date: 7/31/2007 05:32 PM (Pacific Standard Time)
To: nbusers <at> netbeans.org
Subject: Re: [nbusers][Visual Web] Updating a Text Field
Brad,
It sounds like the first problem to solve is that the dropdown list
isn't changing the values shown in the table. Are you doing something
like what's done in
to pick
a user and then display data from another table for that user? If so
and you haven't done so already, I suggest going through the steps in
that tutorial to first get the table to work. You'll need to:
1. Set up the query properly for the rowset used by the table so the
table displays only what the dropdown list selects.
2. Adapt the code for the dropdown list's processValueChange method
and for the prerender method.
3. Make sure to right-click the dropdown list and choose Autosubmit
on Change (or the dropdown list won't submit the page when you select a value).
After you get that working, think the next thing is to do is to set
up the droplist to work with the text fields so they'll display and
update the database table values. The idea is similar to the setup
for the table. I won't go into detail on that now. For the update
part it might be useful to apply principals from the Performing
Inserts, Updates, and Deletes tutorial at
.
If you run into more problems and want to send code samples or screen
shots, I'll try to help.
--Paul
At 01:22 PM 7/31/2007, Brad Oleson wrote:
>Yes, I have done the tutorials, but none of them really address using a text
>field specifically. Here's how I bound the text field to the database
>table:
>
>I first added a form table to the form, then dragged the DB table onto the
>form to create the data binding. Then, using the rowset created there, I
>bound the text field to the DB table field I want it to display (right
>click, bind to data, choose the right rowset and field).
>
>Is this a bad way to do it...or, is there a BETTER way to do it? It seemed
>that if I dragged the DB table to the text field it didn't create the
>binding relationship.
>
>Let me know if I can supply any more info. Thanks!
>
>Brad
>
>-----Original Message-----
>From: Paul.Fussell <at> Sun.COM [mailto:Paul.Fussell <at> Sun.COM]
>Sent: Tuesday, July 31, 2007 8:31 AM
>To: Brad Oleson
>Subject: I lost your last message
>
>Hi Brad,
>
>I managed to lose the last message on the visual web problems you've
>been having. Could you send it again directly to me? I'll run it past
>the team and see if anyone can figure things out. It sounds like it's
>a basic design thing that we probably didn't explain well enough.
>Have you done any of the tutorials? There are a few dealing with
>database access and binding components that might be useful for basic
>concepts. See the Accessing a Database section the web page at
>.
>
>
>Paul Fussell . Tech Writer . NetBeans Visual Web Pack
>mailto:paul.fussell <at> sun.com . mailstop umpk16-250
>phone/fax 877-249-1842 . internal x51772