/** * Sets the containerId so it can be referenced by name. This can only be set once. All subsequent attempts on this * instance will result in an IllegalStateException. * @param containerId */ @Override public void setContainerId(String containerId) { if (getId() == null) { super.setContainerId(containerId); JQMContext.attachAndEnhance(this); } else if (! containerId.equals(getId())) { throw new IllegalStateException("Attempt to change JQMPage with containerId '" + getId() + "' to '" + containerId + "' failed - once set, it cannot be changed."); } }
/** * Adds a new {@link JQMListItem} that contains the given @param text as the heading element. * <br> * The list item is made linkable to the given page * * @param text the text to use as the content of the header element * @param page the page to make the list item link to */ public JQMListItem addItem(String text, JQMPage page) { return addItem(text, "#" + page.getId()); }
/** * Sets the containerId so it can be referenced by name. This can only be set once. All subsequent attempts on this * instance will result in an IllegalStateException. * @param containerId */ @Override public void setContainerId(String containerId) { if (getId() == null) { super.setContainerId(containerId); JQMContext.attachAndEnhance(this); } else if (! containerId.equals(getId())) { throw new IllegalStateException("Attempt to change JQMPage with containerId '" + getId() + "' to '" + containerId + "' failed - once set, it cannot be changed."); } }
/** * Adds a new {@link JQMListItem} that contains the given @param text as the heading element. * <br> * The list item is made linkable to the given page * * @param text the text to use as the content of the header element * @param page the page to make the list item link to */ public JQMListItem addItem(String text, JQMPage page) { return addItem(text, "#" + page.getId()); }
/** * Sets the containerId so it can be referenced by name. This can only be set once. All subsequent attempts on this * instance will result in an IllegalStateException. * @param containerId */ @Override public void setContainerId(String containerId) { if (getId() == null) { super.setContainerId(containerId); JQMContext.attachAndEnhance(this); } else if (! containerId.equals(getId())) { throw new IllegalStateException("Attempt to change JQMPage with containerId '" + getId() + "' to '" + containerId + "' failed - once set, it cannot be changed."); } }
/** * Adds a new {@link JQMListItem} that contains the given @param text as the heading element. * <br> * The list item is made linkable to the given page * * @param text the text to use as the content of the header element * @param page the page to make the list item link to */ public JQMListItem addItem(String text, JQMPage page) { return addItem(text, "#" + page.getId()); }
/** * Creates a new {@link JQMButton} with the given text and linking to the * given {@link JQMPage} and with the given icon and then sets that button * in the right slot. Any existing right button will be replaced. * * @param text * the text for the button * @param page * the optional page for the button to link to, if null then * this button does not navigate by default * @param icon * the icon to use or null if no icon is required * * @return the created button */ public JQMButton setRightButton(String text, JQMPage page, DataIcon icon) { return setRightButton(text, "#" + page.getId(), icon); }
/** * Creates a new {@link JQMButton} with the given text and linking to the * given {@link JQMPage} and with the given icon and then sets that button * in the right slot. Any existing right button will be replaced. * * @param text * the text for the button * @param page * the optional page for the button to link to, if null then * this button does not navigate by default * @param icon * the icon to use or null if no icon is required * * @return the created button */ public JQMButton setRightButton(String text, JQMPage page, DataIcon icon) { return setRightButton(text, "#" + page.getId(), icon); }
/** * Creates a new {@link JQMButton} with the given text and linking to the * given {@link JQMPage} and with the given icon and then sets that button * in the right slot. Any existing right button will be replaced. * * @param text * the text for the button * @param page * the optional page for the button to link to, if null then * this button does not navigate by default * @param icon * the icon to use or null if no icon is required * * @return the created button */ public JQMButton setRightButton(String text, JQMPage page, DataIcon icon) { return setRightButton(text, "#" + page.getId(), icon); }
/** * Creates a new {@link JQMButton} with the given text and linking to the * given {@link JQMPage} and with the given icon and then sets that button * in the left slot. Any existing right button will be replaced. * * @param text * the text for the button * @param page * the optional page for the button to link to, if null then * this button does not navigate by default * @param icon * the icon to use or null if no icon is required * * @return the created button */ public JQMButton setLeftButton(String text, JQMPage page, DataIcon icon) { if (page == null) throw new RuntimeException("page cannot be null"); return setLeftButton(text, "#" + page.getId(), icon); }
/** * Creates a new {@link JQMButton} with the given text and linking to the * given {@link JQMPage} and with the given icon and then sets that button * in the left slot. Any existing right button will be replaced. * * @param text * the text for the button * @param page * the optional page for the button to link to, if null then * this button does not navigate by default * @param icon * the icon to use or null if no icon is required * * @return the created button */ public JQMButton setLeftButton(String text, JQMPage page, DataIcon icon) { if (page == null) throw new RuntimeException("page cannot be null"); return setLeftButton(text, "#" + page.getId(), icon); }
@Override protected void onLoad() { super.onLoad(); Widget parent = getParent(); if (parent instanceof JQMPage) bindLifecycleEvents(this, ((JQMPage) parent).getId()); }
@Override protected void onLoad() { super.onLoad(); Widget parent = getParent(); if (parent instanceof JQMPage) bindLifecycleEvents(this, ((JQMPage) parent).getId()); }
@Override protected void onUnload() { Widget parent = getParent(); if (parent instanceof JQMPage) unbindLifecycleEvents(((JQMPage) parent).getId()); super.onUnload(); }
@Override protected void onLoad() { super.onLoad(); Widget parent = getParent(); if (parent instanceof JQMPage) bindLifecycleEvents(this, ((JQMPage) parent).getId()); }
@Override protected void onUnload() { Widget parent = getParent(); if (parent instanceof JQMPage) unbindLifecycleEvents(((JQMPage) parent).getId()); super.onUnload(); }
@Override protected void onUnload() { Widget parent = getParent(); if (parent instanceof JQMPage) unbindLifecycleEvents(((JQMPage) parent).getId()); super.onUnload(); }