Blame view

samples/dock-sample/src/main/webapp/dock.xhtml 3.65 KB
bernard authored
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich"
      xmlns:dock="http://richfaces.org/sandbox/dock"
      xmlns:notify="http://richfaces.org/sandbox/notify"
        >
<head>
    <title>Dock sample</title>
    <style type="text/css">
        .rf-dk .jqDockLabelText {
            font-size: 16px;
        }

        .bottom {
            position: fixed;
            bottom: 0;
            width:100%;
        }
        .bottom .jqDockWrap {
            margin: 0 auto;
        }

    </style>
</head>
<body class="rich-container">
<ui:include src="menu.xhtml"/>
<notify:notifyMessages ajaxRendered="true" showDetail="true"/>

<p>
    Here we have notify displaying all messages (not only global).
    Severity is reflected in overriden style classes.
</p>
<h:form>

    <dock:dock>
        <h:outputLink title="Output link">
            <h:graphicImage value="images/next.png"/>
        </h:outputLink>

        <h:commandLink title="Command link" action="#{greeter.sayHello}">
            <h:graphicImage value="images/pause.png"/>
        </h:commandLink>

        <h:graphicImage value="images/play.png" title="Image without link but with a4j:support">
            <a4j:support event="onclick" action="#{greeter.sayHelloAjax}" ajaxSingle="true"/>
        </h:graphicImage>

        <h:outputLink title="Link defined on link">
            <h:graphicImage value="images/previous.png"/>
        </h:outputLink>

        <a title="Regular link with regular image" onclick="alert('I\'m so static')">
            <img src="images/stop.png" alt=""/>
        </a>
    </dock:dock>

    <dock:dock align="bottom" labels="tc" styleClass="bottom">
        <h:outputLink title="Output link">
            <h:graphicImage value="images/next.png"/>
        </h:outputLink>

        <h:commandLink title="Command link" action="#{greeter.sayHello}">
            <h:graphicImage value="images/pause.png"/>
        </h:commandLink>

        <h:graphicImage value="images/play.png" title="Image without link but with a4j:support">
            <a4j:support event="onclick" action="#{greeter.sayHelloAjax}" ajaxSingle="true"/>
        </h:graphicImage>

        <h:outputLink title="Link defined on link">
            <h:graphicImage value="images/previous.png"/>
        </h:outputLink>

        <a title="Regular link with regular image" onclick="alert('I\'m so static')">
            <img src="images/stop.png" alt=""/>
        </a>
    </dock:dock>

    <dock:dock align="left" labels="mr" style="position:absolute;left:0;">
        <h:outputLink title="Output link">
            <h:graphicImage value="images/next.png"/>
        </h:outputLink>

        <h:commandLink title="Command link" action="#{greeter.sayHello}">
            <h:graphicImage value="images/pause.png"/>
        </h:commandLink>

        <h:graphicImage value="images/play.png" title="Image without link but with a4j:support">
            <a4j:support event="onclick" action="#{greeter.sayHelloAjax}" ajaxSingle="true"/>
        </h:graphicImage>

        <h:outputLink title="Link defined on link">
            <h:graphicImage value="images/previous.png"/>
        </h:outputLink>

        <a title="Regular link with regular image" onclick="alert('I\'m so static')">
            <img src="images/stop.png" alt=""/>
        </a>
    </dock:dock>

</h:form>

<rich:insert src="/dock.xhtml" highlight="xhtml"/>

</body>
</html>