本文整理汇总了Java中org.apache.wicket.request.resource.PackageResourceReference类的典型用法代码示例。如果您正苦于以下问题:Java PackageResourceReference类的具体用法?Java PackageResourceReference怎么用?Java PackageResourceReference使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PackageResourceReference类属于org.apache.wicket.request.resource包,在下文中一共展示了PackageResourceReference类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initLayout
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
private void initLayout() {
Form mainForm = new Form("mainForm");
mainForm.setMultiPart(true);
add(mainForm);
WebMarkupContainer protectedMessage = new WebMarkupContainer(ID_PROTECTED_MESSAGE);
protectedMessage.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
ObjectWrapper wrapper = accountModel.getObject();
return wrapper.isProtectedAccount();
}
});
mainForm.add(protectedMessage);
PrismObjectPanel<ShadowType> userForm = new PrismObjectPanel<ShadowType>("account", accountModel, new PackageResourceReference(
ImgResources.class, ImgResources.HDD_PRISM), mainForm, this);
mainForm.add(userForm);
initButtons(mainForm);
}
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:23,代码来源:PageAccount.java
示例2: randomizeOncePerRequestCycle
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
private void randomizeOncePerRequestCycle() {
if (lastRandomizedRequestCycle != RequestCycle.get()) {
lastRandomizedRequestCycle = RequestCycle.get();
Assertions.assertThat(lastRandomizedRequestCycle == RequestCycle.get())
.as("RequestCycle.get() always returns a different instance?!?")
.isTrue(); //sanity check
final List<ICarouselImage> imgs = new ArrayList<ICarouselImage>();
for (int i = 1; i <= 5; i++) {
final String path = "FrameworkSlogan_" + i + ".jpg";
final PackageResourceReference resource = new PackageResourceReference(getClass(), path);
final Url url = RequestCycle.get().mapUrlFor(resource, null);
imgs.add(new CarouselImage(url.toString()));
}
Collections.shuffle(imgs);
frameworkSloganImgs = imgs;
}
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:18,代码来源:Introduction.java
示例3: initLayout
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
private void initLayout() {
// ContainerWrapperFromObjectWrapperModel<F, F> basicContainerModel = new ContainerWrapperFromObjectWrapperModel<>(getObjectWrapperModel(), ItemPath.EMPTY_PATH);
// PrismContainerPanel<F> mainContainer = new PrismContainerPanel<>(ID_FOCUS_MAIN_PANEL, basicContainerModel, false, getMainForm(), getPageBase());
// add(mainContainer);
//
// ContainerWrapperFromObjectWrapperModel<F, F> activationContainerModel = new ContainerWrapperFromObjectWrapperModel<>(getObjectWrapperModel(), SchemaConstants.PATH_ACTIVATION);
// PrismContainerPanel<F> activationContainerPanel = new PrismContainerPanel<>(ID_FOCUS_ACTIVATION_PANEL, activationContainerModel, false, getMainForm(), getPageBase());
// add(activationContainerPanel);
//
// ContainerWrapperFromObjectWrapperModel<F, F> passwordContainerModel = new ContainerWrapperFromObjectWrapperModel<>(getObjectWrapperModel(), SchemaConstants.PATH_PASSWORD);
// PrismContainerPanel<F> passwordContainerPanel = new PrismContainerPanel<>(ID_FOCUS_PASSWORD_PANEL, passwordContainerModel, false, getMainForm(), getPageBase());
// add(passwordContainerPanel);
PrismPanel<F> panel = new PrismPanel<F>(ID_FOCUS_FORM, new ContainerWrapperListFromObjectWrapperModel(getObjectWrapperModel(), getVisibleContainers()),
new PackageResourceReference(ImgResources.class, ImgResources.USER_PRISM), getMainForm(),
null, getPageBase());
add(panel);
}
开发者ID:Evolveum,项目名称:midpoint,代码行数:21,代码来源:FocusDetailsTabPanel.java
示例4: initLayout
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
private void initLayout() {
Form mainForm = new com.evolveum.midpoint.web.component.form.Form("mainForm");
mainForm.setMultiPart(true);
add(mainForm);
WebMarkupContainer protectedMessage = new WebMarkupContainer(ID_PROTECTED_MESSAGE);
protectedMessage.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
ObjectWrapper wrapper = accountModel.getObject();
return wrapper.isProtectedAccount();
}
});
mainForm.add(protectedMessage);
PrismPanel<ShadowType> userForm = new PrismPanel<ShadowType>("account", new ContainerWrapperListFromObjectWrapperModel<>(accountModel, WebComponentUtil.getShadowItemsToShow()), new PackageResourceReference(
ImgResources.class, ImgResources.HDD_PRISM), mainForm,
itemWrapper -> WebComponentUtil.checkShadowActivationAndPasswordVisibility(itemWrapper, accountModel), this);
mainForm.add(userForm);
initButtons(mainForm);
}
开发者ID:Evolveum,项目名称:midpoint,代码行数:24,代码来源:PageAccount.java
示例5: init
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
/**
* @see org.apache.wicket.Application#init()
*/
@Override
public void init() {
super.init();
getMarkupSettings().setMarkupFactory(getMarkupFactory());
getPageSettings().addComponentResolver(new LabelI18NMarkupFilter());
getJavaScriptLibrarySettings().setJQueryReference(new PackageResourceReference(JQueryHelper.class, JQueryHelper.getCurrentVersion()));
initGenguiWebConfiguration();
initGenguiI18N();
initInMemoryCompilation();
initOnTheFlyHTMLCreation();
initGenguiClassbasedCaching();
initStylingResourceMounting();
}
开发者ID:Nocket,项目名称:nocket,代码行数:19,代码来源:NocketWebApplication.java
示例6: renderHead
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
if (modalPanel == null) {
return;
}
JQueryHelper.initJQuery(response);
//response.render(CssHeaderItem.forReference(new PackageResourceReference(DMDModalWindow.class, "DMDModalWindow.css")));
response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(DMDModalWindow.class, "DMDModalWindow.js")));
if (doShow) {
String setDimensionToModalFooter = "";
if (dimension != null) {
setDimensionToModalFooter = "dmdModalWindowSetzeHoeheAnModalBody(" + (int) dimension.getHeight() + ", " + 1200 + ");";
}
// Bootstrap macht bei jeder Form einen margin-bottom von 20px.
// Dieses ist in der modalen Box sehr störend und muss per
// Javascript korrigiert werden
response.render(OnDomReadyHeaderItem.forScript("dmdModalWindowKorrigiereFormMargin(); zeigeBlockerWennModalPanelVorhanden(); "
+ setDimensionToModalFooter));
}
else {
response.render(OnLoadHeaderItem.forScript("zeigeBlockerWennModalPanelVorhanden();"));
}
}
开发者ID:Nocket,项目名称:nocket,代码行数:26,代码来源:DMDModalWindow.java
示例7: renderHead
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
@Override
public void renderHead(Component component, IHeaderResponse response) {
super.renderHead(component, response);
response.render(CssHeaderItem.forReference(new PackageResourceReference(SlidebarBehavior.class, "slidebars.css")));
response.render(CssHeaderItem.forUrl("css/slidebar.css"));
response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(SlidebarBehavior.class, "slidebars.js")));
Map<String, String> vars = new HashMap<String, String>();
// vars.put("siteClose", "true");
PackageTextTemplate template = new PackageTextTemplate(SlidebarBehavior.class, "slidebar-behavior.template.js");
// template.interpolate(vars);
response.render(OnDomReadyHeaderItem.forScript(template.getString()));
}
开发者ID:nextreports,项目名称:nextreports-server,代码行数:17,代码来源:SlidebarBehavior.java
示例8: renderHead
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
@Override
public void renderHead(Component component, IHeaderResponse response) {
super.renderHead(component, response);
response.render(JavaScriptReferenceHeaderItem.forReference(new InfiniteScrollResourceReference()));
CharSequence url = RequestCycle.get().urlFor(new PackageResourceReference(
InfiniteScrollBehavior.class, "ajax-indicator.gif"), new PageParameters());
String script = String.format("gitplex.infiniteScroll.init('%s', %s, '%s', %s);",
component.getMarkupId(true), getCallbackFunction(explicit("page")), url, pageSize);
response.render(OnDomReadyHeaderItem.forScript(script));
}
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:12,代码来源:InfiniteScrollBehavior.java
示例9: create
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
@Override
public ResourceReference create(Key key) {
if (PackageResource.exists(key)) {
return new PackageResourceReference(key);
} else {
for (ConcatResourceBundleReference<? extends IReferenceHeaderItem> bundle: bundles) {
if (bundle.getScope().getName().equals(key.getScope())) {
String bundleParentPath = getParentPath(bundle.getName());
String relativePath;
if (bundleParentPath != null)
relativePath = PathUtils.relativize(bundleParentPath, key.getName());
else
relativePath = key.getName();
for (IReferenceHeaderItem headerItem: bundle.getProvidedResources()) {
String referenceParentPath = getParentPath(headerItem.getReference().getName());
String possibleName;
if (referenceParentPath != null)
possibleName = PathUtils.resolve(referenceParentPath, relativePath);
else
possibleName = relativePath.toString();
possibleName = PathUtils.normalize(possibleName);
if (possibleName != null) {
Key possibleKey = new Key(headerItem.getReference().getScope().getName(), possibleName,
key.getLocale(), key.getStyle(), key.getVariation());
if (PackageResource.exists(possibleKey)) {
return new PackageResourceReference(possibleKey);
}
}
}
}
}
return null;
}
}
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:35,代码来源:BundleAwareResourceReferenceFactory.java
示例10: render
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
private void render(EmojiNode node, NodeRendererContext context, HtmlWriter html) {
String emojiName = node.getText().toString();
String emojiUrl = null;
if (RequestCycle.get() != null) {
String emojiCode = EmojiOnes.getInstance().all().get(emojiName);
if (emojiCode != null) {
emojiUrl = RequestCycle.get().urlFor(new PackageResourceReference(
EmojiOnes.class, "icon/" + emojiCode + ".png"), new PageParameters()).toString();
}
}
if (emojiUrl != null) {
ResolvedLink resolvedLink = context.resolveLink(LinkType.IMAGE, emojiUrl, null);
html.attr("src", emojiUrl);
html.attr("alt", "emoji " + emojiName);
if (!attrImageSize.isEmpty())
html.attr("height", attrImageSize).attr("width", attrImageSize);
if (!attrAlign.isEmpty())
html.attr("align", attrAlign);
html.withAttr(resolvedLink);
html.tagVoid("img");
} else {
// output as text
html.text(":");
context.renderChildren(node);
html.text(":");
}
}
开发者ID:jmfgdev,项目名称:gitplex-mit,代码行数:30,代码来源:EmojiNodeRenderer.java
示例11: renderHead
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.render(CssHeaderItem.forReference(
new PackageResourceReference(AssignmentEditorPanel.class, "AssignmentEditorPanel.css")));
}
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:8,代码来源:AssignmentEditorPanel.java
示例12: renderHead
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.render(JavaScriptHeaderItem.forReference(
new PackageResourceReference(Accordion.class, "Accordion.js")));
response.render(CssHeaderItem.forReference(
new PackageResourceReference(Accordion.class, "Accordion.css")));
WebMarkupContainer parent = (WebMarkupContainer) get("parent");
response.render(OnDomReadyHeaderItem.forScript("createAccordion('" + parent.getMarkupId()
+ "'," + getExpanded() + "," + getMultipleSelect() + "," + getOpenedPanel() + ")"));
}
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:14,代码来源:Accordion.java
示例13: configureReload
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
private void configureReload(WebPage destination) {
destination.add(new Behavior() {
@Override
public void renderHead(Component component, IHeaderResponse response) {
response.render(JavaScriptReferenceHeaderItem.forReference(new PackageResourceReference(ServerTemplate.class, "singular.js")));
}
});
destination.add($b.onReadyScript(() -> " Singular.atualizarContentWorklist(); "));
}
开发者ID:opensingular,项目名称:singular-server,代码行数:10,代码来源:DispatcherPage.java
示例14: renderHead
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.render(CssHeaderItem.forUrl("/singular-static/resources/singular/fonts/google/open-sans.css"));
response.render(JavaScriptReferenceHeaderItem.forReference(new PackageResourceReference(ServerTemplate.class, "singular.js")));
response.render(CssHeaderItem.forReference(new PackageResourceReference(ServerTemplate.class, "ServerTemplate.css")));
if (SingularProperties.get().isTrue(SingularProperties.ANALYTICS_ENABLED)) {
response.render(JavaScriptHeaderItem.forUrl(skinnableResource("/layout4/scripts/analytics.js")));
}
}
开发者ID:opensingular,项目名称:singular-server,代码行数:11,代码来源:ServerTemplate.java
示例15: mountImages
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
/**
* Loads the images for the web application at start-up.
*/
private void mountImages() {
final ResourceReference alignmentImage = new PackageResourceReference(ImageReference.class, "alignment.jpg");
this.mountResource("/images/alignment", alignmentImage);
final ResourceReference eventStreamImage = new PackageResourceReference(ImageReference.class, "eventStream.jpg");
this.mountResource("/images/eventStream", eventStreamImage);
final ResourceReference groupImage = new PackageResourceReference(ImageReference.class, "group.jpg");
this.mountResource("/images/group", groupImage);
final ResourceReference processImage = new PackageResourceReference(ImageReference.class, "process.jpg");
this.mountResource("/images/process", processImage);
}
开发者ID:bptlab,项目名称:Unicorn,代码行数:17,代码来源:UNICORNApplication.java
示例16: newNavbar
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
@Override
protected Navbar newNavbar(final String id) {
final Navbar navbar = super.newNavbar(id);
navbar.setBrandName(Model.of("RemoteList"));
navbar.setBrandImage(new PackageResourceReference(ARemotelistPage.class, "logo.png"), null);
if (Roles.get().hasRole(Roles.USER)) {
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.LEFT,
new NavbarButton<Void>(ShowCategoriesPage.class, Model.of("Categories "))));
navbar.addComponents(NavbarComponents.transform(Navbar.ComponentPosition.LEFT,
new NavbarButton<Void>(ShowServersPage.class, Model.of("Servers"))));
}
return navbar;
}
开发者ID:subes,项目名称:invesdwin-nowicket,代码行数:15,代码来源:ARemotelistPage.java
示例17: initLogoReference
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
protected void initLogoReference()
{
Properties settings = SettingsUtil.getSettings();
String logoValue = settings.getProperty(SettingsUtil.CFG_STYLE_LOGO);
if (StringUtils.isNotBlank(logoValue) && new File(logoValue).canRead()) {
getSharedResources().add("logo", new FileSystemResource(new File(logoValue)));
mountResource("/assets/logo.png", new SharedResourceReference("logo"));
}
else {
mountResource("/assets/logo.png", new PackageResourceReference(getLogoLocation()));
}
}
开发者ID:webanno,项目名称:webanno,代码行数:13,代码来源:WicketApplicationBase.java
示例18: HeaderPanel
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
public HeaderPanel(String id)
{
super(id);
WicketClientInfo sessionClientInfo = (WicketClientInfo) getWebSession().getClientInfo();
CrestClientInfo clientInfo = (CrestClientInfo) sessionClientInfo.getOauthClientInfo();
String user = sessionClientInfo.isAuthenticated() ? clientInfo.getVerifyData().CharacterName : null;
login = new BookmarkablePageLink<Object>("login", LoginPage.class);
logout = new BookmarkablePageLink<Object>("logout", LogoutPage.class);
logoutLabel = new Label("logoutLabel", "Welcome, " + user + " - ");
needsApiLabel = new Label("needsApiLabel", "We need your API Key");
// String s = CrestController.getCrestController().scopes.getCreatePredefinedUrl(ScopeToMask.Type.Character);
// needsApi = new ExternalLink("needsApi", s);
needsApi = new BookmarkablePageLink<Object>("needsApi", ApiKeyInput.class);
boolean loggedIn = user != null && !user.isEmpty();
boolean hasKeys = true; // not going to display if not authenticated
//TODO: add in check if there are actually any scopes configured
if(loggedIn)
hasKeys = CrestController.getCrestController().capsuleerHasApiKey(user);
logout.setVisible(loggedIn);
logoutLabel.setVisible(loggedIn);
login.setVisible(!loggedIn);
needsApiLabel.setVisible(!hasKeys);
needsApi.setVisible(!hasKeys);
PackageResourceReference resourceReference = new PackageResourceReference(getClass(), "eveSsoSmlWht.png");
login.add(new Image("loginImg", resourceReference));
add(new BookmarkablePageLink<>("homeURL", Index.class));
add(login);
add(logoutLabel);
add(logout);
add(needsApiLabel);
add(needsApi);
}
开发者ID:timpanogos,项目名称:crestj,代码行数:39,代码来源:HeaderPanel.java
示例19: renderHead
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
@Override
public void renderHead(IHeaderResponse response) {
super.renderHead(response);
response.render(CssHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/css/reporting/morris.css")));
response.render(CssHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/css/reporting/bootstrap.min.css")));
response.render(CssHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/css/reporting/docs.min.css")));
response.render(CssHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/css/reporting/style.css")));
response.render(CssHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/css/reporting/datepicker3.css")));
response.render(CssHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/css/reporting/selectize.default.css")));
response.render(CssHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/css/reporting/query-builder.min.css")));
response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/js/reporting/jquery.min.js")));
response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/js/reporting/bootstrap.min.js")));
response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/js/reporting/docs.min.js")));
response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/js/reporting/jput.min.js")));
response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/js/reporting/raphael-min.js")));
response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/js/reporting/morris.min.js")));
response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/js/reporting/jquery.blockUI.js")));
response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/js/reporting/xepOnline.jqPlugin.js")));
response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/js/reporting/moment.min.js")));
response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/js/reporting/bootstrap-datepicker.js")));
response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/js/reporting/selectize.min.js")));
response.render(JavaScriptHeaderItem.forReference(new PackageResourceReference(ReportingPage.class, "assets/js/reporting/query-builder.standalone.min.js")));
response.render(OnDomReadyHeaderItem.forScript( eu.uqasar.util.reporting.Util.createExpressionEditor( cubeurl,"http://uqasar.pythonanywhere.com" ) ));
//response.render(JavaScriptHeaderItem.forScript( eu.uqasar.util.reporting.Util.createExpressionEditorInputExperiment() , "dynamicfilters.js") );
}
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:29,代码来源:ReportingPage.java
示例20: addUQasarLogo
import org.apache.wicket.request.resource.PackageResourceReference; //导入依赖的package包/类
private void addUQasarLogo() {
setPosition(Position.TOP);
final StringResourceModel alt = new StringResourceModel(
"menu.home.link.text", this, null);
setBrandImage(new PackageResourceReference(BasePage.class,
"../img/uqasar-logo.png"), alt);
get("brandName").get("brandImage").add(
new AttributeModifier("title", alt));
get("brandName").add(
new AttributeModifier("id", "brand"));
}
开发者ID:U-QASAR,项目名称:u-qasar.platform,代码行数:12,代码来源:HeaderNavigationBar.java
注:本文中的org.apache.wicket.request.resource.PackageResourceReference类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论