Examples of LinkBean


Examples of org.htmlparser.beans.LinkBean

            hit[0].booleanValue());
    }

    public void testLinkBeanListener()
    {
        final LinkBean lb;
        final Boolean hit[] = new Boolean[1];

        lb = new LinkBean();
        hit[0] = Boolean.FALSE;
        lb.addPropertyChangeListener(new PropertyChangeListener()
        {
            public void propertyChange(PropertyChangeEvent event)
            {
                if (event.getSource().equals(lb))
                    if (event
                        .getPropertyName()
                        .equals(LinkBean.PROP_LINKS_PROPERTY))
                        hit[0] = Boolean.TRUE;
            }
        });

        hit[0] = Boolean.FALSE;
        lb.setURL("http://htmlparser.sourceforge.net/test/example.html");
        assertTrue(
            "Links property change not fired for URL change",
            hit[0].booleanValue());
    }
View Full Code Here

Examples of org.htmlparser.beans.LinkBean

        throws
            IOException,
            ClassNotFoundException,
            ParserException
    {
        LinkBean lb;
        URL[] links;
        byte[] data;
        URL[] links2;

        lb = new LinkBean ();
        lb.setURL ("http://htmlparser.sourceforge.net/test/example.html");
        links = lb.getLinks ();

        data = pickle (lb);
        lb = (LinkBean)unpickle (data);

        links2 = lb.getLinks ();
        assertEquals ("Number of links after serialization differs", links.length, links2.length);
        for (int i = 0; i < links.length; i++)
        {
            assertEquals (
                "Links before and after serialization differ",
View Full Code Here

Examples of org.htmlparser.beans.LinkBean

            hit[0].booleanValue ());
    }

    public void testLinkBeanListener ()
    {
        final LinkBean lb;
        final Boolean hit[] = new Boolean[1];

        lb = new LinkBean ();
        hit[0] = Boolean.FALSE;
        lb.addPropertyChangeListener (
            new PropertyChangeListener ()
            {
                public void propertyChange (PropertyChangeEvent event)
                {
                    if (event.getSource ().equals (lb))
                        if (event.getPropertyName ().equals (LinkBean.PROP_LINKS_PROPERTY))
                            hit[0] = Boolean.TRUE;
                }
            });

        hit[0] = Boolean.FALSE;
        lb.setURL ("http://htmlparser.sourceforge.net/test/example.html");
        assertTrue (
            "Links property change not fired for URL change",
            hit[0].booleanValue ());
    }
View Full Code Here

Examples of org.htmlparser.beans.LinkBean

    assertEquals("Strings before and after serialization differ", text, sb.getStrings());
  }

  public void testSerializableLinkBean() throws IOException, ClassNotFoundException, ParserException {
    LinkBean lb;
    URL[] links;
    byte[] data;
    URL[] links2;

    lb = new LinkBean();
    lb.setURL("http://htmlparser.sourceforge.net/test/example.html");
    links = lb.getLinks();

    data = pickle(lb);
    lb = (LinkBean) unpickle(data);

    links2 = lb.getLinks();
    assertEquals("Number of links after serialization differs", links.length, links2.length);
    for (int i = 0; i < links.length; i++) {
      assertEquals("Links before and after serialization differ", links[i], links2[i]);
    }
  }
View Full Code Here

Examples of org.htmlparser.beans.LinkBean

    sb.setLinks(true);
    assertTrue("Strings property change not fired for links change", hit[0].booleanValue());
  }

  public void testLinkBeanListener() {
    final LinkBean lb;
    final Boolean hit[] = new Boolean[1];

    lb = new LinkBean();
    hit[0] = Boolean.FALSE;
    lb.addPropertyChangeListener(new PropertyChangeListener() {
      public void propertyChange(PropertyChangeEvent event) {
        if (event.getSource().equals(lb))
          if (event.getPropertyName().equals(LinkBean.PROP_LINKS_PROPERTY))
            hit[0] = Boolean.TRUE;
      }
    });

    hit[0] = Boolean.FALSE;
    lb.setURL("http://htmlparser.sourceforge.net/test/example.html");
    assertTrue("Links property change not fired for URL change", hit[0].booleanValue());
  }
View Full Code Here

Examples of org.infoglue.cms.applications.databeans.LinkBean

      }
    }

    String disableCloseLink = getActionExtraData(userSessionKey, "disableCloseLink");
    if(disableCloseLink == null || !disableCloseLink.equals("true"))
      actionLinks.add(new LinkBean("closeDialog", getLocalizedString(getLocale(), "tool.common.closeDialogLinkText"), getLocalizedString(getLocale(), "tool.common.closeDialogLinkTitle"), getLocalizedString(getLocale(), "tool.common.closeDialogLinkTitle"), "javascript:closeDialog();", true, ""));

    //-----------------------------------------------------------
    // Add any actionLinks submitted in the request
    //-----------------------------------------------------------
   
    if (actionLinkString != null)
    {     
      elements = actionLinkString.split(";");
     
      String attr1 = "";
      String attr2 = "";
      String attr3 = "";
      String attr4 = "";
      String attr5 = "";
      String attr6 = "";
     
        for (String element : elements)
        {         
          values               = element.split(",");
         
          if (values.length > 0) attr1   = values[0];
          if (values.length > 1) attr2  = values[1];
          if (values.length > 2) attr3  = values[2];
          if (values.length > 3) attr4  = values[3];
          if (values.length > 4) attr5  = values[4];
          if (values.length > 5) attr6  = values[5];
         
          boolean isJavascriptLink = false;
          if(attr5.indexOf("javascript:") > -1)
            isJavascriptLink = true;
         
          LinkBean myLinkBean       = new LinkBean(attr1, attr2, attr3, attr4, attr5, isJavascriptLink, attr6);
          actionLinks.add(myLinkBean);
        }
    }
   
    return SUCCESS;
View Full Code Here

Examples of org.infoglue.cms.applications.databeans.LinkBean

        String deleteContentInlineOperationViewDeletedContentParentTitleText = getLocalizedString(getLocale(), "tool.contenttool.deleteContentInlineOperationViewDeletedContentParentTitleText");
     
          setActionMessage(userSessionKey, deleteContentInlineOperationDoneHeader);
                                                           
          logger.debug("originalAddress:" + originalAddress);
          addActionLink(userSessionKey, new LinkBean("parentContentUrl", deleteContentInlineOperationViewDeletedContentParentLinkText, deleteContentInlineOperationViewDeletedContentParentTitleText, deleteContentInlineOperationViewDeletedContentParentTitleText, this.originalAddress, false, "", "", "content"));
            setActionExtraData(userSessionKey, "refreshToolbarAndMenu", "" + true);
            setActionExtraData(userSessionKey, "repositoryId", "" + this.contentVO.getRepositoryId());
            setActionExtraData(userSessionKey, "contentId", "" + this.contentVO.getId());
            setActionExtraData(userSessionKey, "unrefreshedContentId", "" + parentContentId);
            setActionExtraData(userSessionKey, "unrefreshedNodeId", "" + parentContentId);
View Full Code Here

Examples of org.infoglue.cms.applications.databeans.LinkBean

  {
    doInput();

        userSessionKey = "" + System.currentTimeMillis();
       
        addActionLink(userSessionKey, new LinkBean("currentPageUrl", getLocalizedString(getLocale(), "tool.common.publishing.publishingInlineOperationBackToCurrentPageLinkText"), getLocalizedString(getLocale(), "tool.common.publishing.publishingInlineOperationBackToCurrentPageTitleText"), getLocalizedString(getLocale(), "tool.common.publishing.publishingInlineOperationBackToCurrentPageTitleText"), this.originalAddress, false, ""));

        setActionExtraData(userSessionKey, "repositoryId", "" + this.repositoryId);
        setActionExtraData(userSessionKey, "contentId", "" + this.contentId);
        setActionExtraData(userSessionKey, "unrefreshedContentId", "" + this.contentId);
        setActionExtraData(userSessionKey, "unrefreshedNodeId", "" + this.contentId);
View Full Code Here

Examples of org.infoglue.cms.applications.databeans.LinkBean

    {
      doInputChooseContents();
     
          userSessionKey = "" + System.currentTimeMillis();
         
          addActionLink(userSessionKey, new LinkBean("currentPageUrl", getLocalizedString(getLocale(), "tool.common.publishing.publishingInlineOperationBackToCurrentPageLinkText"), getLocalizedString(getLocale(), "tool.common.publishing.publishingInlineOperationBackToCurrentPageTitleText"), getLocalizedString(getLocale(), "tool.common.publishing.publishingInlineOperationBackToCurrentPageTitleText"), this.originalAddress, false, ""));

          setActionExtraData(userSessionKey, "repositoryId", "" + this.repositoryId);
          setActionExtraData(userSessionKey, "contentId", "" + this.contentId);
          setActionExtraData(userSessionKey, "unrefreshedContentId", "" + this.contentId);
          setActionExtraData(userSessionKey, "unrefreshedNodeId", "" + this.contentId);
View Full Code Here

Examples of org.infoglue.cms.applications.databeans.LinkBean

    String createContentInlineOperationDoneHeader = getLocalizedString(getLocale(), "tool.contenttool.createContentInlineOperationDoneHeader", parentContentVO.getName());
    String createContentInlineOperationBackToCurrentContentLinkText = getLocalizedString(getLocale(), "tool.contenttool.createContentInlineOperationBackToCurrentContentText");
    String createContentInlineOperationBackToCurrentContentTitleText = getLocalizedString(getLocale(), "tool.contenttool.createContentInlineOperationBackToCurrentContentTitleText");

      setActionMessage(userSessionKey, createContentInlineOperationDoneHeader);
      addActionLink(userSessionKey, new LinkBean("currentContentUrl", createContentInlineOperationBackToCurrentContentLinkText, createContentInlineOperationBackToCurrentContentTitleText, createContentInlineOperationBackToCurrentContentTitleText, this.originalAddress, false, ""));

    ceb.throwIfNotEmpty();
   
    return "inputV3";
    }
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.