Search in sources :

Example 11 with PriorityHeaderItem

use of org.apache.wicket.markup.head.PriorityHeaderItem in project openmeetings by apache.

the class UserMultiChoice method renderHead.

@Override
public void renderHead(IHeaderResponse response) {
    super.renderHead(response);
    response.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(new JavaScriptResourceReference(getClass(), "user-multi-choice.js"), "user-multi-choice")));
}
Also used : PriorityHeaderItem(org.apache.wicket.markup.head.PriorityHeaderItem) JavaScriptResourceReference(org.apache.wicket.request.resource.JavaScriptResourceReference)

Example 12 with PriorityHeaderItem

use of org.apache.wicket.markup.head.PriorityHeaderItem in project webanno by webanno.

the class LogoutPanel method renderHead.

@Override
public void renderHead(IHeaderResponse aResponse) {
    super.renderHead(aResponse);
    aResponse.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(getApplication().getJavaScriptLibrarySettings().getJQueryReference())));
    // We use calls from this library to show the logout timer
    aResponse.render(new PriorityHeaderItem(JavaScriptHeaderItem.forReference(WicketAjaxJQueryResourceReference.get())));
    int timeout = getAutoLogoutTime();
    if (timeout > 0) {
        aResponse.render(JavaScriptHeaderItem.forScript("$(document).ready(function() { new LogoutTimer(" + timeout + "); });", "webAnnoAutoLogout"));
    }
}
Also used : PriorityHeaderItem(org.apache.wicket.markup.head.PriorityHeaderItem)

Example 13 with PriorityHeaderItem

use of org.apache.wicket.markup.head.PriorityHeaderItem in project syncope by apache.

the class BasePage method renderHead.

@Override
public void renderHead(final IHeaderResponse response) {
    super.renderHead(response);
    response.render(new PriorityHeaderItem(META_IE_EDGE));
}
Also used : PriorityHeaderItem(org.apache.wicket.markup.head.PriorityHeaderItem)

Example 14 with PriorityHeaderItem

use of org.apache.wicket.markup.head.PriorityHeaderItem in project wicket by apache.

the class ResourceAggregatorTest method testTwoBundlesWithDependenciesAndPriority.

/**
 * bundle {a, b->a} and {c->a, d->c->a}, render [priority(b), d], should render [priority(ab),
 * cd]
 */
@Test
public void testTwoBundlesWithDependenciesAndPriority() {
    HeaderItem bundleAB = Application.get().getResourceBundles().addJavaScriptBundle(Application.class, "ab.js", new ResourceReferenceA(), new ResourceReferenceB());
    HeaderItem bundleCD = Application.get().getResourceBundles().addJavaScriptBundle(Application.class, "cd.js", new ResourceReferenceC(), new ResourceReferenceD());
    aggregator.render(new PriorityHeaderItem(forReference(new ResourceReferenceB())));
    aggregator.render(forReference(new ResourceReferenceD()));
    assertItems(new PriorityHeaderItem(bundleAB), bundleCD);
}
Also used : PriorityHeaderItem(org.apache.wicket.markup.head.PriorityHeaderItem) HeaderItem(org.apache.wicket.markup.head.HeaderItem) PriorityHeaderItem(org.apache.wicket.markup.head.PriorityHeaderItem) Test(org.junit.Test)

Example 15 with PriorityHeaderItem

use of org.apache.wicket.markup.head.PriorityHeaderItem in project wicket by apache.

the class AbstractPage method renderHead.

@Override
public void renderHead(IHeaderResponse response) {
    response.render(StringHeaderItem.forString("<title>HeaderContributionInAbstractPage</title>\n"));
    response.render(new PriorityHeaderItem(StringHeaderItem.forString("<title>PriorityHeaderContributionInAbstractPage</title>\n")));
}
Also used : PriorityHeaderItem(org.apache.wicket.markup.head.PriorityHeaderItem)

Aggregations

PriorityHeaderItem (org.apache.wicket.markup.head.PriorityHeaderItem)22 JavaScriptResourceReference (org.apache.wicket.request.resource.JavaScriptResourceReference)6 HeaderItem (org.apache.wicket.markup.head.HeaderItem)2 Test (org.junit.Test)2 JSONObject (com.github.openjson.JSONObject)1 DialogButton (com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton)1 ArrayList (java.util.ArrayList)1 ChatMessage (org.apache.openmeetings.db.entity.basic.ChatMessage)1 Room (org.apache.openmeetings.db.entity.room.Room)1 PrivateMessage (org.apache.openmeetings.db.entity.user.PrivateMessage)1 MenuPanel (org.apache.openmeetings.web.common.menu.MenuPanel)1 AboutDialog (org.apache.openmeetings.web.user.AboutDialog)1 InviteUserToRoomDialog (org.apache.openmeetings.web.user.InviteUserToRoomDialog)1 MessageDialog (org.apache.openmeetings.web.user.MessageDialog)1 UserInfoDialog (org.apache.openmeetings.web.user.UserInfoDialog)1 ChatPanel (org.apache.openmeetings.web.user.chat.ChatPanel)1 Component (org.apache.wicket.Component)1 AbstractDefaultAjaxBehavior (org.apache.wicket.ajax.AbstractDefaultAjaxBehavior)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1 IPartialPageRequestHandler (org.apache.wicket.core.request.handler.IPartialPageRequestHandler)1