Changeset 4878
- Timestamp:
- 04/02/14 12:37:13 (11 years ago)
- Location:
- vlo/branches/vlo-3.0/vlo-web-app/src/main
- Files:
-
- 1 added
- 2 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/VloWicketApplication.java
r4870 r4878 58 58 // register the resource of field names (used by eu.clarin.cmdi.vlo.wicket.componentsSolrFieldNameLabel) 59 59 getResourceSettings().getStringResourceLoaders().add(new BundleStringResourceLoader("fieldNames")); 60 // register the resource of resource type class properties 61 getResourceSettings().getStringResourceLoaders().add(new BundleStringResourceLoader("resourceTypeClasses")); 60 62 // register the resource of application properties (version information filtered at build time) 61 63 getResourceSettings().getStringResourceLoaders().add(new BundleStringResourceLoader("application")); -
vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/wicket/panels/record/ResourceLinksPanel.java
r4877 r4878 17 17 package eu.clarin.cmdi.vlo.wicket.panels.record; 18 18 19 import eu.clarin.cmdi.vlo.service.ResourceStringConverter; 20 import eu.clarin.cmdi.vlo.wicket.ResourceTypeCssBehaviour; 21 import eu.clarin.cmdi.vlo.wicket.model.CollectionListModel; 19 22 import eu.clarin.cmdi.vlo.wicket.model.ResourceInfoModel; 20 import eu.clarin.cmdi.vlo.service.ResourceStringConverter;21 import eu.clarin.cmdi.vlo.wicket.model.CollectionListModel;22 23 import java.util.Collection; 23 24 import java.util.List; 24 25 import org.apache.wicket.ajax.AjaxRequestTarget; 25 26 import org.apache.wicket.ajax.markup.html.AjaxFallbackLink; 26 import org.apache.wicket.behavior.AttributeAppender;27 27 import org.apache.wicket.markup.html.WebMarkupContainer; 28 28 import org.apache.wicket.markup.html.basic.Label; … … 33 33 import org.apache.wicket.model.IModel; 34 34 import org.apache.wicket.model.PropertyModel; 35 import org.apache.wicket.model.StringResourceModel;36 35 import org.apache.wicket.spring.injection.annot.SpringBean; 37 36 … … 101 100 // set the file name as the link's text content 102 101 link.add(new Label("filename", new PropertyModel(resourceInfoModel, "fileName"))); 103 104 // set the class attribute on the link from the value associated 105 // with the resource type as defined in the properties file 106 final StringResourceModel linkClass = new StringResourceModel("class.${resourceType}", ResourceLinksPanel.this, resourceInfoModel, ""); 107 link.add(new AttributeAppender("class", linkClass).setSeparator(" ")); 102 103 // apply the css class matching the resource type 104 link.add(new ResourceTypeCssBehaviour(resourceInfoModel)); 108 105 109 106 return link;
Note: See TracChangeset
for help on using the changeset viewer.