seam

How to escape “:”?

﹥>﹥吖頭↗ 提交于 2019-12-04 16:16:43
问题 for example I have id like someform:somepanel:somebutton When I do jQuery("#someform:somepanel:somebutton") it returns someform, how to AUTOMATICALLY escape that id? EDIT: I want to do something like this jQuery(somefunction("#someform:somepanel:somebutton")) 回答1: If it's only this very specialized version, you can just .replace() the character. function somefunction(selector) { return selector.replace(/:/, '\\\\:'); } jQuery(somefunction("#someform:somepanel:somebutton")) is then converted

Is RESTful JSF possible?

笑着哭i 提交于 2019-12-04 10:41:52
问题 I recently sat down to port a simple Rails app I have to JSF (using Seam) to get a feel for which I would be more productive in. The Rails app is RESTful, which I like. Upon starting into JSF, I was surprised to learn, perhaps incorrectly, that JSF only support POSTs, which makes it inherently non-RESTful. I searched around a bit but cannot find a satisfactory answer. JSF/Seam appears to be very popular, but it doesn't make sense to me that it would forbid all HTTP methods but POST. Is it

How do you specify OrderBy clause on two columns

耗尽温柔 提交于 2019-12-04 05:03:25
We would like to orderBy 2 columns in the Seam EntityQuery interface as well as the JPA model. How do we do this? @Entity public class A{ @OrderBy(???) // should this be hardcoded here, is it database agnostic List<B> bobjects; } @Entity public class B { public short startTimeHrs; public short startTimeMins; } @Name("bList") public class B extends EntityQuery { setOrderColumn("startTimeHrs, startTimeMins"); // Is this correct? setOrderDirection("asc"); } If you are talking about javax.persistence.OrderBy , this annotation takes into parameter a list of comma separated properties (of the target

Disabling seam's redirect filter

南笙酒味 提交于 2019-12-04 04:02:55
I'm doing a project in seam that requires restful URLs. I have a view that is mapped to /group/{group}/{locale}. On that page I have a list of so called messages. Each message has a button to save changes to the message. This is linked to an action bean like this: <h:commandButton type="submit" value="Save Changes" action="#{groupAction.update}" /> Each message has an anchor, so /group/{group}/{locale}#{id} can be used to make the browser go to that anchor. This is why I need a redirect after the POST: <page view-id="/group.xhtml"> <rewrite pattern="/group/{group}/{locale}"/> <param name=

JSF ReRender support with selectBooleanCheckbox

泄露秘密 提交于 2019-12-03 20:52:16
I have a JSF page on which I want to have a checkbox that, when clicked, will add/remove certain other form fields from the page. Here is the (simplified) code I currently have for the checkbox: <h:selectBooleanCheckbox title="showComponentToReRender" value="#{backingBean.showComponentToReRender}"> <a4j:support event="onsubmit" reRender="componentToReRender" /> </h:selectBooleanCheckbox> Here is the code for the component I want to hide: <h:selectOneMenu id="componentToReRender" value="#{backingBean.value}" rendered="#{valuesList.rowCount>1 && backingBean.showComponentToReRender}"> <s

Is it possible to use Seam in a JBoss timed service?

不想你离开。 提交于 2019-12-03 17:27:23
I've started to write some new JBoss timed service that was meant to use some existing seam components. But it seems that I can't access these components because of non-existing contexts. Is it possible to use them other than in the typical situation with JSF? A little snippet to demonstrate what I want to do... @Service public class MyService extends DefaultTimedService implements TimedObject, DefaultServiceInterface { @Timeout public void ejbTimeout(Timer timer) { MyInterface loader = (MyInterface) Component.getInstance(MyInterface.SEAM_NAME, true); // throws no context! } } That throws the

Practical value for concurrent-request-timeout parameter or options for avoiding concurrent access to conversation exception

喜夏-厌秋 提交于 2019-12-03 16:21:37
In the Seam Reference Guide, one can find this paragraph: We can set a sensible default for the concurrent request timeout (in ms) in components.xml: <core:manager concurrent-request-timeout="500" /> However, we found that 500 ms is not nearly enough time for most of the cases we had to deal with, especially with the severe restriction seam places on conversation access. In our application we have a combination of page scoped ajax requests (triggered by various user actions), some global scoped polling notification logic (part of the header, so included in every page) and regular links that

Has anyone successfully run integration tests with Jboss embedded, Seam and Maven?

亡梦爱人 提交于 2019-12-03 15:30:34
Have been trying to get integration testing working with my seam project and the Jboss embedded container but am not having much success. Have been doing a lot of reading and have been trying what is mentioned in this JIRA but am not having any luck. Amy currently just trying to get the 'testproject-master-JBSEAM-2371.zip' project working but am getting the following exception ERROR [org.jboss.embedded.DeploymentScanner] Failed to deploy org.jboss.deployers.spi.DeploymentException: No deployer recognised the structure of vfsfile:/Users/aaron/Development/eclipse_workspaces/workspace_pink

Show success message and then redirect to another page after a timeout using PageFlow

与世无争的帅哥 提交于 2019-12-03 12:56:20
How can I show a success message and then redirect the user to another page after a timeout of e.g. 5 seconds? I need this for the login page after a successful login. I tried the following and I can see the warning message on login failure, but not the success message on login success. It shows immediately the target page. public String check(){ if (username.equals("test") && password.equals("test")) { FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO,"Sample info message", "PrimeFaces rocks!")); return "Success"; }else{ FacesContext

How to escape “:”?

落爺英雄遲暮 提交于 2019-12-03 11:16:34
for example I have id like someform:somepanel:somebutton When I do jQuery("#someform:somepanel:somebutton") it returns someform, how to AUTOMATICALLY escape that id? EDIT: I want to do something like this jQuery(somefunction("#someform:somepanel:somebutton")) If it's only this very specialized version, you can just .replace() the character. function somefunction(selector) { return selector.replace(/:/, '\\\\:'); } jQuery(somefunction("#someform:somepanel:somebutton")) is then converted into jQuery("#someform\\:somepanel\\:somebutton"); To have a more generic version, you can use a regexp: