◆ doFinally()
void org.turro.contacts.profile.EditCProfileControl.doFinally |
( |
| ) |
|
|
protected |
Reimplemented from org.turro.elephant.TemplateControl.
Definition at line 257 of file EditCProfileControl.java.
259 KeyValueMap kvm = Actions.getRightNowAction(Application.getApplication().getConstructor());
260 if(kvm !=
null && kvm.containsKey(
"contact")) {
261 contact = Contacts.getContactById(kvm.get(
"contact"));
◆ getLangModel()
List<String> org.turro.contacts.profile.EditCProfileControl.getLangModel |
( |
| ) |
|
Definition at line 202 of file EditCProfileControl.java.
204 langs =
new ArrayList<>();
206 langs.addAll(Arrays.asList(ElephantContext.getSiteLocales().split(
" *, *")));
◆ getPath()
String org.turro.contacts.profile.EditCProfileControl.getPath |
( |
| ) |
|
◆ onCancel()
void org.turro.contacts.profile.EditCProfileControl.onCancel |
( |
| ) |
|
◆ onEvent()
void org.turro.contacts.profile.EditCProfileControl.onEvent |
( |
UploadEvent |
t | ) |
throws Exception |
Definition at line 104 of file EditCProfileControl.java.
105 FileAttach fileAttach =
new FileAttach(ContactsPU.getObjectPath(contact.
getContact()));
106 File newFile =
new File(ElephantContext.getRealPath(fileAttach.getPublishable() +
"/profile/face.png"));
107 if(!newFile.getParentFile().exists()) {
108 newFile.getParentFile().mkdirs();
110 Media media = t.getMedia();
112 Medias.toFile(media, newFile, Medias.scaling(600));
114 if(newFile.exists()) {
116 face.setContent(
new AImage(newFile.getAbsolutePath()));
117 }
catch (IOException ex) {
118 Logger.getLogger(EditProfileControl.class.getName()).log(Level.SEVERE,
null, ex);
◆ onNewSector()
void org.turro.contacts.profile.EditCProfileControl.onNewSector |
( |
InputEvent |
event | ) |
|
Definition at line 142 of file EditCProfileControl.java.
143 String value =
event.getValue();
144 String entityPath = ContactsPU.getObjectPath(contact.
getContact());
145 if(!Strings.isBlank(value)) {
146 Skill skill =
new Skill();
147 skill.setSkill(value);
148 skill.setEntityPath(entityPath);
149 skill.setType(SkillType.SKILL_SECTOR);
150 Skills.addSkillFor(entityPath, skill);
void addToModel(SkillRoot value)
◆ onNewSpecialty()
void org.turro.contacts.profile.EditCProfileControl.onNewSpecialty |
( |
InputEvent |
event | ) |
|
Definition at line 156 of file EditCProfileControl.java.
157 String value =
event.getValue();
158 String entityPath = ContactsPU.getObjectPath(contact.
getContact());
159 if(!Strings.isBlank(value)) {
160 Skill skill =
new Skill();
161 skill.setSkill(value);
162 skill.setEntityPath(entityPath);
163 skill.setType(SkillType.SKILL_SPECIALTY);
164 Skills.addSkillFor(entityPath, skill);
◆ onSave()
void org.turro.contacts.profile.EditCProfileControl.onSave |
( |
| ) |
|
Definition at line 170 of file EditCProfileControl.java.
174 for(AboutWrapper wrapper : model) {
175 if(wrapper.isNewComment() && !wrapper.isEmpty()) {
176 Comment comment = wrapper.getComment();
177 comment.setContact(c);
178 comment.setModification(
new Date());
179 c.getComments().add(comment);
183 new ContactWrapper(c).save();
184 Application.getApplication().navigateBack();
185 sendNotification((Contact) contact.
getContact());
◆ onSector()
void org.turro.contacts.profile.EditCProfileControl.onSector |
( |
| ) |
|
Definition at line 126 of file EditCProfileControl.java.
127 String entityPath = ContactsPU.getObjectPath(contact.
getContact());
129 .stream().map(s -> s.getFor(entityPath)).collect(Collectors.toSet()),
130 SkillType.SKILL_SECTOR);
Set< SkillRoot > getObjectValues()
◆ onSpecialty()
void org.turro.contacts.profile.EditCProfileControl.onSpecialty |
( |
| ) |
|
Definition at line 134 of file EditCProfileControl.java.
135 String entityPath = ContactsPU.getObjectPath(contact.
getContact());
137 .stream().map(s -> s.getFor(entityPath)).collect(Collectors.toSet()),
138 SkillType.SKILL_SPECIALTY);
◆ onTrade()
void org.turro.contacts.profile.EditCProfileControl.onTrade |
( |
| ) |
|
◆ onWeb()
void org.turro.contacts.profile.EditCProfileControl.onWeb |
( |
| ) |
|
◆ setAboutModel()
void org.turro.contacts.profile.EditCProfileControl.setAboutModel |
( |
| ) |
|
Definition at line 219 of file EditCProfileControl.java.
222 model =
new ArrayList<>();
224 boolean done =
false;
225 for(Comment comment : c.getComments()) {
226 if(comment.getComment().startsWith(
"#cv" + lang)) {
227 AboutWrapper wrapper = new AboutWrapper(lang, chooseLabel(lang), comment);
233 AboutWrapper wrapper =
new AboutWrapper(lang, chooseLabel(lang),
new Comment());
239 Tab tab =
new Tab(a.getLangLabel());
240 tabs.appendChild(tab);
241 Tabpanel tabpanel =
new Tabpanel();
242 tabpanels.appendChild(tabpanel);
243 Textbox about =
new Textbox();
244 about.setMultiline(
true);
246 about.setTabbable(
true);
247 about.setStyle(
"-moz-tab-size:4;-o-tab-size:4;tab-size:4;width:100%;height:100%;");
248 about.setValue(a.getCommentString());
249 about.addEventListener(Events.ON_CHANGE, (Event event) -> {
250 a.setCommentString(about.getValue());
252 tabpanel.appendChild(about);
◆ setPath()
void org.turro.contacts.profile.EditCProfileControl.setPath |
( |
String |
path | ) |
|
The documentation for this class was generated from the following file: