primefaces

Update a component in parent window from a dialog of PrimeFaces Dialog Framework

倖福魔咒の 提交于 2021-02-07 07:56:11
问题 I am using PF dialog framework to open a dialog. public void addSpecFeatures(){ genericFeatures = new GenericFeatures(); Map<String,Object> options = new HashMap<String, Object>(); options.put("resizable", false); options.put("draggable", false); options.put("modal", true); options.put("widgetVar", "featureDialog"); RequestContext.getCurrentInstance().openDialog("PAGEName", options, null); } From the dialog I would like to update a component in the parent page. So, I tried below code public

Update a component in parent window from a dialog of PrimeFaces Dialog Framework

南楼画角 提交于 2021-02-07 07:55:57
问题 I am using PF dialog framework to open a dialog. public void addSpecFeatures(){ genericFeatures = new GenericFeatures(); Map<String,Object> options = new HashMap<String, Object>(); options.put("resizable", false); options.put("draggable", false); options.put("modal", true); options.put("widgetVar", "featureDialog"); RequestContext.getCurrentInstance().openDialog("PAGEName", options, null); } From the dialog I would like to update a component in the parent page. So, I tried below code public

Email validation- characters length before @ and before dot

六眼飞鱼酱① 提交于 2021-02-04 07:53:07
问题 I use the following regex pattern for validating the email address that works fine, BUT I need to validate the length of characters before @ , which should NOT be less than 4 characters. The same rule I should put for the length of characters after @ and before dot . . For example, this email address is NOT valid: a@b.c However, this one should be valid: abcd@abcd.com How can I do it? Here is my current attempt: <ui:define name="validation-tag"> <f:validateRegex pattern="([\w\.-]*[a-zA-Z0-9_]

Add a custom button to the Quill's toolbar (and integrate it also on the PrimeFaces Text Editor)?

别说谁变了你拦得住时间么 提交于 2021-01-29 21:58:56
问题 I am using PrimeFaces 7 and its TextEditor component, which uses internally the free and open-source editor Quill I need to add a custom HTML button, which, when selected, inserts the word selected on the current position of the cursor in the TextEditor - (in the Quill) It is possible to add custom buttons in the Quill Editor and to attach EventListeners to them, as shown here: https://quilljs.com/docs/modules/toolbar/ (Please look at this part of the above page): var customButton = document

Passing parameter from xhtml through p:remoteCommand to java bean not working

為{幸葍}努か 提交于 2021-01-29 06:45:59
问题 I'm using p:fileUpload component from which I need to pass to java bean class, number of files which will be uploaded. Count of files is available here PrimeFaces.widgets.<widget_name>.files.length . So I'm trying to pass this value to java bean through p:remoteCommand , but for some reason method defined in action parameter is called, but parameter is not passed. I'm using Primefaces 2.1 ... I know that is prehistorical version, but I need to fix one bug in application which is using this

No redirection after button click

戏子无情 提交于 2021-01-28 22:03:25
问题 I am new to jsf and trying to build app. Problem is when i click Login commandButton nothing happens. So i input some print lines and it show's me that connection with database exist and arguments are valid but it wont redirect. Here is index.xhtml <?xml version='1.0' encoding='UTF-8' ?> <!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://xmlns.jcp.org/jsf/html"

Scan a QR code and decode it using p:photoCam

半腔热情 提交于 2021-01-28 21:19:51
问题 I need to capture and read a QR Code while the camera is capturing, all of this in a JSF Application. I have already read a QR Code in a photo, but for now I have to make it "alive". Anyone has any suggestion? I'm trying to use the p:photoCam of PrimeFaces. This is the method, using Zxing to read the QR code: /** * * @param filePath * @param charset * @param hintMap * * @return Qr Code value * * @throws FileNotFoundException * @throws IOException * @throws NotFoundException */ public static

Error on integrating Primefaces with Springboot/JoinFaces

寵の児 提交于 2021-01-28 17:43:39
问题 I´m trying to create an application that integrates primefaces with spring boot following these tutorials: https://medium.com/@tsepomaleka/integrating-spring-boot-with-java-server-faces-using-joinfaces-297e64f6a28f https://codenotfound.com/jsf-primefaces-example.html And i added the joinfaces as the tutorial suggests: This is my pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi

PrimeFaces 7.0 <p:textEditor HTML-sanitizer discards text formatting, such as centering

久未见 提交于 2021-01-28 13:52:56
问题 In PrimeFaces 8, it seems to be possible to enable / disable HMTML -sanitizer when using the <p:textEditor component by just specifying secure='false' for disabling it and secure='true' for enabling it. I tried to disable it in PrimeFaces 7.0 like this: <p:textEditor id="quillToolbarId" secure='false' widgetVar="editor2" height="300" value="#{editTemplatesBean.kaufAnbotTemplate}" placeholder="Enter your content"> but the sanitizer still seems to be working. My problem is that whenever I

Children component does not contain id parent in facet

ぐ巨炮叔叔 提交于 2021-01-28 05:26:20
问题 In a datatable there is the possibility to define custom facet. The facet I'm trying to define contains one p:menubutton , because those facets are contained in a paginator, p:menubutton is display on top and bottom of the datatable. First issue was, client id was duplicated (and i couldn't open the menubutton) . I fixed this issue by setting a specific id, see https://github.com/primefaces/primefaces/pull/2651/files, but works partially... Because, if a put two p:menubutton (or another