Examples of IPage


Examples of org.apache.tapestry.IPage

    public void service(IRequestCycle cycle) throws IOException
    {
        String pageName = cycle.getParameter(ServiceConstants.PAGE);
        String componentId = cycle.getParameter(ServiceConstants.COMPONENT);

        IPage componentPage = cycle.getPage(pageName);
        IComponent component = componentPage.getNestedComponent(componentId);

        if (!(component instanceof IXTile))
            throw new ApplicationRuntimeException("Incorrect component type: was "
                    + component.getClass() + " but must be " + IXTile.class, component, null, null);
View Full Code Here

Examples of org.apache.tapestry.IPage

     */

    public boolean shouldEncodeState(ServiceEncoding encoding, String pageName,
            PersistentPropertyData data)
    {
        IPage page = _requestCycle.getPage();

        // TAPESTRY-701: if you try to generate a link using, say, page or external service,
        // from inside PageValidateListener.pageValidate(), then there may not be an active
        // page yet. Seems like the right thing to do is hold onto any properties until
        // we know what the active page is.  I know this one is going to cause a fight
        // since its not clear whether keeping or discarding is the right way to go.
       
        if (page == null)
            return true;

        return pageName.equals(page.getPageName());
    }
View Full Code Here

Examples of org.apache.tapestry.IPage

    }

    public void service(IRequestCycle cycle) throws IOException
    {
        String pageName = cycle.getParameter(ServiceConstants.PAGE);
        IPage rawPage = cycle.getPage(pageName);

        IExternalPage page = null;

        try
        {
View Full Code Here

Examples of org.eclipse.ui.part.IPage

    for (IViewReference ref : references) {   
      if (ref.getId().equals(IConsoleConstants.ID_CONSOLE_VIEW)) {
        IWorkbenchPart part = ref.getPart(false);
        if (part != null && part instanceof PageBookView) {
          PageBookView view = (PageBookView) part;
          IPage page = view.getCurrentPage();
          if (page instanceof TextConsolePage) {
            TextConsolePage textConsolePage = (TextConsolePage) page;
            return textConsolePage.getViewer().getTextWidget();
          }
        }
View Full Code Here

Examples of org.eclipse.ui.part.IPage

    boolean isForeignSelection = true;
   
    if (part instanceof ContentOutline) {
      ContentOutline contentOutline = (ContentOutline) part;
     
      IPage currentPage = contentOutline.getCurrentPage();
     
      if (currentPage instanceof OutlinePageBook) {
        OutlinePageBook pageBook = (OutlinePageBook) currentPage;
        isForeignSelection = pageBook.getCasViewPage() != this;
      }
View Full Code Here

Examples of org.eclipse.ui.part.IPage

        // Create the page book.
        book = new PageBook(parent, SWT.NONE);

        // Create the default page rec.
        IPage defaultPage = createDefaultPage(book);
        defaultPageRec = new PageRec<K>(null, defaultPage);
        preparePage(defaultPageRec);

        // Show the default page
        showPageRec(defaultPageRec);
View Full Code Here

Examples of org.eclipse.ui.part.IPage

     * to the current page, if it implements <code>IAdaptable</code>.
     */
    @SuppressWarnings("unchecked")
    public Object getAdapter( Class key ) {
        // delegate to the current page, if supported
        IPage page = getCurrentPage();
        Object adapter = Util.getAdapter(page, key);
        if (adapter != null) {
            return adapter;
        }
        // if the page did not find the adapter, look for one provided by
View Full Code Here

Examples of org.eclipse.ui.part.IPage

        /*
         * (non-Javadoc) Method declared on ISelectionProvider.
         */
        public ISelection getSelection() {
            // get the selection provider from the current page
            IPage currentPage = getCurrentPage();
            // during workbench startup we may be in a state when
            // there is no current page
            if (currentPage == null) {
                return StructuredSelection.EMPTY;
            }
View Full Code Here

Examples of org.eclipse.ui.part.IPage

        /*
         * (non-Javadoc) Method declared on ISelectionProvider.
         */
        public void setSelection( ISelection selection ) {
            // get the selection provider from the current page
            IPage currentPage = getCurrentPage();
            // during workbench startup we may be in a state when
            // there is no current page
            if (currentPage == null) {
                return;
            }
View Full Code Here

Examples of org.eclipse.ui.part.IPage

                editManager.addListener(editListener);
                editSelection = new StructuredSelection(editManager.getEditFeature());
            }
        }
        // pass the selection to the page
        IPage page = getCurrentPage(); // We are expecting a FeaturePanelPage
                                       // here
        if (page != null && page instanceof ISelectionListener) {
            ISelectionListener notifyPage = (ISelectionListener) page;
            notifyPage.selectionChanged(part, editSelection);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.