package mildo.wiwo.components;

import mildo.wiwo.Session;
import mildo.wiwo.action.EditAction;
import mildo.wiwo.action.ShowWiwoPageAction;
import mildo.wiwo.components.descriptors.IActionDescriptor;
import mildo.wiwo.components.descriptors.ObjectListTableDescriptor;

import com.webobjects.appserver.WOContext;
import com.webobjects.foundation.NSArray;

// Generated by the WOLips Templateengine Plug-in at Apr 14, 2009 1:16:50 PM
public class SearchResultComp 
	extends BaseComp 
{
	
	public SearchResultComp(WOContext context) {
        super(context);
    }
	
	//----------
	
	private NSArray results;
	
	public void setResults(NSArray aValue) {
		results = aValue;
	}
	
	public NSArray getResults() {
		return results;
	}
	
	//----------
	
	private ObjectListTableDescriptor tableDescriptor;
	
	public void setTableDescriptor(ObjectListTableDescriptor aValue) {
		tableDescriptor = aValue;
	}
	
	public ObjectListTableDescriptor getTableDescriptor() {
		if (tableDescriptor == null) {
			tableDescriptor = new ObjectListTableDescriptor(TABLE_ATTRIBUTES_STRINGS, TABLE_HEADER_STRINGS, 
					new IActionDescriptor[]{new ShowWiwoPageAction()});
		}
		return tableDescriptor;
	}
	
	public static final String[] TABLE_HEADER_STRINGS = {"Page name", "Last version Date"};
	public static final String[] TABLE_ATTRIBUTES_STRINGS = {"name", "versionDate"};
	
}