null pointer findviewbyid
===

i'm new in android programming, i'm trying make dynamic depended spinner by pass a spinner id from main activity and set id to be recalled, i got a trouble with null pointer findviewbyid when recall child spinner, sorry for my mess words and code. Thank you for any help
<br/>
<br/>here is my code:

    public class PickOne extends LinearLayout {
	String tag = PickOne.class.getName();
	TextView label;
	ArrayAdapter<String> aa;
	Spinner spinner;
	LinearLayout ll;
	String title;
	Spinner spChild;
		
	public PickOne(Context context,DataSource datasource,SQLiteDatabase db,String labelText,String options,String spinnerID,String parentID,String childID) {
		super(context);
		
		View spinnerLayout = View.inflate(context, R.layout.dummy, null);
		ll = (LinearLayout) spinnerLayout.findViewById(R.id.dummylayout);
		
		//ll = new LinearLayout(context);
		ll.setOrientation(LinearLayout.VERTICAL);
		
		LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
		    LayoutParams.FILL_PARENT,
		    LayoutParams.FILL_PARENT);
	 	 
	 	ll.setLayoutParams(params);
	 	ll.setPadding(4, 10, 4, 0);
	 	
	 	if(parentID.length() > 0){
			
			spinner = new Spinner(context);
			spinner = (Spinner) spinnerLayout.findViewById(Integer.valueOf(spinnerID)); //give me null
			spinnerInitialized(context,spinner);
			
			if(spinner == null){
				Log.i("!!!!!!!!!!!!!!","null.................");
			}
			
			label = new TextView(context);
    		label.setText(labelText);
    		label.setTextColor(getResources().getColor(R.color.label_color));
    		
			title = label.getText().toString();
    		spinner.setPrompt(title);
    		
        }else{        	
        	System.out.println("in parentID....." + String.valueOf(parentID));
    	 	
    		label = new TextView(context);
    		label.setText(labelText);
    		label.setTextColor(getResources().getColor(R.color.label_color));
    		
    		spinner = new Spinner(context);
    						
    		options = "Select One|" + options;
    		String []opts = options.split("\\|");
    		
    		aa = new ArrayAdapter<String>(context, android.R.layout.simple_spinner_item,opts);
    		aa.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    		spinner.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
    		spinner.setAdapter(aa);
    				
    		title = label.getText().toString();
    		spinner.setPrompt(title);
    		
    		ll.addView(label);
    		ll.addView(spinner);
    		    		
    		if(childID.length()>0){
    			spChild = new Spinner(context);
    			spinnerInitialized(context,spChild);
    			
    	        spChild.setId(Integer.valueOf(childID));//set id to be recalled
    	        spChild.setEnabled(false);
    			ll.addView(spChild);
    			
    			spinnerOnItemSelectedListener(context,datasource,db,"assetbrand", "assettype", spinner, spChild);
    		}		
    		Log.i("childID........",String.valueOf(spChild.getId()));
    		this.addView(spinnerLayout);
        }
			
	}
my main activity code :

    int i;
            for (i=0;i<theForm.fields.size();i++) {
            	theForm.fields.elementAt(i).obj = new PickOne(context,datasource,db,(" " + theForm.fields.elementAt(i).getLabel()),theForm.fields.elementAt(i).getOptions(),theForm.fields.elementAt(i).getSpinnerID(),theForm.fields.elementAt(i).getParentID(),theForm.fields.elementAt(i).getChildID());
            		panel.addView((View) theForm.fields.elementAt(i).obj);            		
            	}
            } 