Search Results

Search found 98 results on 4 pages for 'primefaces'.

Page 2/4 | < Previous Page | 1 2 3 4  | Next Page >

  • Is there a way to hide the Primefaces fileUpload progress bar and buttons in advanced mode and auto mode?

    - by Joe Roberts
    Is there a way to hide the Primefaces fileUpload progress bar and buttons in advanced mode and auto mode? Here is the code that I am using: <p:fileUpload id="scriptUpload" widgetVar="importDevicesWidget" fileUploadListener="#{scriptUploadBean.handleFileUpload}" auto="true" label="Choose.." mode="advanced" update=":infoMessages" sizeLimit="8192" allowTypes="/(\.|\/)(txt)$/" onstart="clearInvalidFileMsg();$('#progress').show();" oncomplete="clearInvalidFileMsg();$('#progress').hide();importDevicesDialogWidget.hide()"/> The problem is that it makes no sense for the buttons that appear next to the progress bar for each file to be there as the mode is auto so the upload already started! Here is a screen shot:

    Read the article

  • Cross field validation in jsf h:datatable using p:calendar

    - by Matt Broekhuis
    I noticed this question was asked, but it has not been answered correctly. I have a datatable that has two columns start date and end date. Both contain primefaces p:calendar controls in them. I need to ensure that for each row that the date in column1 is not after the date in column2. I would like to tie this into the JSF validation framework, but I'm having trouble. i've tried marking the datatable rowStatePreserved="true" , this allows me to get the values, but something is still wrong as when it fails, all the values in the first row overwrite all the other values. What am I doing wrong, or should I be using a completely different strategy? xhtml code <h:form> <f:event type="postValidate" listener="#{bean.doCrossFieldValidation}"/> <p:dataTable id="eventDaysTable" value="#{course.courseSchedules}" var="_eventDay" styleClass="compactDataTable" > <p:column id="eventDayStartColumn"> <f:facet name="header"> Start </f:facet> <p:calendar id="startDate" required="true" value="#{_eventDay.startTime}" pattern="MM/dd/yyyy hh:mm a"/> </p:column> <p:column id="eventDayEndColumn"> <f:facet name="header"> End </f:facet> <p:calendar id="endDate" required="true" value="#{_eventDay.endTime}" pattern="MM/dd/yyyy hh:mm a"/> </p:column> </p:dataTable> </h:form> validationCode public void doCrossFieldValidation(ComponentSystemEvent cse) { UIData eventsDaysStable = (UIData) cse.getComponent().findComponent("eventDaysTable"); if (null != eventsDaysStable && eventsDaysStable.isRendered()) { Iterator<UIComponent> startDateCalendarIterator = eventsDaysStable.findComponent("eventDayStartColumn").getChildren().iterator(); Iterator<UIComponent> endDateCalendarIterator = eventsDaysStable.findComponent("eventDayEndColumn").getChildren().iterator(); while (startDateCalendarIterator.hasNext() && endDateCalendarIterator.hasNext()) { org.primefaces.component.calendar.Calendar startDateComponent = (org.primefaces.component.calendar.Calendar) startDateCalendarIterator.next(); org.primefaces.component.calendar.Calendar endDateComponent = (org.primefaces.component.calendar.Calendar) endDateCalendarIterator.next(); Date startDate = (Date) startDateComponent.getValue(); Date endDate = (Date) endDateComponent.getValue(); if (null != startDate && null != endDate && startDate.after(endDate)) { eventScheduleChronologyOk = false; startDateComponent.setValid(false); endDateComponent.setValid(false); } } if (!eventScheduleChronologyOk) { showErrorMessage(ProductManagementMessage.PRODUCT_SCHEDULE_OUT_OF_ORDER); } } }

    Read the article

  • jsf messed up links

    - by Mateusz
    I'm new to JSF. My application is working, but I'm confused with links in browser when using controller. BTW, there is also PrimeFaces in my app so don't be suprised with p: tags. Let's say I have 'list' and 'show' pages with controller doing redirection between them. First I'm on http://localhost:8080/y/r/conversation/list.xhtml page. There is link created with line <p:commandLink action="#{lazyConversationBean.doShow(conv)}" ajax="false" value="View"/>. lazyConversationBean acts here as my Controller. There is method: public String doShow(Conversation c) { this.setSelectedConversation(c); return "view"; } from which I got redirected to ...... again http://localhost:8080/y/r/conversation/list.xhtml (browser shows it) even when it's correct http://localhost:8080/y/r/conversation/view.xhtml page. There I have link <p:commandButton action="#{lazyConversationBean.doList()}" ajax="false" value="Back to list"/> and again controller has method: public String doList() { return "list"; } from which I got redirected to ... yeah, you guessed right ... http://localhost:8080/y/r/conversation/view.xhtml (that is again what browser shows) even when again it is correct http://localhost:8080/y/r/conversation/list.xhtml page. It seams as browser link area is always one step behind page currently being displayed. I don't even know if it's some incorrect behaviour as I have no idea how to query google for this :D Just for test I did this short tutorial, where netbeans created whole stack of code on one of my entities, and behaviour was the same, so it's not PrimeFaces magic related. Can you tell my why it happens, and how to fix it? Users likes to copy correct links ;)

    Read the article

  • Open a dialog box in same window on selectOneMenu change

    - by Pravingate
    I have a jsf page where I have a selectOneMenu and , I want to open a dialog box on selectOneMenu changes. As a example if user selects a value ="passive" from jsf selectOneMenu it should open a dialog box or a light box on same page where I want to display a small jsf form like as here done. http://www.primefaces.org/showcase-labs/ui/dialogLogin.jsf and I also want save that submitted data in my backing bean somewhere so I can store it in to database later. I dont know how to open a dialog box or light box from backing bean in same window,as we will identify value change using valueChangeListener event or by using ajax event. I am able to identify which value is selected from selectOneMenu(DropdownMenu), but dont know how to open a dialog box on selecting particular value. <h:outputLabel value="* Country: "/> <h:selectOneMenu id="someSelect" value="#{testController.countryName}" required="true"> <f:selectItem itemLabel="Select Country" itemValue=""/> <f:selectItems value="#{testController.countryNamesSelectItems}"/> </h:selectOneMenu> Supoose we have 2 options in selectItems as India and Austrlia, then If a user choose India a dialog box should open on same page where a user need to fill some information and need to submit if he is from india (like here in example http://www.primefaces.org/showcase-labs/ui/dialogLogin.jsf user will put his username and password and submits data) Hope this helps How can I achieve that by using jsf or javascript or ajax or by any else way?

    Read the article

  • Spring MVC with a rich client framework

    - by ziggy
    I have several applications that are structured as follows DataComponent WebComponent ThickClientComponent WebServices The DataComponent has all the functionality required to access the application's data so it contains the DAOs and the JPA entities. The other three modules are: WebComponent - A spring MVC application that uses the DataComponent for data acccess ThickClientComponent- A Swing application that uses the DataComponent for data access WebServices - A SOAP based services that also uses the DataComponent. All three projets have the DataComponent as a dependeny in their Maven POM file. I would like to use a rich client framework like RichFaces, icefaces or primefaces as i need to be able to use the rich components are available in rich client frameworks (i.e. trees, panel, drag and drop etc). I have looked around and i cant seem to find an example where a Spring MVC application uses a rich client platform. Is it possible? Are the rich client platforms a framework meaning that i have to use either Spring MVC or the rich client platform but not both? The DataComponent module is spring based.

    Read the article

  • JSF 2.0 method invocation with argument from var of dataGrid

    - by little_b
    Hello I use primefaces with facelets and i have a quastion: for example i have dataGrid and i want to call method of bean, that registered in faces-config, to include some dynamic content: <p:dataGrid var="provider" value="#{paymentFormBean.providers}"> <ui:include src="contentFactory.getSpecificForm('some attribute')"/> </p:dataGrid> How could i invoke getSpecificForm method with argument from var of dataGrid? Something like: <p:dataGrid var="provider" value="#{paymentFormBean.providers}"> <ui:include src="contentFactory.getSpecificForm(provider.formName)"/> </p:dataGrid> Could anyone help me? Thank you

    Read the article

  • display a confirmation popup on button click based on condition

    - by Raaz
    I have a p:commandButton on click of which I need to add a few values to a list. In my managed bean, I'm validating the value that has to be added, and if it validates to false, I have to display a confirmation popup. This is my code - <p:commandButton id="add" value="Add" type="submit" action="#{bean.doAdd}" ajax="false" update=":List"/> And in the bean, on click of the "Add" button, public String doAdd() throws Exception { if(response != null) { if(keyList.contains(response)) { if(!responseList.contains(response)) { responseList.add(response); } } else { //Have to display confirmation popup. } response = ""; } return response; } I'm using jsf 2.0 and primefaces 3.0. Can someone please tell me how to display the popup from the bean?

    Read the article

  • JSF Open new window and display bean data

    - by JSFPRINTER
    I am running JSF 2.0 and the latest version of Primefaces 2.2RC1 I believe. I am trying to create a printer friendly window. When the user clicks on a p:commandLink I want a new window to open and display a xhtml file I have named printView.xhtml. Now I can get the window working fine using JavaScript window.open but when I open the new window it will not render any values it just displays everything as #{myBean.value}. Does anyone know how to properly open a window and extend the current scope of the application into that window so I can call all of my managed beans properly and display the values etc. etc.

    Read the article

  • Mixing AJAX requests with Flash scope objects not working

    - by AlanObject
    I have a JSF page that displays a table from an object called TableQuery that supports stateful pagination, sorting, etc. The bean that accesses the object is a RequestScoped object, and it attempts to preserve the TableQuery by storing it the flash map. The accessor method looks like this: public TableQuery<SysLog> getQuery() { if (query != null) return query; Flash flash = FacesContext.getCurrentInstance(). getExternalContext().getFlash(); query = (TableQuery) flash.get("Query"); if (query != null) System.out.println("TableSysLog.getQuery() Got query from flash!"); if (query == null) { query = slc.getNewTableQuery(); System.out.println("TableSysLog.getQuery() Created new query"); } flash.put("Query", query); return query; } The Links to go between pages are implemented with *p:commandLInk*s. I use Primefaces command link in AJAX mode so just the link gets processed when it is clicked. The action listener looks like this: public void doNextPage(ActionEvent evt) { getQuery().doNextPage(); } When it doesn't work I get the error message: WARNING: JSF1095: The response was already committed by the time we tried to set the outgoing cookie for the flash. Any values stored to the flash will not be available on the next request. I found this thread when looking up this problem. When I turned of HTTP chunking as the article suggests, the error message went away but the problem remained. Does anyone know what is going on and how this might be fixed?

    Read the article

  • JSF: SelectOneRadio shortcuts for options

    - by pakore
    I have the following h:selectOneRadio: <h:selectOneRadio style="text-align:left" layout="pageDirection" id="#{prefix}_rating" value="#{examinationPanel.tempResult}" > <f:selectItems value="#{examinationPanel.options}"></f:selectItems> </h:selectOneRadio> And then the backing bean is loading the options based on some userpreferences: public List<SelectItem> loadOptions (Set<ResultEnum> possibleResults){ messages =ResourceBundle.getBundle("com.eyeprevent.resources.Messages",FacesContext.getCurrentInstance().getViewRoot().getLocale()); List<SelectItem> options = new ArrayList<SelectItem>(); for(ResultEnum result:possibleResults){ SelectItem option = new SelectItem(result,messages.getString(result.name())); options.add(option); } return options; } How can I define shortcuts for the options in the radio group? por example typing "1" selects the first option, typing "2" the second, etc... Thanks in advance! ps. I'm using Jsf 1.2, Richfaces, Primefaces and Facelets.

    Read the article

  • JSF 2.0: Validate equality of 2 InputSecret Fields (confirm password) without writing Code?

    - by yournamehere
    I'm developing a pure JavaEE6 application with JSF 2.0 and Glassfish. My JSF implementation is Primefaces (beside Mojarra provided by Glassfish). I want to verify if the values of 2 password fields in a JSF form are equal. With Seam, there is the neat component <s:validateEquality for="pw1"/>. I want do to the same without Seam, just using JSF (or maybe a component of a JSF library). Until now i only saw examples which validate the form with a custom validator. But i would like to compare the fields without writing Java code or Javascript code. Is that possible? This what it looks like with Seam: ... <h:inputSecret id="passwort" value="#{personHome.instance.password}" redisplay="true" required="true"> <f:validateLength minimum="8"/> <a:support event="onblur" reRender="passwortField" bypassUpdates="true" ajaxSingle="true" /> </h:inputSecret> ... <h:inputSecret id="passwort2" required="true" redisplay="true"> <!-- find the JSF2.0-equivalent to this tag: --> <s:validateEquality for="passwort"/> <a:support event="onblur" reRender="passwort2Field" bypassUpdates="true" ajaxSingle="true" /> </h:inputSecret> ... Any help is appreciated. Thanks!

    Read the article

  • Trigger JavaScript action after Datatable is loaded

    - by perissf
    In a JSF 2.1 + PrimeFaces 3.2 web application, I need to trigger a JavaScript function after a p:dataTable is loaded. I know that there is no such event in this component, so I have to find a workaround. In order to better understand the scenario, on page load the dataTable is not rendered. It is rendered after a successful login: <p:commandButton value="Login" update=":aComponentHoldingMyDataTable" action="#{loginBean.login}" oncomplete="handleLoginRequest(xhr, status, args)"/> As you can see from the above code, I have a JavaScript hook after the successful login, if it can be of any help. Immediately after the oncomplete action has finished, the update attribute renders the dataTable: <p:dataTable var="person" value="#{myBean.lazyModel}" rendered="#{p:userPrincipal() != null}" /> After the datatable is loaded, I need to run a JavaScript function on each row item, in order to subscribe to a cometD topic. In theory I could use the oncomplete attribute of the login Button for triggering a property from myBean in order to retrieve once again the values to be displayed in the dataTable, but it doesn't seem very elegant. The JavaScript function should do something with the rowKey of each row of the dataTable: function javaScriptFunctionToBeTriggered(rowKey) { // do something }

    Read the article

  • JSF: Showing/Calling a dialog programatically

    - by Sway
    has anybody an idea to show/call a dialog programatically and add this to stage(actual browser window) ?! I am running in circles and cannot find a solution :/ More background what I want to do: I want to trigger a database update every 2 hours. This I have done with a TimerTask... This works fine for me, the Timertask gets all the data I want from the database... Before this TimerTask is triggered I want to "lock" the screen for some seconds that no user(session scoped) can access the database(this I also know how this will work) ... My problem is that I don't know/ cannot find a way/ i am to stupid to call a dialog programatically ... Any tips, hints would be very cool :) Thanks a lot ! UPDATE: I want to set this primefaces dialog: Dialog dialog = new Dialog(); dialog.setAppendToBody(true); dialog.setModal(true); dialog.setVisible(true); dialog.setWidgetVar("generatedDialog"); dialog.setId("fancyDialog"); dialog.setClosable(false); dialog.setHeader("Getting latest information from the database"); dialog.setDynamic(true); dialog.setResizable(false); dialog.setDraggable(false); How can I do that ? :/ How do I display it to my browser ? :o Regards

    Read the article

  • Is it possible to pass Calendar new date in the bean without listener?

    - by isabsent
    I am trying to pass new date from PrimeFaces p:calendar (placed in p:dataTable column) to the backing bean: <p:column > <p:calendar value="#{bean.date}">` <p:ajax /> </p:calendar> </p:column> It does not update bean.date. Variants with <p:ajax update="@this" event="change"/> <p:ajax update="@this" event="select"/> do not update bean.date too. The only way I have found is using of listener. However, I suppose, there should be a way without listener implementation like for simple facelets: <p:column> <h:inputText value="#{bean.note}" > <f:ajax/> </h:inputText> </p:column> that works fine for me. Does anybody know how to get it working!?

    Read the article

  • Why does p:panelGrid not work with ui:repeat?

    - by CycDemo
    If I use as below, I get no error, no output. Why does p:panelGrid not work with ui:repeat? Note : I don't want to use c:forEach because of the I already face a lot of JSF issue. <p:panelGrid> <ui:repeat value="#{MyBean.dataList}" var="data"> <p:row> <p:column> <h:outputText value="#{data.name}"/> </p:column> <p:column> <h:outputText value="#{data.description}"/> </p:column> </p:row> </ui:repeat> </p:panelGrid> MyBean.java public List<Data> getDataList(){ List<Data> result = new ArrayList<Data>(); result.add(new Data("Name 1", "Description 1")); result.add(new Data("Name 2", "Description 2")); result.add(new Data("Name 3", "Description 3")); result.add(new Data("Name 4", "Description 4")); return result; } Expected output with primefaces

    Read the article

  • Navigation to call action for bean class

    - by Muthu
    I am using JSF 2.0 and PrimeFaces 3.0. I have uploaded the images and have to crop the image. The images are uploaded and successfully displayed in the upload pages. When I select the images and click the crop button the corresponding crop bean is not called. If I don't select the image and click the crop button the corresponding crop bean class is called but a NullPointerException occurred. What is the problem? The Facelet view is: <h:form> <p:panel header="FILE UPLOAD WITH CROPPER" style="width:900px; margin: 0 auto; margin-top:0px"> <p:fileUpload fileUploadListener="#{photoUploadAction.handleImageUpload}" mode="advanced" update="getImageId,messages" auto="false" allowTypes="/(\.|\/)(gif|jpe?g|png)$/"/> <p:growl id="messages" showDetail="true"/> <p:growl id="uploadMessages" showSummary="true" showDetail="true"/> <h:panelGrid columns="2" > <p:imageCropper value="#{photoUploadAction.croppedImage}" id="getImageId" image="images/#{photoUploadVO.imageName}"/> </h:panelGrid> <p:commandButton value="Crop" update="getImageId" action="#{imageCropperBean.crop}" /> </p:panel> </h:form> BACKING BEAN for ImageCropper: @ManagedBean(name="imageCrop") @RequestScoped public class ImageCropperBean { private CroppedImage croppedImage; private String newFileName; private String imageName; public String getImageName() { return imageName; } public void setImageName(String imageName) { System.out.println("TEH IMAGE NAME ===="+imageName); this.imageName = imageName; } public String getNewFileName() { return newFileName; } public void setNewFileName(String newFileName) { System.out.println("AAAAAAAAAAAAAA"+this.newFileName); this.newFileName = newFileName; } public CroppedImage getCroppedImage() { return croppedImage; } public void setCroppedImage(CroppedImage croppedImage) { System.out.println("cRRRRRRRRRRRRR"+croppedImage); this.croppedImage = croppedImage; } public ImageCropperBean(){ } public String crop() { System.out.println("WELCOMEMMMMMMMMMMMMMM"); FacesContext context = FacesContext.getCurrentInstance(); ImageCropperBean imageCropperBean = (ImageCropperBean) context.getApplication().evaluateExpressionGet(context, "#{imageCropperBean}", ImageCropperBean.class); ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext(); newFileName = servletContext.getRealPath("") + File.separator + "cropImage" + File.separator+ "croppedImage.jpg"; System.out.println("FILE NAME NAME NAME NAME "+newFileName); String file = new File(newFileName).getName(); System.out.println("DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"+file); imageCropperBean.setImageName(file); File fileFolder = new File("e:/Mecherie_project/image_web/WebContent/cropImages",file); System.out.println("FILE ANE"+file); // String target=null; FileImageOutputStream imageOutput; try { imageOutput = new FileImageOutputStream(fileFolder); System.out.println("HHHHHHHHHH=="+imageOutput); imageOutput.write(croppedImage.getBytes(), 0, croppedImage.getBytes().length); imageOutput.close(); FacesMessage msg = new FacesMessage("Succesful", file + " is cropped."); FacesContext.getCurrentInstance().addMessage(null, msg); } catch (FileNotFoundException e) { FacesMessage error = new FacesMessage(FacesMessage.SEVERITY_ERROR, "The files were not Cropped!", ""); FacesContext.getCurrentInstance().addMessage(null, error); e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); FacesMessage error = new FacesMessage(FacesMessage.SEVERITY_ERROR, "The files were not Cropped!", ""); FacesContext.getCurrentInstance().addMessage(null, error); } // System.out.println("ghfhgfghgh"+target); return "success"; } }

    Read the article

  • Not reaction to pressing button

    - by Orange91
    I have a ring in primefaces: <h:form> <p:ring id="ring" value="#{ringBean.images}" var="image" styleClass="image-ring" easing="easeInOutBack"> <p:graphicImage value="./../../images/#{image.image}" width="150" height="150"/> <p:commandButton value="#{image.name}" action="#{image.action}" /> </p:ring> </h:form> My RingBean: @ManagedBean @RequestScoped public class RingBean implements Serializable{ private List<PersonImage> images; private PersonImage selectedPerson; public RingBean() { images = new ArrayList<PersonImage>(); images.add(new PersonImage("person3.png", "Pacjent", "patientList")); images.add(new PersonImage("person4.png", "Admin", "adminList")); images.add(new PersonImage("person5.png", "Lekarz", "doctorList")); images.add(new PersonImage("person6.png", "Sekretarka", "secretaryList")); images.add(new PersonImage("person7.png", "Nieaktywni", "inactiveList")); } public List<PersonImage> getImages() { return images; } public PersonImage getSelectedPerson() { return selectedPerson; } public void setSelectedPerson(PersonImage selectedPerson) { this.selectedPerson = selectedPerson; } } PersonImage class: public class PersonImage { String image; String name; String action; public PersonImage() { } public PersonImage(String image, String name, String action) { this.image = image; this.name = name; this.action = action; } public String getImage() { return image; } public void setImage(String image) { this.image = image; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getAction() { return action; } public void setAction(String action) { this.action = action; } } faces-config: <navigation-case> <from-outcome>adminList</from-outcome> <to-view-id>/protected/admin/adminList.xhtml</to-view-id> <redirect/> </navigation-case> <navigation-case> <from-outcome>doctorList</from-outcome> <to-view-id>/protected/admin/doctorList.xhtml</to-view-id> <redirect/> </navigation-case> <navigation-case> <from-outcome>patientList</from-outcome> <to-view-id>/protected/admin/patientList.xhtml</to-view-id> <redirect/> </navigation-case> <navigation-case> <from-outcome>secretaryList</from-outcome> <to-view-id>/protected/admin/secretaryList.xhtml</to-view-id> <redirect/> </navigation-case> When i pressed my button, not reaction. Why? I added the action in button: And in Ring I add: images.add(new PersonImage("person4.png", "Admin", "adminList")); action is adminList. Why this not work? When i changed in button: <p:commandButton value="#{image.name}" action="adminList" /> all work. Why? Both construction returned identical string.

    Read the article

  • JSF 2.0 Problem

    - by Sarang
    I am doing a project where I am using JSF 2.0 & Primefaces UI Components. There is a tab view component with tabs, "Day","Week" & "Month". In all tab, I have to display Bar Charts in each. For the same, I am fetching three list using the following three method. In the following code, UpdateCountHelper is fetching the data from database. So, UpdateCountHelper is taking some time for fetching data. This is code for fetching lists : public List<UpdateCount> getDayUpdateCounts() { if (projectFlag == true) { if (displayFlag == 1) { dayUpdateCounts = UpdateCountHelper.getProjectUpdates(1); } else { dayUpdateCounts = UpdateCountHelper.getProjectUpdates(name, 1); } } else { dayUpdateCounts = UpdateCountHelper.getResourceUpdates(userName, 1); } return dayUpdateCounts; } public List<UpdateCount> getMonthUpdateCounts() { if (projectFlag == true) { if (displayFlag == 1) { monthUpdateCounts = UpdateCountHelper.getProjectUpdates(30); } else { monthUpdateCounts = UpdateCountHelper.getProjectUpdates(name, 30); } } else { monthUpdateCounts = UpdateCountHelper.getResourceUpdates(userName, 30); } return monthUpdateCounts; } public List<UpdateCount> getWeekUpdateCounts() { if (projectFlag == true) { if (displayFlag == 1) { weekUpdateCounts = UpdateCountHelper.getProjectUpdates(7); } else { weekUpdateCounts = UpdateCountHelper.getProjectUpdates(name, 7); } } else { weekUpdateCounts = UpdateCountHelper.getResourceUpdates(userName, 7); } return weekUpdateCounts; } This is code for UI of Bar Chart : <p:panel id="Chart"> <p:tabView dynamic="false" cache="false"> <p:tab title="Day"> <p:panel id="chartDayPanel"> <center> <h:outputText id="projectWiseDayText" rendered="#{systemUtilizationServiceBean.projectFlag}" value="Project Wise Day Update"/> <p:columnChart id="projectWiseDayUpdateChart" rendered="#{systemUtilizationServiceBean.projectFlag}" value="#{systemUtilizationServiceBean.dayUpdateCounts}" var="dayWiseUpdate" xfield="#{dayWiseUpdate.name}" height="200px" width="640px"> <p:chartSeries label="Project Wise Current Day Update" value="#{dayWiseUpdate.noUpdates}"/> </p:columnChart> <h:outputText id="resourceWiseDayText" rendered="#{systemUtilizationServiceBean.resourceFlag}" value="Resource Wise Day Update"/> <p:columnChart id="resourceWiseDayUpdateChart" rendered="#{systemUtilizationServiceBean.resourceFlag}" value="#{systemUtilizationServiceBean.dayUpdateCounts}" var="dayWiseResourceUpdate" xfield="#{dayWiseResourceUpdate.name}" height="200px" width="640px"> <p:chartSeries label="Resource Wise Current Day Update" value="#{dayWiseResourceUpdate.noUpdates}"/> </p:columnChart> </center> </p:panel> </p:tab> <p:tab title="Week"> <p:panel id="chartWeekPanel"> <center> <h:outputText id="projectWiseWeekText" rendered="#{systemUtilizationServiceBean.projectFlag}" value="Project Wise Week Update"/> <p:columnChart id="projectWiseWeekUpdateChart" rendered="#{systemUtilizationServiceBean.projectFlag}" value="#{systemUtilizationServiceBean.weekUpdateCounts}" var="weekWiseUpdate" xfield="#{weekWiseUpdate.name}" height="200px" width="640px"> <p:chartSeries label="Project Wise Current Week Update" value="#{weekWiseUpdate.noUpdates}"/> </p:columnChart> <h:outputText id="resourceWiseWeekText" rendered="#{systemUtilizationServiceBean.resourceFlag}" value="Resource Wise Week Update"/> <p:columnChart id="resourceWiseWeekUpdateChart" rendered="#{systemUtilizationServiceBean.resourceFlag}" value="#{systemUtilizationServiceBean.weekUpdateCounts}" var="weekWiseResourceUpdate" xfield="#{weekWiseResourceUpdate.name}" height="200px" width="640px"> <p:chartSeries label="Resource Wise Current Week Update" value="#{weekWiseResourceUpdate.noUpdates}"/> </p:columnChart> </center> </p:panel> </p:tab> <p:tab title="Month"> <p:panel id="chartMonthPanel"> <center> <h:outputText id="projectWiseMonthText" rendered="#{systemUtilizationServiceBean.projectFlag}" value="Project Wise Month Update"/> <p:columnChart id="projectWiseMonthUpdateChart" rendered="#{systemUtilizationServiceBean.projectFlag}" value="#{systemUtilizationServiceBean.monthUpdateCounts}" var="monthWiseUpdate" xfield="#{monthWiseUpdate.name}" height="200px" width="640px"> <p:chartSeries label="Project Wise Current Month Update" value="#{monthWiseUpdate.noUpdates}"/> </p:columnChart> <h:outputText id="resourceWiseMonthText" rendered="#{systemUtilizationServiceBean.resourceFlag}" value="Resource Wise Month Update"/> <p:columnChart id="resourceWiseMonthUpdateChart" rendered="#{systemUtilizationServiceBean.resourceFlag}" value="#{systemUtilizationServiceBean.monthUpdateCounts}" var="monthWiseResourceUpdate" xfield="#{monthWiseResourceUpdate.name}" height="200px" width="640px"> <p:chartSeries label="Resource Wise Current Month Update" value="#{monthWiseResourceUpdate.noUpdates}"/> </p:columnChart> </center> </p:panel> </p:tab> </p:tabView> </p:panel> Now, I have to display same data in other tabview with same tabs as mentioned above & only thing is now I have to display in Pie Chart. Now in pie chart, I am using the same lists. So, it will again fetch the data from database & waste time. To solve that problem I have created other three lists & have given only reference of those previous lists. So, now no database fetching occur. The Code for applying the reference is : public List<UpdateCount> getPieDayUpdateCounts() { pieDayUpdateCounts = dayUpdateCounts; return pieDayUpdateCounts; } public List<UpdateCount> getPieMonthUpdateCounts() { pieMonthUpdateCounts = monthUpdateCounts; return pieMonthUpdateCounts; } public List<UpdateCount> getPieWeekUpdateCounts() { pieWeekUpdateCounts = weekUpdateCounts; return pieWeekUpdateCounts; } But, over here the problem occurring is that only chart of which the tab is enable is displayed but the other remaining 2 tabs are not showing any chart. The code for UI is : <p:tabView dynamic="false" cache="false"> <p:tab title="Day"> <center> <p:panel id="pieChartDayPanel"> <h:outputText id="projectWiseDayPieChartText" rendered="#{systemUtilizationServiceBean.projectFlag}" value="Project Wise Day Update"/> <p:pieChart id="projectWiseDayUpdatePieChart" rendered="#{systemUtilizationServiceBean.projectFlag}" value="#{systemUtilizationServiceBean.dayUpdateCounts}" var="dayWisePieUpdate" categoryField="#{dayWisePieUpdate.name}" dataField="#{dayWisePieUpdate.noUpdates}" height="200" width="200"/> <h:outputText id="resourceWiseDayPieChartText" rendered="#{systemUtilizationServiceBean.resourceFlag}" value="Resource Wise Day Update"/> <p:pieChart id="resourceWiseDayUpdatePieChart" rendered="#{systemUtilizationServiceBean.resourceFlag}" value="#{systemUtilizationServiceBean.dayUpdateCounts}" var="dayWiseResourcePieUpdate" categoryField="#{dayWiseResourcePieUpdate.name}" dataField="#{dayWiseResourcePieUpdate.noUpdates}" height="200" width="200"/> </p:panel> </center> </p:tab> <p:tab title="Week"> <center> <p:panel id="pieChartWeekPanel"> <h:outputText id="projectWiseWeekPieChartText" rendered="#{systemUtilizationServiceBean.projectFlag}" value="Project Wise Week Update"/> <p:pieChart id="projectWiseWeekUpdatePieChart" rendered="#{systemUtilizationServiceBean.projectFlag}" value="#{systemUtilizationServiceBean.weekUpdateCounts}" var="weekWisePieUpdate" categoryField="#{weekWisePieUpdate.name}" dataField="#{weekWisePieUpdate.noUpdates}" height="200" width="200"/> <h:outputText id="resourceWiseWeekPieChartText" rendered="#{systemUtilizationServiceBean.resourceFlag}" value="Resource Wise Week Update"/> <p:pieChart id="resourceWiseWeekUpdatePieChart" rendered="#{systemUtilizationServiceBean.resourceFlag}" value="#{systemUtilizationServiceBean.weekUpdateCounts}" var="weekWiseResourcePieUpdate" categoryField="#{weekWiseResourcePieUpdate.name}" dataField="#{weekWiseResourcePieUpdate.noUpdates}" height="200" width="200"/> </p:panel> </center> </p:tab> <p:tab title="Month"> <center> <p:panel id="pieChartMonthPanel"> <h:outputText id="projectWiseMonthPieChartText" rendered="#{systemUtilizationServiceBean.projectFlag}" value="Project Wise Month Update"/> <p:pieChart id="projectWiseMonthUpdatePieChart" rendered="#{systemUtilizationServiceBean.projectFlag}" value="#{systemUtilizationServiceBean.monthUpdateCounts}" var="monthWisePieUpdate" categoryField="#{monthWisePieUpdate.name}" dataField="#{monthWisePieUpdate.noUpdates}" height="200" width="200"/> <h:outputText id="resourceWiseMonthPieChartText" rendered="#{systemUtilizationServiceBean.resourceFlag}" value="Resource Wise Month Update"/> <p:pieChart id="resourceWiseMonthUpdatePieChart" rendered="#{systemUtilizationServiceBean.resourceFlag}" value="#{systemUtilizationServiceBean.monthUpdateCounts}" var="monthWiseResourcePieUpdate" categoryField="#{monthWiseResourcePieUpdate.name}" dataField="#{monthWiseResourcePieUpdate.noUpdates}" height="200" width="200"/> </p:panel> </center> </p:tab> </p:tabView> What should be the reason behind this ?

    Read the article

  • Exception Servlets have the same pattern, how to solve?

    - by user3713766
    This is my web xml: <?xml version="1.0" encoding="UTF-8"?> <web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd"> <context-param> <param-name>primefaces.THEME</param-name> <param-value>cc</param-value> </context-param> <context-param> <param-name>javax.faces.PROJECT_STAGE</param-name> <param-value>Development</param-value> </context-param> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>Faces Servlet</servlet-name> <url-pattern>*.xhtml</url-pattern> </servlet-mapping> <session-config> <session-timeout> -1 </session-timeout> </session-config> <welcome-file-list> <welcome-file>index.xhtml</welcome-file> </welcome-file-list> </web-app> Below is my glassfish server output. So what causes that exception and what are my options? Any help would be appreciated. It seems like I posted most of code but, I've stated my problem quite clearly.So thanks in advance. Severe: Servlet [CoordinatorPortImpl] and Servlet [ParticipantPortImpl] have the same url pattern: [/WSAT11Service] Severe: Exception while deploying the app [ClickService] Severe: Exception during lifecycle processing java.lang.IllegalStateException: Servlet [CoordinatorPortImpl] and Servlet [ParticipantPortImpl] have the same url pattern: [/WSAT11Service]. Related annotation information: annotation [@javax.jws.WebService(wsdlLocation=/wsdls/wsat11/wstx-wsat-1.1-wsdl-200702.wsdl, name=, portName=ParticipantPort, endpointInterface=com.sun.xml.ws.tx.at.v11.types.ParticipantPortType, serviceName=WSAT11Service, targetNamespace=http://docs.oasis-open.org/ws-tx/wsat/2006/06)] on annotated element [class com.sun.xml.ws.tx.at.v11.endpoint.ParticipantPortImpl] of type [TYPE] at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:518) at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:446) at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:338) at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:91) at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:420) at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241) at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161) at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:198) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:222) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96) at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:878) at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:818) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:374) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:360) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534) at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224) at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246) at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544) at java.lang.Thread.run(Thread.java:745) Caused by: Servlet [CoordinatorPortImpl] and Servlet [ParticipantPortImpl] have the same url pattern: [/WSAT11Service]. Related annotation information: annotation [@javax.jws.WebService(wsdlLocation=/wsdls/wsat11/wstx-wsat-1.1-wsdl-200702.wsdl, name=, portName=ParticipantPort, endpointInterface=com.sun.xml.ws.tx.at.v11.types.ParticipantPortType, serviceName=WSAT11Service, targetNamespace=http://docs.oasis-open.org/ws-tx/wsat/2006/06)] on annotated element [class com.sun.xml.ws.tx.at.v11.endpoint.ParticipantPortImpl] of type [TYPE] at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:367) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:375) at org.glassfish.apf.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:289) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:195) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:134) at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:626) at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:462) ... 48 more Caused by: java.lang.IllegalArgumentException: Servlet [CoordinatorPortImpl] and Servlet [ParticipantPortImpl] have the same url pattern: [/WSAT11Service] at org.glassfish.web.deployment.descriptor.WebBundleDescriptorImpl.addWebComponentDescriptor(WebBundleDescriptorImpl.java:359) at org.glassfish.webservices.connector.annotation.handlers.WebServiceHandler.processAnnotation(WebServiceHandler.java:461) at com.sun.enterprise.deployment.annotation.factory.SJSASFactory$LazyAnnotationHandler.processAnnotation(SJSASFactory.java:148) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:344) ... 54 more Severe: Exception while deploying the app [ClickService] : Servlet [CoordinatorPortImpl] and Servlet [ParticipantPortImpl] have the same url pattern: [/WSAT11Service]. Related annotation information: annotation [@javax.jws.WebService(wsdlLocation=/wsdls/wsat11/wstx-wsat-1.1-wsdl-200702.wsdl, name=, portName=ParticipantPort, endpointInterface=com.sun.xml.ws.tx.at.v11.types.ParticipantPortType, serviceName=WSAT11Service, targetNamespace=http://docs.oasis-open.org/ws-tx/wsat/2006/06)] on annotated element [class com.sun.xml.ws.tx.at.v11.endpoint.ParticipantPortImpl] of type [TYPE] Servlet [CoordinatorPortImpl] and Servlet [ParticipantPortImpl] have the same url pattern: [/WSAT11Service]. Related annotation information: annotation [@javax.jws.WebService(wsdlLocation=/wsdls/wsat11/wstx-wsat-1.1-wsdl-200702.wsdl, name=, portName=ParticipantPort, endpointInterface=com.sun.xml.ws.tx.at.v11.types.ParticipantPortType, serviceName=WSAT11Service, targetNamespace=http://docs.oasis-open.org/ws-tx/wsat/2006/06)] on annotated element [class com.sun.xml.ws.tx.at.v11.endpoint.ParticipantPortImpl] of type [TYPE] at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:367) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:375) at org.glassfish.apf.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:289) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:195) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:134) at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:626) at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:462) at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:446) at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:338) at org.glassfish.web.deployment.archivist.WebArchivist.postAnnotationProcess(WebArchivist.java:91) at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:420) at com.sun.enterprise.deployment.archivist.Archivist.readDeploymentDescriptors(Archivist.java:396) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:271) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:280) at com.sun.enterprise.deployment.archivist.Archivist.open(Archivist.java:241) at com.sun.enterprise.deployment.archivist.ApplicationFactory.openArchive(ApplicationFactory.java:161) at org.glassfish.javaee.core.deployment.DolProvider.processDOL(DolProvider.java:198) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:222) at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:96) at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:878) at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:818) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:374) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219) at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:360) at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546) at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423) at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762) at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674) at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:534) at com.sun.enterprise.v3.admin.AdminAdapter.onMissingResource(AdminAdapter.java:224) at org.glassfish.grizzly.http.server.StaticHttpHandler.service(StaticHttpHandler.java:297) at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246) at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191) at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168) at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189) at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288) at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206) at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136) at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114) at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55) at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalArgumentException: Servlet [CoordinatorPortImpl] and Servlet [ParticipantPortImpl] have the same url pattern: [/WSAT11Service] at org.glassfish.web.deployment.descriptor.WebBundleDescriptorImpl.addWebComponentDescriptor(WebBundleDescriptorImpl.java:359) at org.glassfish.webservices.connector.annotation.handlers.WebServiceHandler.processAnnotation(WebServiceHandler.java:461) at com.sun.enterprise.deployment.annotation.factory.SJSASFactory$LazyAnnotationHandler.processAnnotation(SJSASFactory.java:148) at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:344) ... 54 more

    Read the article

  • JSF: how to update the list after delete an item of that list

    - by Harry Pham
    It will take a moment for me to explain this, so please stay with me. I have table COMMENT that has OneToMany relationship with itself. @Entity public class Comment(){ ... @ManyToOne(optional=true, fetch=FetchType.LAZY) @JoinColumn(name="REPLYTO_ID") private Comment replyTo; @OneToMany(mappedBy="replyTo", cascade=CascadeType.ALL) private List<Comment> replies = new ArrayList<Comment>(); public void addReply(NewsFeed reply){ replies.add(reply); reply.setReplyTo(this); } public void removeReply(NewsFeed reply){ replies.remove(reply); } } So you can think like this. Each comment can have a List of replies which are also type Comment. Now it is very easy for me to delete the original comment and get the updated list back. All I need to do after delete is this. allComments = myEJB.getAllComments(); //This will query the db and return updated list But I am having problem when trying to delete replies and getting the updated list back. So here is how I delete the replies. Inside my managed bean I have //Before invoke this method, I have the value of originalFeed, and deletedFeed set. //These original comments are display inside a p:dataTable X, and the replies are //displayed inside p:dataTable Y which is inside X. So when I click the delete button //I know which comment I want to delete, and if it is the replies, I will know //which one is its original post public void deleteFeed(){ if(this.deletedFeed != null){ scholarEJB.deleteFeeds(this.deletedFeed); if(this.originalFeed != null){ //Since the originalFeed is not null, this is the `replies` //that I want to delete scholarEJB.removeReply(this.originalFeed, this.deletedFeed); } feeds = scholarEJB.findAllFeed(); } } Then inside my EJB scholarEJB, I have public void removeReply(NewsFeed comment, NewsFeed reply){ comment = em.merge(comment); comment.removeReply(reply); em.persist(comment); } public void deleteFeeds(NewsFeed e){ e = em.find(NewsFeed.class, e.getId()); em.remove(e); } When I get out, the entity (the reply) get correctly removed from the database, but inside the feeds List, reference of that reply still there. It only until I log out and log back in that the reply disappear. Please help

    Read the article

  • JSF: Avoid nested update calls

    - by dhroove
    I don't know if I am on right track or not still asking this question. I my JSF project I have this tree structure: <p:tree id="resourcesTree" value="#{someBean.root}" var="node" selectionMode="single" styleClass="no-border" selection="#{someBean.selectedNode}" dynamic="true"> <p:ajax listener="#{someBean.onNodeSelect}" update=":centerPanel :tableForm :tabForm" event="select" onstart="statusDialog.show();" oncomplete="statusDialog.hide();" /> <p:treeNode id="resourcesTreeNode" > <h:outputText value="#{node}" id="lblNode" /> </p:treeNode> </p:tree> I have to update this tree after I added something or delete something.. But whenever I update this still its nested update also call I mean to say it also call to update these components ":centerPanel :tableForm :tabForm"... This give me error that :tableForm not found in view because this forms load in my central panel and this tree is in my right panel.. So when I am doing some operation on tree is it not always that :tableForm is in my central panel.. (I mean design is something like this only) So now my question is that can I put some condition or there is any way so that I can specify when to update nested components also and when not.... In nut shell is there any way to update only :resoucesTree is such a way that nested updates are not called so that I can avoid error... Thanks in advance.

    Read the article

  • EJB / JSF java.lang.ClassNotFoundException: com.ericsantanna.jobFC.dao.DAOFactoryRemote from [Module "com.sun.jsf-impl:main" from local module loader

    - by Eric Sant'Anna
    I'm in my first time using EJB and JSF, and I can't resolve this: 20:23:12,457 Grave [javax.enterprise.resource.webcontainer.jsf.application] (http-localhost-127.0.0.1-8081-2) com.ericsantanna.jobFC.dao.DAOFactoryRemote from [Module "com.sun.jsf-impl:main" from local module loader @439db2b2 (roots: C:\jboss-as-7.1.1.Final\modules)]: java.lang.ClassNotFoundException: com.ericsantanna.jobFC.dao.DAOFactoryRemote from [Module "com.sun.jsf-impl:main" from local module loader @439db2b2 (roots: C:\jboss-as-7.1.1.Final\modules)] I'm getting this when I do an action like a selectOneMenu or a commandButton click. DAOFactory.class @Singleton @Remote(DAOFactoryRemote.class) public class DAOFactory implements DAOFactoryRemote { private static final long serialVersionUID = 6030538139815885895L; @PersistenceContext private EntityManager entityManager; @EJB private JobDAORemote jobDAORemote; /** * Default constructor. */ public DAOFactory() { // TODO Auto-generated constructor stub } @Override public JobDAORemote getJobDAO() { JobDAO jobDAO = (JobDAO) jobDAORemote; jobDAO.setEntityManager(entityManager); return jobDAO; } JobDAO.class @Stateless @Remote(JobDAORemote.class) public class JobDAO implements JobDAORemote { private static final long serialVersionUID = -5483992924812255349L; private EntityManager entityManager; /** * Default constructor. */ public JobDAO() { // TODO Auto-generated constructor stub } @Override public void insert(Job t) { entityManager.persist(t); } @Override public Job findById(Class<Job> classe, Long id) { return entityManager.getReference(classe, id); } @Override public Job findByName(Class<Job> clazz, String name) { return entityManager .createQuery("SELECT job FROM " + clazz.getName() + " job WHERE job.nome = :nome" , Job.class) .setParameter("name", name) .getSingleResult(); } ... TriggerFormBean.class @ManagedBean @ViewScoped @Stateless public class TriggerFormBean implements Serializable { private static final long serialVersionUID = -3293560384606586480L; @EJB private DAOFactoryRemote daoFactory; @EJB private TriggerManagerRemote triggerManagerRemote; ... triggerForm.xhtml (a portion with problem) </p:layoutUnit> <p:layoutUnit id="eastConditionPanel" position="center" size="50%"> <p:panel header="Conditions to Release" style="width:97%;height:97%;"> <h:panelGrid columns="2" cellpadding="3"> <h:outputLabel value="Condition Name:" for="conditionName" /> <p:inputText id="conditionName" value="#{triggerFormBean.newCondition.name}" /> </h:panelGrid> <p:commandButton value="Add Condition" update="conditionsToReleaseList" id="addConditionToRelease" actionListener="#{triggerFormBean.addNewCondition}" /> <p:orderList id="conditionsToReleaseList" value="#{triggerFormBean.trigger.conditionsToRelease}" var="condition" controlsLocation="none" itemLabel="#{condition.name}" itemValue="#{condition}" iconOnly="true" style="width:97%;heigth:97%;"/> </p:panel> </p:layoutUnit> In TriggerFormBean.class if comments daoFactory we get the same exception with triggerManagerRemote, both annotated with @EJB. I'm don't understand the relationship between my DAOFactory and the "Module com.sun.jsf-impl:main"... Thanks.

    Read the article

  • p:commandButton update doesn't work in ui:include

    - by Roberto de Santis
    Hi guys. I want to update a part of a page by PPR. This is the part of page that i want to update: <h:panelGroup id="aggiungiAuto" rendered="#{!autoBean.operazioneOk}"> <ui:include src="../component/aggiungi_auto.xhtml"/> </h:panelGroup> While this is the commandButton present in aggiungi_auto.xhtml <p:commandButton value="Submit" update="growl aggiungiAuto aggiungiFoto" actionListener="#{autoBean.insert}"/> Any Idea?

    Read the article

  • refresh a <ui:composition when j_security_check connection interrupted (http 408)

    - by José Osuna Barrios
    I have a "j_security_check connection interrupted (http code 408)" and proposed solution is <meta http-equiv="refresh" content="#{session.maxInactiveInterval}"/> by http://stackoverflow.com/a/2141274/1852036 but my page structure is a composition using a template.xhtml and a view.xhtml like a <ui:composition: my template.xhtml: <html ... <f:view ... <h:body ... <ui:insert name="content"> ... my view.xhtml to refresh when session.maxInactiveInterval <ui:composition ... <ui:define name="content"> ... may anyone help me to do this? I want to refresh this <ui:composition view, I can't use <meta http-equiv="refresh" content="#{session.maxInactiveInterval}"/> on template.xhtml because it's used by several views

    Read the article

  • graph with database

    - by Flip_novidade
    I need to make two graphs with data coming from the database. I do not know where I am going wrong. If someone can show me the correct way, or provide any examples. must be two graphs, a graph of a specific student another graph of all students thank you public class NotasBean { private Notas notas; private Notas selectedNotas; private List<Notas> filtroNotass; public Notas getNotas() { return notas; } public void setNotas(Notas notas) { this.notas = notas; } public Notas getSelectedNotas() { return selectedNotas; } public void setSelectedNotas(Notas selectedNotas) { this.selectedNotas = selectedNotas; } public List<Notas> getFiltroNotass() { return filtroNotass; } public void setFiltroNotass(List<Notas> filtroNotass) { this.filtroNotass = filtroNotass; } public void prepararAdicionarNotas(){ notas = new Notas(); } public void adicionarNotas(){ dao.NotasDao obj_dao = new dao.NotasDao(); obj_dao.save(notas); } } package dao; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Statement; import java.util.ArrayList; import java.util.List; import javax.faces.application.FacesMessage; import javax.faces.context.FacesContext; import model.Aluno; import model.Notas; import model.Notas; public class NotasDao { private Conexao obj_conexao; public NotasDao() { obj_conexao = new Conexao(); } public List<Notas> list() { List<Notas> array_registros = new ArrayList<Notas>(); try { String sql = "Select alu_in_ra, dis_st_sigla, ald_fl_p1, ald_fl_p2, ald_fl_p3, ald_fl_trab1, ald_fl_trab2 from cad_aluno_disciplina"; Statement comando_sql = (Statement) obj_conexao.getConexao() .createStatement(); ResultSet obj_result = comando_sql.executeQuery(sql); while (obj_result.next()) { Notas obj_notas = new Notas(); obj_notas.setAlura(obj_result.getInt("alu_in_ra")); obj_notas.setDiscsigla(obj_result.getString("dis_st_sigla")); obj_notas.setP1(obj_result.getInt("ald_fl_p1")); obj_notas.setP2(obj_result.getInt("ald_fl_p2")); obj_notas.setP3(obj_result.getInt("ald_fl_p3")); obj_notas.setTrb1(obj_result.getInt("ald_fl_trab1")); obj_notas.setTrb2(obj_result.getInt("ald_fl_trab2")); array_registros.add(obj_notas); } } catch (Exception e) { System.out.println("Erro no select" + e.getMessage()); } finally { obj_conexao.fecharConexao(); } return array_registros; } public void select(Aluno obj_aluno){ FacesContext mensagem = FacesContext.getCurrentInstance(); try{ String comando_sql = "Select alu_in_ra, dis_st_sigla, ald_fl_p1, ald_fl_p2, ald_fl_p3, ald_fl_trab1, ald_fl_trab2 from cad_aluno_disciplina where alu_in_ra=?"; PreparedStatement obj_sql = (PreparedStatement) obj_conexao.getConexao().prepareStatement(comando_sql); obj_sql.setInt(1, obj_aluno.getRa()); obj_sql.executeUpdate(); mensagem.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN, "Erro ao selecionar aluno!","Snif")); }catch(Exception e){ mensagem.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, "Erro na inclusão: "+e.getMessage()," Ocoreu o erro: "+e.getMessage())); }finally{ obj_conexao.fecharConexao(); } return; } }//fecha a classe package model; import java.io.Serializable; public class Notas implements Serializable{ private static final long serialVersionUID = 1L; private int alura; private String discsigla; private float p1; private float p2; private float p3; private float trb1; private float trb2; public Notas() { } public Notas (int alura, String discsigla, float p1, float p2, float p3, float trb1, float trb2){ super(); this.alura=alura; this.discsigla=discsigla; this.p1=p1; this.p2=p2; this.p3=p3; this.trb1=trb1; this.trb2=trb2; } public int getAlura() { return alura; } public void setAlura(int alura) { this.alura = alura; } public String getDiscsigla() { return discsigla; } public void setDiscsigla(String discsigla) { this.discsigla = discsigla; } public float getP1() { return p1; } public void setP1(float p1) { this.p1 = p1; } public float getP2() { return p2; } public void setP2(float p2) { this.p2 = p2; } public float getP3() { return p3; } public void setP3(float p3) { this.p3 = p3; } public float getTrb1() { return trb1; } public void setTrb1(float trb1) { this.trb1 = trb1; } public float getTrb2() { return trb2; } public void setTrb2(float trb2) { this.trb2 = trb2; } } <p:panel header="Grafico Notas Aluno" style="width: 550px"> <p:lineChart id="linear" value="#{notasDao.aluno.alura}" var="notas" xfield="#{notas.alura}" height="300px" width="500px" style="chartStyle"> <p:chartSeries label="Prova 1" value="#{notas.p1}" /> <p:chartSeries label="Prova 2" value="#{notas.p2}" /> <p:chartSeries label="Prova 3" value="#{notas.p3}" /> <p:chartSeries label="Trabalho 1" value="#{notas.trb1}" /> <p:chartSeries label="Trabalho 2" value="#{notas.trb2}" /> </p:lineChart> </p:panel> <p:panel header="Grafico Notas" style="width: 550px"> <p:lineChart id="linear" value="#{notasDao.natas}" var="notas" xfield="#{notas.p1}" height="300px" width="500px" style="chartStyle"> <p:chartSeries label="Prova 1" value="#{notas.p1}" /> <p:chartSeries label="Prova 2" value="#{notas.p2}" /> <p:chartSeries label="Prova 3" value="#{notas.p3}" /> <p:chartSeries label="Trabalho 1" value="#{notas.trb1}" /> <p:chartSeries label="Trabalho 2" value="#{notas.trb2}" /> </p:lineChart> </p:panel>

    Read the article

< Previous Page | 1 2 3 4  | Next Page >