/** * Adds a widget to the primary content container of this page. * * @param widget the widget to add to the primary content */ @Override public void add(Widget widget) { if (widget instanceof HasJqmHeader) { setHeader((HasJqmHeader) widget); return; } else if (widget instanceof HasJqmFooter) { setFooter((HasJqmFooter) widget); return; } else if (widget instanceof JQMContent) { throw new RuntimeException("Do not add content widgets here, call createContent() instead"); } getPrimaryContent().add(widget); // if page is already enhanced then we need to enhance the content manually // if (enhanced) triggerCreate(); }
/** * Adds a widget to the primary content container of this page. * * @param widget the widget to add to the primary content */ @Override public void add(Widget widget) { if (widget instanceof HasJqmHeader) { setHeader((HasJqmHeader) widget); return; } else if (widget instanceof HasJqmFooter) { setFooter((HasJqmFooter) widget); return; } else if (widget instanceof JQMContent) { throw new RuntimeException("Do not add content widgets here, call createContent() instead"); } getPrimaryContent().add(widget); // if page is already enhanced then we need to enhance the content manually // if (enhanced) triggerCreate(); }
/** * Adds a widget to the primary content container of this page. * * @param widget the widget to add to the primary content */ @Override public void add(Widget widget) { if (widget instanceof HasJqmHeader) { setHeader((HasJqmHeader) widget); return; } else if (widget instanceof HasJqmFooter) { setFooter((HasJqmFooter) widget); return; } else if (widget instanceof JQMContent) { throw new RuntimeException("Do not add content widgets here, call createContent() instead"); } getPrimaryContent().add(widget); // if page is already enhanced then we need to enhance the content manually // if (enhanced) triggerCreate(); }