tomahawk

How to add myFaces Tomahawk to my JSF 2.0 (.jsp) running in glassfish 3?

ぐ巨炮叔叔 提交于 2020-01-06 15:05:01
问题 Hi I been having some problems with my web.xml file I've been getting: Exception while loading the app org.glassfish.deployment.common.DeploymentException: LLog; at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:169) at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:125) at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:224) at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:338) at com.sun.enterprise.v3.server

UploadedFile is null when submit jsf upload request with Tomahawk

浪尽此生 提交于 2020-01-05 06:27:42
问题 trying to upload a file on a facelets page using Tomahawk2.0 1.1.11. But I get a null pointer exception and I see in the debugger, the uploadedFile variable is not being set in the bean. Any ideas why the bean isn't being set? The t:inputFileUpload component is otherwise rendering and functioning as I would expect. page: <h:form enctype="multipart/form-data"> <t:inputFileUpload value="#{Bean.uploadedFile}" /> <h:commandButton type="submit" id="Submit" value="Submit" action="#{Bean.submit}"/>

tomahawk inputfileupload uploaded file is null

岁酱吖の 提交于 2019-12-19 11:56:31
问题 I am using Tomahawk's fileupload component <t:inputfileupload> for uploading files. I've set enctype of form as enctype="multipart/form-data" and I used <h:commandButton> to submit the form. But the UploadedFile property in the bean is null . What am I doing wrong and how can I fix it? 回答1: Ensure that you've configured the ExtensionsFilter as per their documentation. It's the one responsible for processing multipart/form-data requests and setting the appropriate parts as bean properties. See

Color the rows of datatable based a condition in JSF 2

谁都会走 提交于 2019-12-18 06:11:31
问题 I'd like to change the background color of rows based on a condition. <t:dataTable id="data" styleClass="history-table" headerClass="history-table-header" rowClasses="history-table-row-default" border="2" cellpadding="5" cellspacing="2" var="entry" value="#{historyBean.logEntryList}" preserveDataModel="false" rows="#{historyBean.history.rowCount}" sortable="true"> <h:column> <f:facet name="header"> <h:outputText value="Debug Status" /> </f:facet> <h:outputText value="#{entry.action}" /> </h

How to create conditions based on user role using JSF/MyFaces?

懵懂的女人 提交于 2019-12-13 15:12:44
问题 What options do I have to read the roles of the current user from my JSP pages? I'm aware of the visibleOnUserRole="myRole" attribute on Tomahawk components, but I need roles for a bit more complicated things than simple visibility. 回答1: The ExternalContext exposes user and role information. public class RolesAccess implements Serializable { public String getUserPrincipalName() { FacesContext context = FacesContext.getCurrentInstance(); Principal principal = context.getExternalContext()

<t:panelNavigation2> causes javax.faces.FacesException: Cannot add the same component twice

送分小仙女□ 提交于 2019-12-13 05:45:54
问题 I am using Tomahawk20 1.1.14 for JSF 2.0 on WildFly 8.2.0. When using <t:panelNagivation2> , the below exception is thrown: javax.faces.FacesException: Cannot add the same component twice How is this caused and how can I solve it? Here is the stack trace: Caused by: javax.faces.FacesException: Cannot add the same component twice: nav:panel-nav:nav_panel-nav_uinavmitem1 at com.sun.faces.context.StateContext$DynamicAddRemoveListener.handleAddRemoveWithAutoPrune(StateContext.java:751) [jsf-impl

Tomahawk inputFileUpload in subform: required fields are validated

假如想象 提交于 2019-12-13 04:23:02
问题 I have integrated the inputFileUpload of Tomahawk in my webapplication. I have tried to use it with subform from tomahawk but with no luck. My form looks like this: <h:form enctype="multipart/form-data"> <!-- some <h:inputText required="true" /> tags --> <t:subform id="testSubForm"> <t:inputFileUpload value="#{fileBean.uploadedFile}" /> <t:commandButton action="#{fileBean.submit()}" value="Submit subForm"/> </t:subform> </h:form The problem is that the submit of the subform tries to validate

jsf 2: UploadedFile is null in ManagedBean using Tomahawk

不羁岁月 提交于 2019-12-12 04:38:31
问题 I did as BalusC's step by step tutorial: JSF 2.0 File upload But I then found that the UploadedFile is null when I clicked the commandButton . web.xml: <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <display-name>web<

t:dataScroller not working correctly on refresh

∥☆過路亽.° 提交于 2019-12-12 02:12:52
问题 I'm using t:dataScroller to scroll some data from a t:dataTable and it is working fine except for one thing: every time an action that causes the screen to be refreshed is triggered the t:dataScroller's index is set to 1. To be more clear: when i'm in the second page (index == 2) and a screen refreshing action triggers, after the refresh, the data of the dataTable is still from index 2 but the dataScroller shows that the page being displayed is the first one. I'm using the dataScroller this

How to sort a data table if we are using <t:columns> in JSF?

妖精的绣舞 提交于 2019-12-11 12:52:14
问题 I am studying tomahawk, I just want to know if I generate a datatable using <t:columns> then how to sort the dataTable on the click on the header of that particular column, like we are using <t:commandSortHeader> in normal <t:column> attribute. Kindly Help. 回答1: Using a t:datatable you don't really need the t:commandSortHeader, unless you want to customise what property it uses to sort. Here is what you need to get this working: <h:form> <t:dataTable id="data" value="#{BACKINGBEAN.DATA}" var=