Example: Search dialog SearchDialogCriteriaBean

The following example shows an implementation of the SearchDialogCriteriaBean.

package com.ibm.commerce.tools.test;
 
import java.util.Hashtable;
import com.ibm.commerce.command.CommandContext;
import com.ibm.commerce.datatype.TypedProperty;
import com.ibm.commerce.tools.common.ui.SearchDialogCriteriaBean;
 
public class SampleSearchCriteriaDataBean implements SearchDialogCriteriaBean {
   protected CommandContext commandContext = null;
   protected TypedProperty requestProperties = null;
 
   public CommandContext getCommandContext() {
         return commandContext;
    }
 
   public void setCommandContext(CommandContext cc) {
         commandContext = cc;
    }
 
   public TypedProperty getRequestProperties() {
         return requestProperties;
    }
 
   public void setRequestProperties(TypedProperty reqProp) {
         requestProperties = reqProp;
    }
 
   public void populate() {
    }
 
   public Hashtable getManufacturer() {
      Hashtable hash = new Hashtable();
      hash.put("IBM", "IBM");
      return hash;
    }
 
   public Hashtable getDisplayNum() {
      Hashtable hash = new Hashtable();
      hash.put("10", "10");
      hash.put("20", "20"); 
      hash.put("30", "30");
      return hash;
    }
 
   public Hashtable getStore() {
      Hashtable hash = new Hashtable();
      hash.put("demoStore", "Demo Store");
      hash.put("protomartB2B", "protomart B2B"); 
      hash.put("protomartB2C", "protomart B2C");
      return hash;
    }
 
   public String getMessage() {
         return "message from the server";
    }
} 
 



 

Related Tasks

Related concepts

Related reference