• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting started: populate a listbox

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Getting my feet wet, first time with java.
Working thruough this tutorial: http://www.netbeans.org/kb/60/web/intro.html

Product Version: NetBeans IDE 6.1 (Build 200805300101)
Java: 1.6.0_05; Java HotSpot(TM) Client VM 10.0-b19

Simple list box with options property: #{Page2.listbox1DefaultOptions}

I am coming from a different world, where I could have just typed in some items under the "items property" in the IDE. Here it looks like I maybe need a constructor for the listbox which will initialize the default items. Or maybe a string array in the ApplicationBean... The docs on Option, Option[] etc seem complete, but what I am apparently lacking is examples.

One example is worth a dozen paragraphs of explanation, I seek the syntax more than anything else.

(Similarly I am getting stumped on other simple tasks, such as setting the HTML "size" property for an input text field).

Have plenty of programming experience and many languages under me, concepts and OOP are not an issue. But not ready for a strict reference guide at this point, I also need to see code snippets showing syntax and usage.

Any good suggestions where to find code snippets for beginners?
Or an online manual with plenty of examples?

Eg: here is some code that will replace the default "item1","item2" in the tutorial listbbox with real values.

TONS of java sites out there. Anyone know of "experienced programmer but java noob" sites? Cut the explanations that are not java-specific and plenty of snippet/syntax samples...

It's the little tasks that kill ya!
Many thanks in advance.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"steward", please check your private messages for an important administrative matter.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by steward:
Getting my feet wet, first time with java.
Working thruough this tutorial: http://www.netbeans.org/kb/60/web/intro.html

OK, that's a tutorial on JSF, a fairly advanced and niche Java discipline, and not at all appropriate for a first-time tutorial on Java. It's sort of like trying to learn math by finding a tutorial on Fourier Transforms.

I'd suggest finding a tutorial more geared towards entry level core Java.

I've moved this to a more appropriate forum for help finding such a tutorial.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic