org.exoplatform.social.webui.profile
Class UIExperienceSection

java.lang.Object
  extended by org.exoplatform.webui.core.UIComponent
      extended by org.exoplatform.webui.core.UIContainer
          extended by org.exoplatform.webui.form.UIForm
              extended by org.exoplatform.social.webui.profile.UIProfileSection
                  extended by org.exoplatform.social.webui.profile.UIExperienceSection

public class UIExperienceSection
extends UIProfileSection

Component manages all experience informations (ex: company, position, professional...) of profile user. This is one part of profile management beside contact, basic information.


Nested Class Summary
static class UIExperienceSection.AddActionListener
          Adds component when Add button is clicked.
static class UIExperienceSection.EditActionListener
          Changes to edit mode when Edit button is clicked.
static class UIExperienceSection.RemoveActionListener
          Adds component when Add button is clicked.
static class UIExperienceSection.SaveActionListener
          Saves experience informations to profile.
static class UIExperienceSection.ShowHideEndDateActionListener
          Shows and hides end date component depending on isCurrent variable.
 
Nested classes/interfaces inherited from class org.exoplatform.social.webui.profile.UIProfileSection
UIProfileSection.CancelActionListener
 
Nested classes/interfaces inherited from class org.exoplatform.webui.core.UIContainer
org.exoplatform.webui.core.UIContainer.SelectTabActionListener
 
Field Summary
static String DATE_FORMAT_MMDDYYYY
          DATE FORMAT.
static String END_DATE_AFTER_TODAY
          END DATE AFTER TODAY.
static String START_DATE_AFTER_TODAY
          START DATE AFTER TODAY.
static String STARTDATE_BEFORE_ENDDATE
          START DATE BEFORE END DATE.
 
Fields inherited from class org.exoplatform.webui.form.UIForm
ACTION, SUBCOMPONENT_ID
 
Fields inherited from class org.exoplatform.webui.core.UIComponent
AJAX_ASYNC, config, OBJECTID, UICOMPONENT, uiparent
 
Constructor Summary
UIExperienceSection()
          Constructor.
 
Method Summary
protected  String calendarToString(Calendar cal)
          Convert calendar to string.
protected  String displayDateTime(Object d)
          Display date time.
 List<org.exoplatform.webui.core.UIComponent> getChilds()
          Gets all the children.
 List<HashMap<String,Object>> getCurrentExperience()
          Gets all the current experience.
 int getDate(String inDate)
          Gets date of date time.
 int getExpCount()
          Gets number of component.
 int getMonth(String inDate)
          Gets month of date time.
 List<HashMap<String,Object>> getPastExperience()
          Gets all the past experience.
 int getYear(String inDate)
          Gets year of date time.
protected  Calendar stringToCalendar(String sDate)
          Convert string to calendar.
 
Methods inherited from class org.exoplatform.social.webui.profile.UIProfileSection
escapeHtml, getProfile, getViewUser, isEditable, isEditMode, isFirstLoad, setEditMode, setFirstLoad
 
Methods inherited from class org.exoplatform.webui.form.UIForm
addUIComponentInput, addUIFormInput, addUIFormInput, begin, end, event, event, event, getActions, getLabel, getLabel, getSubmitAction, getUICheckBoxInput, getUIComponentName, getUIFormCheckBoxInput, getUIFormDateTimeInput, getUIFormInputInfo, getUIFormSelectBox, getUIFormTextAreaInput, getUIInput, getUIStringInput, invokeGetBindingBean, invokeSetBindingBean, isMultipart, processRender, renderField, renderField, reset, setActions, setMultiPart, setSubmitAction, url
 
Methods inherited from class org.exoplatform.webui.core.UIContainer
addChild, addChild, findComponentById, findComponentOfType, findFirstComponentOfType, getChild, getChild, getChildById, getChildren, hasChildren, removeChild, removeChildById, renderChild, renderChild, renderChild, renderChild, renderChildren, renderChildren, renderUIComponent, replaceChild, replaceChild, setChildren, setRenderedChild, setRenderedChild, setRenderedChildrenOfTypes
 
Methods inherited from class org.exoplatform.webui.core.UIComponent
broadcast, createEvent, createUIComponent, createUIComponent, createUIComponent, doAsync, event, getAncestorOfType, getApplicationComponent, getComponentConfig, getId, getName, getParent, getTemplate, getTemplateResourceResolver, isRendered, loadConfirmMesssage, processAction, processDecode, renderEventURL, setComponentConfig, setComponentConfig, setId, setParent, setRendered, setRenderSibling, url, url
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

START_DATE_AFTER_TODAY

public static final String START_DATE_AFTER_TODAY
START DATE AFTER TODAY.

See Also:
Constant Field Values

END_DATE_AFTER_TODAY

public static final String END_DATE_AFTER_TODAY
END DATE AFTER TODAY.

See Also:
Constant Field Values

STARTDATE_BEFORE_ENDDATE

public static final String STARTDATE_BEFORE_ENDDATE
START DATE BEFORE END DATE.

See Also:
Constant Field Values

DATE_FORMAT_MMDDYYYY

public static final String DATE_FORMAT_MMDDYYYY
DATE FORMAT.

See Also:
Constant Field Values
Constructor Detail

UIExperienceSection

public UIExperienceSection()
                    throws Exception
Constructor.

Throws:
Exception
Method Detail

getExpCount

public int getExpCount()
Gets number of component.

Returns:
Number of components.

getChilds

public List<org.exoplatform.webui.core.UIComponent> getChilds()
Gets all the children.


getMonth

public int getMonth(String inDate)
             throws ParseException
Gets month of date time.

Parameters:
inDate - Input date
Returns:
Month of input date.
Throws:
ParseException

getDate

public int getDate(String inDate)
            throws ParseException
Gets date of date time.

Parameters:
inDate - Input date
Returns:
Date of input date.
Throws:
ParseException

calendarToString

protected String calendarToString(Calendar cal)
Convert calendar to string.

Parameters:
cal -
Returns:
Since:
1.2.5

stringToCalendar

protected Calendar stringToCalendar(String sDate)
Convert string to calendar.

Parameters:
sDate -
Returns:
Since:
1.2.5

displayDateTime

protected String displayDateTime(Object d)
                          throws ParseException
Display date time.

Parameters:
d -
Returns:
Throws:
ParseException
Since:
1.2.5

getYear

public int getYear(String inDate)
            throws ParseException
Gets year of date time.

Parameters:
inDate - Input date
Returns:
Year of input date.
Throws:
ParseException

getPastExperience

public List<HashMap<String,Object>> getPastExperience()
                                               throws Exception
Gets all the past experience.

Returns:
all the experience that has isCurrent is false.
Throws:
Exception

getCurrentExperience

public List<HashMap<String,Object>> getCurrentExperience()
                                                  throws Exception
Gets all the current experience.

Returns:
all the experience that has isCurrent is true.
Throws:
Exception


Copyright © 2013 eXo Platform SAS. All Rights Reserved.