BrightSide Workbench Full Report + Source Code
org.turro.newsletter.BannerComposer Class Reference
Inheritance diagram for org.turro.newsletter.BannerComposer:
Collaboration diagram for org.turro.newsletter.BannerComposer:

Public Member Functions

final void onChange (Event event)
 
void onSelectImage ()
 
void onDeleteImage ()
 
 BannerComposer (String htmlStr, String entityPath)
 
String getResult ()
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 60 of file BannerComposer.java.

Constructor & Destructor Documentation

◆ BannerComposer()

org.turro.newsletter.BannerComposer.BannerComposer ( String  htmlStr,
String  entityPath 
)

Definition at line 106 of file BannerComposer.java.

106  {
107  HashMap args = new HashMap();
108  args.put("el_label", Application.getStringMap());
109  args.put("i_", I_.api());
110  args.put("i", I_.map());
111  args.put("k", I_.byKeyMap());
112  Executions.createComponents("/WEB-INF/_zul/bs/comps/editor/bannerComposer.zul", this, args);
113  Selectors.wireComponents(this, this, false);
114  Selectors.wireEventListeners(this, this);
115  this.entityPath = entityPath;
116  parseValues(htmlStr);
117  html.setContent(bannerString());
118  }
Here is the call graph for this function:

Member Function Documentation

◆ getResult()

String org.turro.newsletter.BannerComposer.getResult ( )

Definition at line 120 of file BannerComposer.java.

120  {
121  return bannerString();
122  }
Here is the caller graph for this function:

◆ onChange()

final void org.turro.newsletter.BannerComposer.onChange ( Event  event)

Definition at line 75 of file BannerComposer.java.

75  {
76  html.setContent(bannerString());
77  }

◆ onDeleteImage()

void org.turro.newsletter.BannerComposer.onDeleteImage ( )

Definition at line 101 of file BannerComposer.java.

101  {
102  imgSrc = null;
103  html.setContent(bannerString());
104  }

◆ onSelectImage()

void org.turro.newsletter.BannerComposer.onSelectImage ( )

Definition at line 80 of file BannerComposer.java.

80  {
81  RepositoryWalker repositories = new RepositoryWalker(null);
82  repositories.selectFolder("/_internal/files" + entityPath);
83  repositories.setFilter(RepositoryContent.IMAGE_FILTER);
84  repositories.setReadOnlyRepository(Strings.isBlank(entityPath));
85  repositories.setNoTreeRepository(false);
86  SelectionDialog.showComponent(getPage(), I_.get("Repository"), repositories, "90%", "90%", new Command() {
87  @Override
88  public Object execute(Context context) {
89  File result = repositories.getResult();
90  if(result != null) {
91  imgSrc = ElephantContext.getRootWebPath() +
92  ElephantContext.getRelativePath(result.getAbsolutePath());
93  }
94  html.setContent(bannerString());
95  return null;
96  }
97  });
98  }
Here is the call graph for this function:

The documentation for this class was generated from the following file: