richfaces

Auto refresh in JSF using Ajax

时光毁灭记忆、已成空白 提交于 2019-12-08 04:11:29
问题 I am using this code in my .xhtml page In head tag, i am using for refresh purpose, <script type="text/javascript"> alert("hi"); setInterval(function() { document.getElementById('myForm:btnLoadData').submit(); alert("Hello"); }, 3000); </script> and inside ui:define tag i am writing this code. <h:panelGroup id="divData" layout="block"> //my jsf code.................. </h:panelGroup> <h:form id="myForm"> <h:commandButton id="btnLoadData" value="Hidden" style="display:none"> <f:ajax execute="

How to access a parameter in a4j:jsFunction's oncomplete attribute

╄→гoц情女王★ 提交于 2019-12-08 04:07:37
问题 Is there any way to access a parameter for a <a4j:jsFunction> in the oncomplete="" attribute of it, without using the action="" attribute and assingTo="" of <a4j:param> ? <a4j:jsFunction name="refreshTableFilter" render="table,scroller" execute="@form" oncomplete="setCursor(componentId);"> <a4j:param name="componentId" /> </a4j:jsFunction> I'm looking for a way to access the <a4j:param> directly. I don't need the parameter in a BackingBean and I don't need the action="" attribute. UPDATE My

How do I use the latest version of jQuery and get back the '$' for jQuery in RichFaces?

a 夏天 提交于 2019-12-08 03:43:49
问题 RichFaces 3.3.3 comes baked in with jQuery 1.3.2 and prototype and scriptaculous as well. How can I try and use the latest version of jQuery? Can I use the Google CDN one? Also the $() object is defaulted to prorotype and to use jQuery I have to do jQuery() is there a way to get back the $ for jQuery without breaking RichFaces? UPDATE: You can use multiple versions of jQuery side by side. For now, I've gone ahead and used the version that comes baked with RichFaces. 回答1: You can use $ with

ReRender an uploaded image (a4j:mediaOutput)

一世执手 提交于 2019-12-08 03:30:38
问题 I would like to display an uploaded image via ajax (in a a4j:mediaOuput tag) after uploading but I can't rerender the a4j:mediaOutput tag: <h:form enctype="multipart/form-data"> <a4j:jsFunction name="refreshPic" reRender="picHolder" /> <p:fileUpload mode="advanced" fileLimit="1" multiple="false" allowTypes="/(\.|\/)(gif|jpe?g|png)$/" auto="true" fileUploadListener="#{createSopController.fileChanged}" oncomplete="refreshPic()" /> <a4j:outputPanel id="picHolder"> <a4j:mediaOutput id="pic"

Unable to find matching navigation case from composite component

限于喜欢 提交于 2019-12-08 03:09:56
问题 I have a composite component button and the action is coming from an attribute. <comp:interface> <comp:attribute name="buttonId" required="false"/> <comp:attribute name="action" required="false" method-signature="java.lang.String action()"/> <comp:attribute name="alt"/> <comp:attribute name="value" /> <comp:attribute name="immediate"/> </comp:interface> <comp:implementation> <h:commandButton alt="#{cc.attrs.alt}" action="#{cc.attrs.action}" value="#{cc.attrs.value}" id="#{cc.attrs.buttonId}"

How to use a4j:mediaOutput correctly for displaying images?

家住魔仙堡 提交于 2019-12-08 02:58:30
问题 Using the code below I can't get the image in the web page. I'm not sure if I understand the documentation in the right way and I'm not able to find any problem with this code. BEAN @ManagedBean(name = "imageBean") @RequestScoped public class ImageBean { public void paint(OutputStream os, Object data) throws IOException { BinaryContent content = (BinaryContent) data; BufferedImage image = ImageIO.read(new ByteArrayInputStream(content.getContent())); ImageIO.write(image, "jpg", os); } } PAGE

Richfaces Compatibility Problems with Internet Explorer 11

痴心易碎 提交于 2019-12-08 01:54:39
问题 I am developing a web application using RichFaces / JSF. The application behaved as expected on Safari, Mozilla, Chrome, and IE 9, however, I encountered serious compatibility problems with IE 11. When a rich:modalPanel opens up, the dialog and buttons are completely greyed out. The h:inputTextArea displays all of the server side code generated as opposed to being empty. When I click the rich:calendar icon, it does not popup a calendar, even though I have set popup to true in the attributes.

How to change the suggestion made by the richfaces combobox?

爱⌒轻易说出口 提交于 2019-12-08 01:48:48
问题 I'm currently playing with the richfaces comboBox. You can check is here I would like to know if there a way change how the suggestion are made in the combo box, instead of suggesting juste word that start with the same letter it would suggest word that have other word starting with that letter or combination of letter. Here a example from the demo: From the current combo box if I type "Mo" the combo show Mongomery and " Monpelier" but I would like it to detect "Des Moines" has well since

What are the difference between a4j:outputpanel and a4j:region?

感情迁移 提交于 2019-12-08 01:12:44
问题 The question says all what is important. When it is necessary to use a a4J:outputpanel and when a4j:region? 回答1: The documentation says it all: The <a4j:region> component specifies a part of the JSF component tree to be processed on the server. The region causes all the a4j and rich Ajax controls to execute: decoding, validating, and updating the model. The region causes these components to execute even if not explicitly declared. As such, processing areas can more easily be marked using a

JQuery, JSF and a4j:commandLink

强颜欢笑 提交于 2019-12-08 01:01:56
问题 I have a problem with using jQuery Dialog and Ajax submit in JSF. I have the following code for displaying Dialog windows: <script type="text/javascript"> jQuery(function(){ // Dialog jQuery('#dialog').dialog({ dialogClass: 'alert', autoOpen: false, width: 300, height: 150, modal: true, resizable: false, overlay: { backgroundColor: '#000', opacity: 0.5 }, buttons: { "Ok": function() { jQuery(this).dialog("close"); return true; }, "Cancel": function() { jQuery(this).dialog("close"); return