jsf-2.2

Setting headers on redirected external URL

三世轮回 提交于 2019-12-13 07:35:42
问题 Is it possible that a jsf application can navigate to an external link and specify headers for that external link? So far I have tried to call in the backing bean method: ExternalContext#setResponseHeader(java.lang.String name, java.lang.String value) ExternalContext#redirect(java.lang.String url) The redicection is successfully executed but the Headers are lost. Is there any way to specify a link accompanied with the headers? 回答1: No, HTTP doesn't allow setting headers on a different request

FilterBy using column doesn't work in primefaces 5.3

不羁的心 提交于 2019-12-13 07:17:55
问题 Here is the source code of my .xhtml file when the datatable appears i try to filter by id in olumn it doesn't work. I have looked for the solution and i found that there is another mechanism in primefaces 5.3 that i don't understand please if you can help me. I'm newbie to primesfaces and JSF Thank you <p:column filterBy="#{student.id}" filterMatchMode="contains"> <f:facet name="header"> <h:outputText value="Id" /> </f:facet> <h:outputText value="#{student.id}" /> </p:column> 来源: https:/

When I use o:graphicImage, the image is not displayed

坚强是说给别人听的谎言 提交于 2019-12-13 07:08:17
问题 I can´t display images from my database, they are stored as bytea and I am mapping them like this: @Entity @Table(name = "photograph", schema = "public") public class Photograph{ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "photograph_id", unique = true, nullable = false) private Long id; @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "diagnostic_id", nullable = false, insertable = false, updatable = false) private Diagnostic diagnostic; @Column(name =

How to add custom markers Gmap

自闭症网瘾萝莉.ら 提交于 2019-12-13 06:59:57
问题 I'm looking how to add specific markers to my gmap. This is the code: LatLng coord1 = new LatLng (y, x); advancedModel.addOverlay(new Marker(coord1, "test", "orange.png", "http://maps.google.com/mapfiles/ms/micons/blue-dot.png")); I want to add my specific marker which is in /resources/images not this one http://maps.google.com/mapfiles/ms/micons/blue-dot.png Can you help? 回答1: You can add custom markers in Google Maps and you can also change the marker icon, depending on the type of feature

h:inputtext not working with multiple forms in JSF2.2

半世苍凉 提交于 2019-12-13 06:49:58
问题 h:inputText is not working in the latest JSF2.2 with multiple forms. I have 2 forms form1 have: one command button and one input text form2 has: one input text and one output label on click of command button in form1, i am rendering the form2(both outputlabel and input text). but only output label is rendered properly with correct values (corresponding getter method gets called and value is displaying) but the input text is not calling the corresponding getter method hence showing null. Note:

How to escape f:selectItems itemLabel attribute

牧云@^-^@ 提交于 2019-12-13 06:35:40
问题 How do I escape f:selectItems itemLabel to use HTML markup? Below is the code <h:selectManyListbox id="geographicLoc" value="#{handlerBean.selectedGeographicLoc}"> <a4j:ajax event="change" render="citiesID" status="newState" /> <f:selectItem itemLabel="All   All" itemValue="All" itemEscaped="false"/> <f:selectItems value="#{handlerBean.geographicLocList}" itemEscaped="false"/> </h:selectManyListbox> The attribute itemEscaped is working for f:selectItem but not for f:selectItems. In

Ajax not working JSF 2.2

孤人 提交于 2019-12-13 06:28:27
问题 I'm using JSF 2.2 with TomCat 6. When I execute an ajax function the fields are not updated. I created a new project with just one controller and page even so, the ajax calls doesn't work. It calls the method but doesn't update the page. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:ui="http:/

WELD-001303: No active contexts for scope type javax.enterprise.context.RequestScoped

老子叫甜甜 提交于 2019-12-13 05:07:25
问题 Using NetBeans 8.2 with JSF2.2 on GlassFish4.1.1 , without ( Prime || ICE || Rich ) && faces :) I have NB configured so every time I save any file, it re-deploys the project so the changes are "automatically" reflected when F5 on the browser. This is done by checking Deploy on save under Right click on project icon > Properties > Run , which If selected, files are compiled and deployed when you save them. This option saves you time when you run or debug your application in the IDE. So far,

How to remove specific FacesMessage from FacesContext?

冷暖自知 提交于 2019-12-13 03:38:06
问题 How can we delete a specific FacesMessage from FacesContext . Lets say I have list which contains two FacesMessages whose detail( getDetail() ) is Mandatory Fields and Invalid Account Number and I want to delete Mandatory Fields FacesMessage . Below is my sample code : ListIterator<?> cmessages = context.getMessageList().listIterator(); cmessages.hasPrevious(); while (cmessages.hasNext() && cmessages!=null) { FacesMessage msg =(FacesMessage) ((cmessages.next() instanceof FacesMessage)

How can I embed an SVG image using JSF/OmniFaces/PrimeFaces?

自作多情 提交于 2019-12-13 01:50:41
问题 Here's what I'm trying to do: I have a @ViewScoped JSF bean in which I call a JAX-RS service using Jersey. The resource I'm requesting returns a response with content-type image/svg+xml . Display it in a Facelet page. My research so far has lead me to believe: h:graphicImage (Core JSF) does not support SVG p:graphicImage (PrimeFaces) does not support SVG o:graphicImage (OmniFaces) does not support SVG either. Is there no way to deliver an SVG image to a facelets page from a backing bean? The