This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 94212 - Prerender Code Sample needs to setSelected()
Summary: Prerender Code Sample needs to setSelected()
Status: NEW
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 5.x
Hardware: PC Windows ME/2000
: P2 blocker (vote)
Assignee: _ jimdavidson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-03 01:23 UTC by bugbridge
Modified: 2007-12-07 16:41 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bugbridge 2007-02-03 01:23:47 UTC
Original status: 1-Dispatched; Suggested Status: NEW

Original Target Release: mako_dev; Suggested Target Milestone : Dev


Original submitter: ckutler

Description:
In regards to the following code clip:

  public void prerender() {
       if ( dropdown1.getSelected() == null ) {
           try {
               personDataProvider.cursorFirst();
               getSessionBean1().getTripRowSet().setObject(1,
personDataProvider.getValue("PERSON.PERSONID"));
               tripDataProvider.refresh();
           } catch (Exception e) {
               error("Cannot switch to person " +
personDataProvider.getValue("PERSON.PERSONID"));
               log("Cannot switch to person " +
personDataProvider.getValue("PERSON.PERSONID"), e);
           }
       }
   }

This clip should call
dropdown1.setSelected(personDataProvider.getValue("PERSON.PERSONID")) to set it
to the first item? Otherwise, there will be a problem if some subsequent method
expected the getSelected() to not be null?