seam

How can I call a JavaScript function after every a4j AJAX response?

 ̄綄美尐妖づ 提交于 2019-12-07 07:54:49
问题 I am working on a web app using JSF w/Seam. I want to be able to call a JavaScript function after every ajax response. I'm looking for a way to do this without putting an oncomplete attribute on every commandLink/commandButton on every page. I think there's a way to set up a servlet filter (interceptor? I get the terms confused) to inject the JS call into each response. I'm going to look into that. In the meantime, if anyone has any other suggestions, I'm all ears. EDIT: I think the jQuery

strange “String index out of range: 0” error

非 Y 不嫁゛ 提交于 2019-12-07 06:27:16
问题 I have a huge application and at some point, when a redirect is involved i received this strange error: Caused by java.lang.StringIndexOutOfBoundsException with message: "String index out of range: 0" java.lang.String.charAt(String.java:687) com.sun.faces.application.ViewHandlerImpl.getActionURL(ViewHandlerImpl.java:652) org.jboss.seam.jsf.SeamViewHandler.getActionURL(SeamViewHandler.java:74) com.sun.facelets.FaceletViewHandler.getActionURL(FaceletViewHandler.java:803) org.ajax4jsf

EL variable in JSF ResourceBundle

寵の児 提交于 2019-12-07 05:42:06
问题 i read somewhere (don't find it anymore) that i can use EL Expresions in the resource bundle and then use it without changes in *.xhtml files. some.text=#{someBean.stepsLeft} more to switch the position of the variable in different languages. But actually it wont work. I can use Interpolator class to handle the parsing or add some.text.before some.text.after and let one of them empty. I would prefer it to use it without interpolator.interpolate() if possible. 回答1: JSF resourcebundles does by

Java Regular Expression, match everything but

情到浓时终转凉″ 提交于 2019-12-07 03:15:05
问题 I would like to match everything but *.xhtml . I have a servlet listening to *.xhtml and I want another servlet to catch everything else. If I map the Faces Servlet to everything ( * ), it bombs out when handling icons, stylesheets, and everything that is not a faces request. This is what I've been trying unsuccessfully. Pattern inverseFacesUrlPattern = Pattern.compile(".*(^(\\.xhtml))"); Any ideas? Thanks, Walter 回答1: What you need is a negative lookbehind (java example). String regex = ".*(

seam file upload to postgres bytea column “ column is bytea but expression is of type bigint”

风流意气都作罢 提交于 2019-12-07 01:49:16
问题 Closely following this example, I'm uploading a small file and trying to store into postgresql bytea column. Here is error (first two outputs are logging statements outputting attributes of bean before the INSERT is attempted: SAGE 1 -- action.registration.LetterTemplateHome - content type: text/xml SAGE 1 -- action.registration.LetterTemplateHome - letterTemplateText: [B@48c7aaef SAGE 1 -- action.registration.LetterTemplateHome - contents as String: xml version="1.0" encoding="UTF-8"

How do you create components.xml for debug/development in Seam

旧巷老猫 提交于 2019-12-06 23:10:31
Has anyone created two versions of components.xml like the components-dev.properties or the other dev or prod versions? How did you do this? We have some custom components that we are using for Development that is created in components.xml that I would like to move to its own components-dev.xml but I don't how to do this. Any ideas? The codes that I would like to move are generally like this: <component name="fooBar" class="org.bar.FooBar" /> You can conditionally install a component like this: <component name="fooBar" class="org.bar.FooBar" install="true" /> If you have a lot of components

problem with seam and mdb on jboss5.1

老子叫甜甜 提交于 2019-12-06 20:08:26
I have a problem when using a mdb as a seam component. In the bean I inject some other seam somponents. The problem is that when the server restart after a crash and the mdb is deployed it starts reading the messages but seam is not initialized yet and I got an exception(listed above). If i start the server whith the queues empty and submit a message to queue after the server start it is working ok. Is there a posibility to stop or delay the sending off messages on server startup and start sending them only when seam is fully funcional? I tried the @Depends antotatin on the bean but withowt

CDI lifecycle of bean, @Inject and params

别说谁变了你拦得住时间么 提交于 2019-12-06 15:13:39
问题 The view and bean were working until I tried to fix non-standard names, and I've now broken the connection between the two. Oddly, the "back" button has the correct link, but content just doesn't show, nor log. Why doesn't Detail.getComments() execute? I've been going through the weld docs and trying to better understand @Inject. There seems to be a lifecycle problem which I don't understand, either. If it's not lifecycle, then I cannot even speculate as to why Detail.getComments() never

Webservice using Seam

↘锁芯ラ 提交于 2019-12-06 13:35:40
I am new to Seam and want to develop Webservice using Seam.I have an aggressive deadline Where i can find the details to develop the Webservice using Seam.Any good document, book, website etc. Damo As mentioned in the other question you could use JAX-WS. However if you'd rather use REST services (JAX-RS) then either: Read up on JAX-WS in the Seam Docs Check out Stéphane Épardaud's article here ; or Have a look at Sun Jersey which is an implementation of JAX-RS. EDIT : Norman Richards from the Seam team has just posted a blog article about Seam and JAX-RS . Looks fantastic and probably more

How to migrate from RAMJobStore to JobStoreCMT for persisted Quartz jobs in Seam

安稳与你 提交于 2019-12-06 04:57:47
I am trying to get a simple example of the Quartz scheduler working in JBoss Seam 2.2.0.GA. Everything works fine using the RAMJobStore setting, but changing the store from org.quartz.jobStore.class = org.quartz.simpl.RAMJobStore to org.quartz.jobStore.class org.quartz.impl.jdbcjobstore.JobStoreCMT org.quartz.jobStore.driverDelegateClass org.quartz.impl.jdbcjobstore.PostgreSQLDelegate org.quartz.jobStore.useProperties false org.quartz.jobStore.dataSource quartzDatasource ## FIXME Should be a different datasource for the non managed connection. org.quartz.jobStore.nonManagedTXDataSource