Sebastiaan van Erk wrote:
> 
> In my web page with the resource link I do the following:
> 
>       fragment.add(new ResourceLink("cvEnglishLink", new 
> ResourceReference("cvs_en.pdf")) {
>       @Override
>               public boolean isVisible() {
>                       return "en".equals(getLocale().getLanguage());
>               }
>       });
> 

Try:

public class P1 extends WebPage {
        public P1() {
                ResourceReference resourceRef = new 
ResourceReference("cvs.pdf") {
                        protected Resource newResource() {
                                return new PDFResource(getLocale());
                        }
                };
                resourceRef.setLocale(getLocale()); //THIS IS THE LINE
                ResourceLink link = new ResourceLink("link", resourceRef);
                add(link);
        }
}



-----
--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
Axis2 tutorials freely available at http://www.agileskills2.org/DWSAA
-- 
View this message in context: 
http://www.nabble.com/Re%3A-Small-shared-resource-question...-tp15663443p15714682.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to