I have a vf page where i am dynamically adding rows. I am using wrapper class to add empty rows evrytime. After selecting custom package values from selectlist , action:support is fired which in turn calling getMarket() method. currently market is a single picklist and it is not displaying any values. At backned there is data.
1 Answer
Sid, as you've asked 3 questions in the last 24 hours on this same code, I have a few suggestions for you. At present, you seem rather lost and are looking for others to debug your code for you. That's difficult for us to do when we're not familiar with your schema and you're not posting your updated code in the same thread where people can follow it.
My suggestion is that you:
Use a "Design by Test" approach to your coding. That means you begin by creating a test class populated with test data you'll use to develop your page and controller. By doing that, you'll know what data you're dealing with and what should be returned in any queries.
Once you have your "basic" features working, you can add additional test methods for other features you want to have or get working in your code. As you add those features, you can run the additional test methods to see if they're working. You can also add LOTS of debug statements to both your code and test methods to see what's happening. Doing that will help you diagnose and troubleshoot any problems you're having getting things to work. With data that varies, it's more difficult to interpret those debug statements.
I always create my test methods using lists using an integer variable I set at the beginning of the class I use to control the size of the lists. Doing this will allow you to test single or "small" sample sizes of records, allowing your test methods to run quickly. Later, as things appear to be working, you'll be able to easily run bulk tests by simply changing the value of the integer variable that controls the size of your lists (only one integer is needed if you can properly relate all of your list sizes).
This development method gives you a consistent set of data to work with so you'll always know what data to expect to see on your pages or to be returned in any queries that you run. This should aid you in systematically debugging problems with your code during development. As a bonus, when you're finished developing your code, you should also have a completed (or nearly complete) test class that should provides you with the coverage you'll need to move your code into production.