jsf-2

SocialAuthManager object ('manager') becomes NULL after redirection in case of SocialAuth libraries with JSF application?

邮差的信 提交于 2019-12-13 04:51:19
问题 I am using SocialAuth libraries in my JSF application for providing 'login with google/facebook'. As shown below it requires me to stores the SocialAuthManager object ('manager') in the session and then redirect to 'google/facebook' URL //Create an instance of SocialAuthManager and set config SocialAuthManager manager = new SocialAuthManager(); manager.setSocialAuthConfig(config); // URL of YOUR application which will be called after authentication String successUrl= "http://opensource

jsf error “cannot locate..” on f:ajax in the ui:repeat

穿精又带淫゛_ 提交于 2019-12-13 04:50:59
问题 I'm have something like this <ui:repeat value="#{val}" id="repeatID" var="var"> <h:panelGroup layout="block" id="blockForRender"> <f:ajax execute="@this" render=":#{cc.clientId}:blockForRender"> text </f:ajax> </h:panelGroup> </ui:repeat> And this is make error - "cannot locate it in the context of the component". Why? And how I can do this? No this not work. Maybe because ajax is in the other composite? <ui:repeat value="#{val}" id="repeatID" var="var"> <composite:otherComposite id=

get selected value from selectOnemenu using javascript in primefaces and open a dialog box

随声附和 提交于 2019-12-13 04:46:13
问题 How can we get the selected value of PrimeFaces <p:selectOneMenu> using JavaScript/jQuery? I am trying to get it this way, but it does not go inside if condition, which means that the ID of the element is not correct. <h:head> <script> function showDialog() { alert("insdie function"); if($('#someSelect').val() == 'India') { dlg.show(); alert("after function"); } alert("outside function"); } </script> </h:head> <h:body> <h:form> <p:panel> <h:panelGrid columns="2"> <p:selectOneMenu id=

Conflict about required and valuechangeListener for <p:selectonemenu>

三世轮回 提交于 2019-12-13 04:46:05
问题 <p:selectOneMenu id="roleId" value="#{accessPage.roleId}" required="true"> <f:selectItem itemLabel="#{msg['label.common.selecthere']}" itemValue="#{null}" /> <f:selectItems var="code" value="#{accessPage.roleIdList}" itemLabel="#{code.codeDesc}" itemValue="#{code.codeId}" /> <f:valueChangeListener type="com.ncs.caseconnect.base.app.utils.ValueChangeCleanUtils"/> <p:ajax listener="#{accessPage.roleOrModuleChanged}" update="accessRight" /> </p:selectOneMenu> the valueChangeListener and ajax not

update fields of conditionally rendered form

南楼画角 提交于 2019-12-13 04:44:32
问题 my problem is, that I want to render form2 conditionally. This collides with a ajax update event of another form1, which should trigger the rendering of form2. <h:form id="form1"> <h:selectOneMenu id="selectedGroupId" label="#{msgs.group_group}" value="#{groupBean.selectedGroupId}"> <p:ajax event="change" listener="#{groupBean.selectGroupEvent}" update=":form1"/> <f:selectItems value="#{groupBean.availableGruppen}" /> </h:selectOneMenu> </h:form> <h:form id="form2" rendered="#{not empty

java.lang.NoSuchMethodError: javax.servlet.ServletContext.getServletRegistrations()Ljava/util/Map;

懵懂的女人 提交于 2019-12-13 04:43:05
问题 I followed the steps in BalusC's answer at JSF 2.0 File upload. The only step in which I went differently is the Tomahawk upload link in the answer. The link is broken, so I got tomahawk-1.1.11 from another place. When I try to start Tomcat 7.0.14 from Eclipse I get the following error: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getServletRegistrations()Ljava/util/Map; And Tomcat doesn't start. Any ideas? Also, the answer in the link is from March. Any developments with file

PrimeFaces tags not recognised

半世苍凉 提交于 2019-12-13 04:42:43
问题 I am new to JSF and Primefaces and have created a project with JSF2.0, Glassfish v3.0 and Jdk 6.0.Now want to use Primefaces tags instead of JSF tags. I have downloaded primefaces-3.5.jar and added it into WEB-INF/lib folder and it well recognized into my *.xhtml pages. But when I try to run the application it does not recognizes the PrimeFaces tags. for Example: if I insert: <p:inputText id="username" validator="#{regBean.username}" required="true" requiredMessage="Please enter Username"/>

Jsf pages to plain/text without header html

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-13 04:39:31
问题 I need to show output in a jsf page that is not formatted as html (without header and without html tags), but as a simple text file. This is possible with JSF 2.0 or I necessarily need a servlet? Thanks EDIT: a client makes a request through url (with parameters) and I have to give it a response. I know that I can use a servlet for this but wanted to know if it was possible to use a Bean/JSF instead. the problem is that I have to give response that can not be an html file but a text file (for

EJB Schedule task with access to JSF Managed Beans

谁说我不能喝 提交于 2019-12-13 04:39:00
问题 I have a feeling I'm mixing EJB and JSF managed bean responsibilities, but what I want is a scheduled task EJB ( @Singleton with @Schedule ) that has access to my JSF application scoped beans. Specifically, I have a JSF @ApplicationScoped bean that sends different e-mails depending on if it's in Development, Test, or Production. I want to schedule this to send e-mails every 24 hours. What's the best way to accomplish this? 回答1: It's bad design to set the business layer (EJB) as dependent on

index page rendered as xml instead of html [duplicate]

≡放荡痞女 提交于 2019-12-13 04:38:58
问题 This question already has an answer here : Why does my JSF + Spring web application output JSF source code instead of interpreted HTML page? (1 answer) Closed 5 years ago . i have a web app which i have tested locally and works fine, on deployment to production server (manually without netbeansIDE) on Glassfish 3.1.2 , it deploys successfully but on running my url i see the xhtml content instead of the applications login page. What could i be missing. If i have tried re-deploying the war file