Override preparePaintComponent in order to set up the example data the first time that the example is accessed by
each user.

@param request the request being responded to.
194979
@Override
	protected void preparePaintComponent(final Request request) {
		super.preparePaintComponent(request);
		if (!isInitialised()) {
			table.setTableModel(createTableModel());
			setInitialised(true);
		}
	}
248265
@Override
	public void preparePaintComponent(final Request request) {
		String dateStr = "The current date is " + new Date();
		dynamicText.setText(dateStr);
	}
1127155
protected void initThreadLocalJawrContext(HttpServletRequest request) {
		ThreadLocalJawrContext.setJawrConfigMgrObjectName(JmxUtils.getJawrConfigMBeanObjectName(
				request.getContextPath(), resourceType, jawrConfig.getProperty(JawrConstant.JAWR_JMX_MBEAN_PREFIX)));

		ThreadLocalJawrContext.setRequest(request.getRequestURL().toString());

		RendererRequestUtils.setRequestDebuggable(request, jawrConfig);
	}
1025153
@Override
	protected void preparePaintComponent(final Request request) {
		super.preparePaintComponent(request);
		if (!isInitialised()) {
			// Needs to be set per user as the model holds the current page index and total row per user.
			ExampleScrollableModel model = new ExampleScrollableModel(table,
					new String[]{"firstName", "lastName",
						"dateOfBirth"}, "more");
			model.setIterateFirstLevel(true);
			table.setTableModel(model);
			setInitialised(true);
		}
	}
60996
@Override
	protected void preparePaintComponent(final Request request) {
		super.preparePaintComponent(request);
		if (!isInitialised()) {
			setInitialised(true);
			setTreeModel(new MenuTreeModel(data));
		}
	}
541601
@Override
	public void preparePaint(final Request request) {
		if (windowId == null) {
			super.preparePaint(request);
		} else {
			// Get the window component
			ComponentWithContext target = WebUtilities.getComponentById(windowId, true);
			if (target == null) {
				throw new SystemException("No window component for id " + windowId);
			}

			UIContext uic = UIContextHolder.getCurrentPrimaryUIContext();
			Environment originalEnvironment = uic.getEnvironment();
			uic.setEnvironment(new EnvironmentDelegate(originalEnvironment, windowId, target));

			UIContextHolder.pushContext(target.getContext());
			try {
				super.preparePaint(request);
			} finally {
				uic.setEnvironment(originalEnvironment);
				UIContextHolder.popContext();
			}
		}
	}
783558
@Override
	public void preparePaint(final Request request) {
		// Headers
		// The WHeaders comes from the root WComponent and is a
		// mechanism for WComponents to add their own headers
		// (eg more JavaScript references).

		Headers headers = this.getUI().getHeaders();
		headers.reset();

		super.preparePaint(request);
	}
309634
@Override
	protected void preparePaintComponent(final Request request) {
		super.preparePaintComponent(request); //To change body of generated methods, choose Tools | Templates.
		if (!isInitialised()) {
			setInitialised(true);
			setupVideo();
		}
	}
255901
@Override
	protected void preparePaintComponent(final Request request) {
		super.preparePaintComponent(request);
		UIContext uic = UIContextHolder.getCurrent();

		// If the link has an action, register it for AJAX
		final Action action = getAction();
		final AjaxTarget[] actionTargets = getActionTargets();

		if (action != null && uic.getUI() != null) {
			// Register AJAX operation if AJAX targets are set, otherwise rely on InternalAjax request
			if (actionTargets != null && actionTargets.length > 0) {
				List<String> targetIds = new ArrayList<>();
				for (AjaxTarget target : actionTargets) {
					targetIds.add(target.getId());
				}
				// Register the action targets
				AjaxHelper.registerComponents(targetIds, getId());
			}
		}
	}
648934
private void addPostParams(final Request request) {
        if (dateExpiry != null) {
            request.addPostParam("DateExpiry", dateExpiry.toString());
        }

        if (ttl != null) {
            request.addPostParam("Ttl", ttl.toString());
        }

        if (mode != null) {
            request.addPostParam("Mode", mode.toString());
        }

        if (status != null) {
            request.addPostParam("Status", status.toString());
        }

        if (participants != null) {
            for (Map<String, Object> prop : participants) {
                request.addPostParam("Participants", Converter.mapToJson(prop));
            }
        }
    }
348178
@Override
	public void preparePaint(final Request request) {
		UIContext uic = UIContextHolder.getCurrent();
		Headers headers = uic.getUI().getHeaders();
		headers.reset();
		headers.setContentType(WebUtilities.CONTENT_TYPE_XML);

		super.preparePaint(request);
	}
1201255
@Override
	protected void preparePaintComponent(final Request request) {
		super.preparePaintComponent(request);

		UIContext uic = UIContextHolder.getCurrent();

		if (isAjax() && uic.getUI() != null) {
			AjaxTarget target = getAjaxTarget();
			AjaxHelper.registerComponent(target.getId(), getId());
		}
	}
1153101
@Override
	public void preparePaintComponent(final Request request) {
		if (!isInitialised()) {
			List<SimpleTableBean> items = new ArrayList<>();
			items.add(new SimpleTableBean("A", "none", "thing"));
			items.add(new SimpleTableBean("B", "some", "thing2"));
			items.add(new SimpleTableBean("C", "little", "thing3"));
			items.add(new SimpleTableBean("D", "lots", "thing4"));

			for (WList list : lists) {
				list.setData(items);
			}

			setInitialised(true);
		}
	}
946345
@Override
	public void preparePaint(final Request request) {
		Headers headers = this.getUI().getHeaders();
		headers.reset();

		headers.setContentType(WebUtilities.CONTENT_TYPE_XML);

		super.preparePaint(request);
	}
707489
@Override
	protected void preparePaintComponent(final Request request) {
		super.preparePaintComponent(request);

		if (!isInitialised()) {
			// Check project versions for Wcomponents-examples and WComponents match
			String egVersion = Config.getInstance().getString("wcomponents-examples.version");
			String wcVersion = WebUtilities.getProjectVersion();

			if (egVersion != null && !egVersion.equals(wcVersion)) {
				String msg = "WComponents-Examples version (" + egVersion + ") does not match WComponents version ("
						+ wcVersion + ").";

				LOG.error(msg);

				messages.addMessage(new Message(Message.ERROR_MESSAGE, msg));
			}
			setInitialised(true);
		}

	}
534394
private void addPostParams(final Request request) {
        if (initiationActions != null) {
            request.addPostParam("InitiationActions", Converter.mapToJson(initiationActions));
        }
    }
142302
@Override
	protected void preparePaintComponent(final Request request) {
		super.preparePaintComponent(request);
		if (!isInitialised()) {
			// This model holds the data so would be included on the user session.
			ExampleExpandableModel data = new ExampleExpandableModel(ExampleDataUtil.
					createExampleData(),
					TravelDocPanel.class);
			table.setTableModel(data);
			setInitialised(true);
		}
	}