richfaces

Extend Richfaces components - for example customize Datatable component for specific implementation

我与影子孤独终老i 提交于 2019-12-06 02:09:48
How to extend the functionality of Richfaces components for example Data table with custom header and sorting techniques. i have seen extended data table but did not get much information from it. Please point me to an example if at it is available. Thanks Soma Well, you can extend a JSF component with the regular java extension ( extends ). You will have to extend a number of classes, depending on the exact component: UIComponentName / HtmlComponentName HtmlComponentNameRenderer ComponentNameTag and you might need to register the renderer in faces-config.xml . You can take a look at this

How to use <a4j:jsFunction><a4j:actionparam>

谁说胖子不能爱 提交于 2019-12-06 01:44:42
问题 I'm trying to use: <script type="text/javascript"> function myfunc() { var param = 4; alert("OK"); } </script> I call the function like this: <a4j:jsFunction name="myfunc"> <a4j:actionparam name="param" assignTo="#{MyBean.myfield}"/> </a4j:jsFunction> But it does not work. In what may be the reason? 回答1: You misunderstood the purpose of <a4j:jsFunction> . It autogenerates a JavaScript function which you can then call from any JavaScript code in your view. Your example, <a4j:jsFunction name=

column width in rich:datatable

狂风中的少年 提交于 2019-12-05 23:53:48
问题 How to set the colum width for a rich:column inside a rich:datatable ? The width attribute is being ignored. See the following code: <rich:column label="#{msg[result]}" width="150px"> <f:facet name="header"> <h:outputText value="#{veryLongText}"/> </f:facet> <h:outputText value="#{someValue}" /> <f:facet name="footer"> <h:outputText value="#{someValue}" /> </f:facet> </rich:column> If you render this column and veryLongText is wider than 150px it does not break it in multiple lines. Instead,

javax.faces.FacesException: Error decode resource data while loading JSF page

末鹿安然 提交于 2019-12-05 22:49:51
问题 I am getting the below mentioned error while loading the JSF page. The page gets loaded successfully and the desired operation on the page is also done but this error comes. The jsf page contains tab panels and on click of each tab panel the error comes. Also I found that if I keep a certain portion of my page as rendered=false then the error does not come but the portion is again not rerendered. I am using JSF2.0 with JSPs. and RF3.3 ERROR [[Faces Servlet]] Servlet.service() for servlet

How stop richfaces style?

a 夏天 提交于 2019-12-05 19:20:37
I develop this contact form: <!DOCTYPE html> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <h:form> <h:panelGrid columns="3"> <h:outputLabel for="name" value="Nome (Obrigatório)" /> <h:inputText id="name" value="#{contact.client.name}" /> <h:message for="name" /> <h:outputLabel for="email" value="E-Mail (Obrigatório)" /> <h:inputText id="email" value="#{contact.client.email}" /> <h:message

jsf 2 response.sendRedirect is not working

守給你的承諾、 提交于 2019-12-05 19:10:32
I have observed an interesting thing in my JSF2.1/Richfaces 4.2 application. Some how all response.sendRedirect() calls inside either Filter (or) JSF Bean action methods are not working. If we use location.href on client side (Browser), it is working fine. Any suggestions on what could be causing send redirect failure? I have tried below signatures. response.sendRedirect("/appRoot/mypage.xhtml"); or (HttpServletResponse) facesCtx.getResponse()).sendRedirect(((HttpServletRequest)request).getContextPath()+"/appRoot/mypage.faces"); BalusC Some how all response.sendRedirect() calls inside either

How to enforce loading of jQuery in RichFaces?

泪湿孤枕 提交于 2019-12-05 18:08:48
I'm using jQuery on my page. However, I do NOT use RichFaces tags on every page. Subsequently, jQuery is NOT injected by RF in every page. In order to avoid loading an additional jQuery library, how do I properly instruct RichFaces to load its jQuery own library? This is an issue, because the RF-jQuery library overwrites my custom jQuery that I load. Also, the RF-jQuery libraries are always the last libraries to load, which is not good neither, because I need jquery-ui.js and jquery-migrate-1.2.1.min.js to load AFTER a jQuery library has been loaded. <head> <!-- JS --> <span id="out">

Richfaces - Get Element By Id

≯℡__Kan透↙ 提交于 2019-12-05 15:46:11
问题 We are using Richfaces in one of our projects. I need to focus the element dynamically on some user action. The issue here is I only have the id (JSF specific id that I give to element.) For example: for h:inputText I use it as <h:inputText id="userNameInputBox" value="<<some binding>>/> and this input box is embedded in separate form. When I include the input box in form, the id of the input box will be: formName:userNameInputBox (<<formName>>:<<elementId>>) I will be re-using the input box

JSF problem with FireFox 3.5 caching, wyciwyg:// prefix

假如想象 提交于 2019-12-05 12:53:35
I am new to JSF and have a problem with my simple JSF application. I use Facelets and Richfaces on WebLogic 10.3.2 (11g). The application is essentially 3 pages: A <--> B <--> C where the intermediate arrows denote navigation rules. The navigation is performed through a4j:commandButtons The problem is in Firefox 3.5, when I click from B to C, I get a url starting from wyciwig:// . In more detail, the starting url is: http://localhost:7001/myapp/index.faces and the url I get when I navigate from B to C is this: wyciwyg://20/ http://localhost:7001/myapp/index.faces From a Google search I saw

How to render a component only if another component is not rendered?

旧巷老猫 提交于 2019-12-05 11:21:15
I have a page that the user can access via Android, iPhone, BlackBerry or via an unknown browser. I have 4 rich:panel s, one for each platform and the latter is a generic one. The code: <rich:panel id="dlAndroid" rendered="#{fn:containsIgnoreCase(request.getHeader('User-Agent'), 'Android')}"> ... </rich:panel> <rich:panel id="dlIphone" rendered="#{fn:containsIgnoreCase(request.getHeader('User-Agent'), 'iPhone')}"> ... </rich:panel> <rich:panel id="dlBlackberry" rendered="#{fn:containsIgnoreCase(request.getHeader('User-Agent'), 'BlackBerry')}"> ... </rich:panel> <rich:panel id="dlGeneric"