jsf-2

Is it possible to include all javascripts files from one folder in JSF?

£可爱£侵袭症+ 提交于 2020-08-21 19:47:46
问题 I am using JSF 2.0, and am looking for a means to include all the javascripts from a given folder on a page, i.e. do something like <h:outputScript library="javascript" name="*.js" target="head" /> Is this kind of thing even possible? Should I write a custom component using java code to achieve this? Thanks for your help, Sébastien Tromp 回答1: Nice idea. This is not supported by the JSF API, but it's in theory possible with a custom script renderer. I played somewhat around it and it's indeed

Is it possible to include all javascripts files from one folder in JSF?

佐手、 提交于 2020-08-21 19:46:24
问题 I am using JSF 2.0, and am looking for a means to include all the javascripts from a given folder on a page, i.e. do something like <h:outputScript library="javascript" name="*.js" target="head" /> Is this kind of thing even possible? Should I write a custom component using java code to achieve this? Thanks for your help, Sébastien Tromp 回答1: Nice idea. This is not supported by the JSF API, but it's in theory possible with a custom script renderer. I played somewhat around it and it's indeed

How to restrict Primefaces inputMask to numbers only?

夙愿已清 提交于 2020-07-17 10:06:53
问题 I want to restrict p:inputMask to numbers only , and I tried the proposed solutions from: How to restrict an input to numbers only with PrimeFaces inputMask element But none of them worked. I tried these two ways: <p:inputMask id="userNo" maxlength="2" mask="9?9999" /> and <p:inputMask id="userNo" maxlength="2" > <pe:keyFilter regEx="/[0-9_]/i"/> </p:inputMask> 回答1: I think that approach is right but I noticed that you don't put value attribute on inputMask . Do you try to put it on? Edit:

primefaces lazy loading is not implemented

若如初见. 提交于 2020-06-12 06:14:08
问题 I am getting "java.lang.UnsupportedOperationException: Lazy loading is not implemented." error. When i degub the project, lazyModel's constructor is working but load method is not executed. my xhtml page; <p:dataTable id="envelopelistid" var="envelope" value="#{incomingEnvelopeListController.lazyEnvelopeDataModel}" selection="#{incomingEnvelopeListController.selectedEnvelope}" selectionMode="single" rowKey="#{envelope.instanceIdentifier}" sortMode="multiple" lazy="true" style="min-height:

Java EE security - Not redirected to initial page after login

匆匆过客 提交于 2020-06-09 12:13:48
问题 I just started learning Java EE. My goal is to implement a web portal (with EJB 3 and JSF) for badminton players, where the users can post and analyze their results. To keep it simple (well it turns out it really isn't) I have decided to use the security system the container provides (JBoss as7). After some problem I have managed to get the authentication/authorization to work. However, I have one issue which I haven't been able to solve. When I try to access a protected page I get, as

How to use if, else condition in jsf to display image

北慕城南 提交于 2020-06-09 08:00:18
问题 I have a condition where I have an enrollment form in which if userid is 0 it should show the dummy image and when I edit user from any update, I check for if userid which is not equal to 0 then display the image corresponding to userid. I used JSTL inside jsf page. But always it tries to go to else loop for showing image. The functionality is working fine. The only thing is I can't display the dummy image when I visit the page first. Here s my code.: <c:if test="${'#{user.userId}' == '0'}">