View Javadoc
1   package org.exoplatform.wcm.webui.selector.content.one;
2   
3   import org.exoplatform.wcm.webui.selector.content.UIContentSearchForm;
4   import org.exoplatform.wcm.webui.selector.content.UIContentSearchResult;
5   import org.exoplatform.wcm.webui.selector.content.UIContentSelector;
6   import org.exoplatform.webui.config.annotation.ComponentConfig;
7   import org.exoplatform.webui.config.annotation.ComponentConfigs;
8   import org.exoplatform.webui.config.annotation.EventConfig;
9   
10  /**
11   * Author : TAN DUNG DANG
12   * dzungdev@gmail.com
13   * Jan 20, 2009
14   */
15  
16  @ComponentConfigs ({
17    @ComponentConfig(
18      template = "system:/groovy/webui/core/UITabPane_New.gtmpl"
19    ),
20    @ComponentConfig(
21      type = UIContentSearchResult.class,
22      template = "classpath:groovy/wcm/webui/selector/content/one/UIContentSearchResult.gtmpl",
23      events = {
24        @EventConfig(listeners = UIContentSearchResult.SelectActionListener.class),
25        @EventConfig(listeners = UIContentSearchResult.ViewActionListener.class)
26      }
27    )
28  })
29  
30  public class UIContentSelectorOne extends UIContentSelector {
31  
32    /**
33     * Instantiates a new uI content selector one.
34     *
35     * @throws Exception the exception
36     */
37    public UIContentSelectorOne() throws Exception {
38      addChild(UIContentBrowsePanelOne.class, null, null);
39      addChild(UIContentSearchForm.class,null,null);
40      addChild(UIContentSearchResult.class,null,null);
41      setSelectedTab(1);
42    }
43  
44    /**
45     * Inits the.
46     *
47     * @throws Exception the exception
48     */
49    public void init() throws Exception {
50      getChild(UIContentSearchForm.class).init();
51    }
52  
53    /**
54     * Set the init path, when the popup window appears, it will go to the node
55     * specified by this init path.
56     * @param initPath
57     * @throws Exception
58     */
59    public void init(String initDrive, String initPath) throws Exception {
60      getChild(UIContentBrowsePanelOne.class).setInitPath(initDrive, initPath);
61      this.init();
62    }
63  }