mojarra

Passing redirect-param in faces-config in jsf-2.2

倾然丶 夕夏残阳落幕 提交于 2021-02-07 17:10:04
问题 In old jsf the following code was working <navigation-rule> <from-view-id>/page1.xhtml</from-view-id> <navigation-case> <from-outcome>true</from-outcome> <to-view-id>/page2.xhtml</to-view-id> <redirect> <view-param> <name>id</name> <value>#{myBean.id}</value> </view-param> </redirect> </navigation-case> </navigation-rule> page1.xhtml code : <f:metadata> <f:viewParam id="id" name="id" value="#{myBean.id}" /> <f:viewAction action="#{myBean.init()}"/> </f:metadata> Java code : public class

Passing redirect-param in faces-config in jsf-2.2

烈酒焚心 提交于 2021-02-07 17:09:00
问题 In old jsf the following code was working <navigation-rule> <from-view-id>/page1.xhtml</from-view-id> <navigation-case> <from-outcome>true</from-outcome> <to-view-id>/page2.xhtml</to-view-id> <redirect> <view-param> <name>id</name> <value>#{myBean.id}</value> </view-param> </redirect> </navigation-case> </navigation-rule> page1.xhtml code : <f:metadata> <f:viewParam id="id" name="id" value="#{myBean.id}" /> <f:viewAction action="#{myBean.init()}"/> </f:metadata> Java code : public class

ajax changes target attribute on multipart/form-data form

浪子不回头ぞ 提交于 2021-01-28 08:34:10
问题 When I try to render a component with f:ajax inside a multipart/form-data form, the target attribute of the form gets changed to JSFFrameId . Is this a bug? Here is a sample code when this occur: <h:form enctype="multipart/form-data"> <h:inputText> <f:ajax event="change" render="@this" execute="@this"/> </h:inputText> <h:inputFile /> </h:form> In my real code this is not what I'm trying to do but the same issue occurs with the sample code. When visiting this page I get the following HTML

Why does a commandLink within a facet within a composite component renders an error?

99封情书 提交于 2020-12-30 08:17:14
问题 When I create a composite component with a facet in it and place a command link within that facet, I get an error message: This link is disabled as it is not nested within a JSF form. A commandButton does not behave in the same way, so I am inclined to this this is a bug. 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

Why does a commandLink within a facet within a composite component renders an error?

Deadly 提交于 2020-12-30 08:16:26
问题 When I create a composite component with a facet in it and place a command link within that facet, I get an error message: This link is disabled as it is not nested within a JSF form. A commandButton does not behave in the same way, so I am inclined to this this is a bug. 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

Why does the first AJAX call reset my view parameter?

那年仲夏 提交于 2020-05-29 08:43:53
问题 I cannot find out why the first ajax call causes the setter of my view parameter to be called again while every subsequent call does not call the setter again. I have the following simple view bean: package test; import java.io.Serializable; import javax.faces.view.ViewScoped; import javax.inject.Named; @Named @ViewScoped public class TestController implements Serializable { private static final long serialVersionUID = 1L; String param; public String getParam() { return param; } public void

Why does the first AJAX call reset my view parameter?

泄露秘密 提交于 2020-05-29 08:39:33
问题 I cannot find out why the first ajax call causes the setter of my view parameter to be called again while every subsequent call does not call the setter again. I have the following simple view bean: package test; import java.io.Serializable; import javax.faces.view.ViewScoped; import javax.inject.Named; @Named @ViewScoped public class TestController implements Serializable { private static final long serialVersionUID = 1L; String param; public String getParam() { return param; } public void

Why does the first AJAX call reset my view parameter?

巧了我就是萌 提交于 2020-05-29 08:39:18
问题 I cannot find out why the first ajax call causes the setter of my view parameter to be called again while every subsequent call does not call the setter again. I have the following simple view bean: package test; import java.io.Serializable; import javax.faces.view.ViewScoped; import javax.inject.Named; @Named @ViewScoped public class TestController implements Serializable { private static final long serialVersionUID = 1L; String param; public String getParam() { return param; } public void

JSF: reloading page via p:button using “?includeViewParams=true” results in %2C for integer GET param in new URL

我与影子孤独终老i 提交于 2020-03-25 13:51:36
问题 I have a page that has two GET params: round = [some integer] group = [some string] See URL above. These are the two components of the group's PK, an INT + a VARCHAR. Facelet code: <f:metadata> <f:viewParam name="round" value="#{groupHandler.roundId}"> <f:convertNumber integerOnly="true" /> </f:viewParam> <f:viewParam name="group" value="#{groupHandler.groupCode}" /> <f:viewAction action="#{groupHandler.loadEntity}" /> </f:metadata> ... <p:button widgetVar="reloadPageButton" value="Reload

JSF: reloading page via p:button using “?includeViewParams=true” results in %2C for integer GET param in new URL

懵懂的女人 提交于 2020-03-25 13:49:11
问题 I have a page that has two GET params: round = [some integer] group = [some string] See URL above. These are the two components of the group's PK, an INT + a VARCHAR. Facelet code: <f:metadata> <f:viewParam name="round" value="#{groupHandler.roundId}"> <f:convertNumber integerOnly="true" /> </f:viewParam> <f:viewParam name="group" value="#{groupHandler.groupCode}" /> <f:viewAction action="#{groupHandler.loadEntity}" /> </f:metadata> ... <p:button widgetVar="reloadPageButton" value="Reload