[jboss-user] [JBoss Seam] - Re: Seam PDF with content-disposition=attachment - is it pos

2007-12-28 Thread ASavitsky
Norman,

Was this fix included with the released 2.0.1.CR1, or do I need to build from 
CVS?

Thanks,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4115931#4115931

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4115931
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam PDF with content-disposition=attachment - is it pos

2007-12-28 Thread ASavitsky
Already answered my own question :)

No, it's not included in the CR1 build

Yes, it works like a charm (at least on IE7 and Mozilla2)

Thanks Norman!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4115954#4115954

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4115954
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Transactional Method Flush

2007-12-21 Thread ASavitsky
Find the message's key, and redefine it in your own messages.properties as 
blank. Worked for me to get rid of login messages

HTH,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4115011#4115011

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4115011
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam PDF with content-disposition=attachment - is it pos

2007-12-20 Thread ASavitsky
Doesn't look like there are ways to do this at the time. I created a JIRA 
feature request: http://jira.jboss.com/jira/browse/JBSEAM-2417

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4114661#4114661

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4114661
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Seam PDF with content-disposition=attachment - is it possibl

2007-12-19 Thread ASavitsky
Currently, when I generate PDFs using Seam PDF, they either a) open in the same 
browser window by default, or b) open in a new window, if I use s:link with 
target=_blank. What I'm missing (compared to the old way of generating PDFs 
using Jasper - not that I miss Jasper by any amount) is the ability to force a 
save dialog to pop up when a PDF is requested, by setting content-disposition: 
attachment in the response.

Now, my question is, was this ever addressed by Seam? Is it possible to force a 
save dialog when generating PDF using Seam PDF?

Alternatively, is it possible to get the generated PDF as a byte[] in the code 
- so that I would output it manually, setting the content-disposition on the 
way?

Thanks a lot,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4114366#4114366

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4114366
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: EntityQuery.refresh() doesn't clear the result list??

2007-12-18 Thread ASavitsky
I remember it was fixed in one of the releases, I think 2.0.0.GA - if not, try 
2.0.1.CR1, it should be fixed there. At least, it works for me now.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4113791#4113791

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4113791
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Plain Tomcat + Quartz + Mail work together?

2007-12-05 Thread ASavitsky
Create a JIRA with a test case - I remember being told that this setup should 
work now in 2.0GA+, so if it doesn't, I'll be the first to vote on issue and 
test it.

Thx,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4110528#4110528

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4110528
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Entities are lost in SMPC

2007-11-08 Thread ASavitsky
I think I got a similar problem opened here: 
http://jira.jboss.com/jira/browse/JBSEAM-2224. I was trying to trace who nulls 
the list, and it doesn't look like it's Seam - more likely it's a RichFaces 
problem...

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4103029#4103029

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4103029
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - EntityQuery.resultList contains all nulls after AJAX request

2007-11-07 Thread ASavitsky
This one drives me crazy! If there's a list box backed by an EntityQuery, on 
the same page with an AJAX component (in my case it's RichFaces 
DataScroller/DataTable), then after several AJAX requests, the resultList for 
EntityQuery contains a list of nulls. It looks like every entity in the 
resultList is replaced with a null. I'm not sure whether it's Seam or 
RichFaces, but it's bound to be one or the other. 

Anyway, here's the setup: Seam 2 GA, RichFaces 3.1.2, Facelets 1.1.14, JSF RI 
1.2.05, Hibernate 3.2.5 GA.

The entites A and B are identical in structure (though they can be different, 
for as much as this bug cares):

@Entity
  | public class A implements Serializable {
  | @Id
  | private String name;
  | 
  | public String getName() {
  | return name;
  | }
  | }

The EntityQuery's:
core:init debug=false /
  | core:manager conversation-timeout=12 
concurrent-request-timeout=500 /
  | persistence:entity-manager-factory name=testDatabase /
  | persistence:managed-persistence-context name=entityManager
  | entity-manager-factory=#{testDatabase} auto-create=true /
  | transaction:entity-transaction entity-manager=#{entityManager} /
  | framework:entity-query name=listOfA scope=conversation ejbql=FROM 
A a order=name /
  | framework:entity-query name=listOfB scope=conversation ejbql=FROM 
B b order=name /
  | security:identity authenticate-method=#{authenticator.authenticate} 
/
  | web:ajax4jsf-filter force-parser=false enable-cache=true 
class=org.ajax4jsf.FastFilter /

Now, the Facelets page:
h:form xmlns=http://www.w3.org/1999/xhtml;
  | xmlns:h=http://java.sun.com/jsf/html; 
xmlns:f=http://java.sun.com/jsf/core;
  | xmlns:s=http://jboss.com/products/seam/taglib; 
xmlns:r=http://richfaces.org/rich;
  | r:dataTable id=list var=a value=#{listOfA.resultList} rows=4
  | r:column
  | h:commandLink action=Dummy value=#{a.name} /
  | /r:column
  | /r:dataTable
  | r:datascroller align=left maxPages=1 for=list 
fastControls=auto /
  | br /
  | h:selectOneMenu value=#{notImportantHere}
  | s:selectItems value=#{listOfB.resultList} var=b 
label=#{b.name} noSelectionLabel=Select one... /
  | s:convertEntity /
  | /h:selectOneMenu
  | /h:form

Pretty simple - there's a scrollable datatable for entity A, and a dropdown for 
entity B. Now, when user activates the datascroller twice, and then selects an 
A from the data table, the list of Bs is empty - it contains the same # of 
entries as before, but they are all empty.

Has anyone ever encountered such behavior before? Is this a bug? I myself have 
seen it before, with a different AJAX component (it was a RichFaces suggestion 
box that time), but dismissed it on the notion that what else could you expect 
from a beta (Seam was B2 at the time)?

Thanks in advance,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4102676#4102676

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4102676
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - How to intercept EM creation to run custom SQL?

2007-10-17 Thread ASavitsky
We need to be able to run some custom SQL (a stored procedure call, actually) 
every time a connection is opened to the database, and the SQL in question 
would be taken from an HttpSession-scoped object - does Seam provide a way to 
accomplish that, using events/interceptors or such?

Thanks,

Alex

P.S. The gory details: we're planning to use Oracle Workspace Manager in our 
app, and the SQL call in question would be either GotoDate or GotoWorkspace SP 
call, to control the point in time at which the DB session would see the data...

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4096151#4096151

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4096151
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Starting up Asynchronous Method at startup

2007-10-17 Thread ASavitsky
Application context would be initialized, but since this is an async 
invocation, there'd be no session or conversation context available (and, most 
likely, no HttpSession active, either), thus no Seam-email rendering. I believe 
there's a JIRA issue addressing just that (making FacesContext available for 
async calls) - until then, I switched temporarily to regular JavaMail

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4096165#4096165

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4096165
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Starting up Asynchronous Method at startup

2007-10-17 Thread ASavitsky
Correction - the contexts would be there, but they will be based on a 
MockFacesContext, thus being completely useless for email rendering...

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4096166#4096166

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4096166
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Starting up Asynchronous Method at startup

2007-10-17 Thread ASavitsky
Sorry, I didn't keep the URL, and now I can't find it :( Maybe it was done 
after all? The last time I looked at this issue was in June-July, things might 
have changed since then...

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4096183#4096183

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4096183
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Starting up Asynchronous Method at startup

2007-10-16 Thread ASavitsky
Here's what works for me (no EJB3 - plain POJO, Quartz and Tomcat, all deployed 
as WAR):

@Name (scheduler)
  | @Scope (ScopeType.APPLICATION)
  | @Startup
  | public class Scheduler {
  | @In
  | private IService service;
  | @Logger
  | private Log log;
  | // set in seam.properties via scheduler.reminderCron
  | private String reminderCron;
  | 
  | public void setReminderCron(String reminderCron) {
  | this.reminderCron = reminderCron;
  | }
  | @Create
  | public void startJobs() {
  | log.info(Reminder task started on #0, cron schedule is #1,
  | new Date(), reminderCron);
  | service.sendReminders(reminderCron);
  | }
  | }

public interface IService extends Serializable {
  | void sendReminders(String cron); // other methods are omitted
  | }

@Name (service)
  | @Scope (ScopeType.CONVERSATION)
  | @AutoCreate
  | @Transactional
  | public class Service implements IService {
  | @Asynchronous
  | public void sendReminders(@IntervalCron String cron) {
  | log.info(Reminder task activated on #0, new Date());
  | // plus whatever other functionality you need here...
  | }
  | }
  | 

The scheduler starts with the app, and runs every morning (as per cron 
expression, which you can change as needed)

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4095784#4095784

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4095784
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: 2.0.0 CR2 is out

2007-10-05 Thread ASavitsky
There are a few problems with this release (as far as Maven is concerned, 
anyway):

1. Jboss-EL is still CR1 - have there been any changes to it as part of CR2?
2. Source JARs have incorrect naming - there's an extra dash in there that 
makes them unrecognizable to Maven(jboss-seam-2.0.0.CR2--sources.jar vs 
expected jboss-seam-2.0.0.CR2-sources.jar)
3. Seam UI declares a hard dependency on JSP-API, which makes absolutely no 
sense if Facelets are used. Shouldn't that one be declared as provided, just 
like JSF RI does it?

Other than that, thanks for the good work!

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4092152#4092152

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4092152
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: FYI: Seam 2 CR1 has been released

2007-09-25 Thread ASavitsky
Pete,

Would it be possible to upload the Seam sources to Maven repo as well, at least 
for the GA release?

Thanks,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4088500#4088500

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4088500
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Does the JPA/tomcat example require Embedded Jboss?

2007-09-25 Thread ASavitsky
thejavafreak wrote : It's not ambiguous.
  | 
  | Point 1 means that Seam can run without EJB3 container by just using Plain 
Pojo + Hibernate and not JPA + EJB3

Actually, it's Plain POJO + JPA, as JPA can be used in J2SE :)

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4088512#4088512

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4088512
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: FYI: Seam 2 CR1 has been released

2007-09-25 Thread ASavitsky
Done. http://jira.jboss.org/jira/browse/JBSEAM-1970

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4088544#4088544

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4088544
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Something wrong with whole view layer :/ - getting NPE

2007-09-19 Thread ASavitsky
Just make the changes yourself, then (you did read the bug report details, 
didn't you?).

Grab MenuRenderer from the latest RI release.

Scroll to the end of renderOption method, and change the following code block   
  if (curItem.isEscape()) {
  | String label = curItem.getLabel();
  | if (label == null) {
  | label = curItem.getValue().toString();
  | }
  | writer.writeText(label, component, label);
  | } else {
  | writer.write(curItem.getLabel());
  | }
  |  to this one:   if (curItem.isEscape()) {
  | String label = curItem.getLabel();
  | if (label == null) {
  | label = valueString;
  | }
  | writer.writeText(label, component, label);
  | } else {
  | writer.write(curItem.getLabel());
  | }
  | 

Include the changed file in your web project (mind the correct package name), 
this should automatically place the compiled class into WEB-INF/classes.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4086133#4086133

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4086133
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Something wrong with whole view layer :/ - getting NPE

2007-09-19 Thread ASavitsky
Then just place it in the source folder (your project has at least one, right?)

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4086147#4086147

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4086147
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Something wrong with whole view layer :/ - getting NPE

2007-09-18 Thread ASavitsky
Yes, this sounds about right (though I never used seam-gen, so I have no idea 
about the structures it creates). Overriding a class is trivial - just include 
the correct version in WEB-INF/classes, this will override the JAR version. To 
be on the safe side, you might as well open the JAR with any ZIP program 
(WinZip, WinRAR, etc.) and delete the old class version. Is this a web (WAR) 
project you have, or a full-blown EAR?



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4085484#4085484

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4085484
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Something wrong with whole view layer :/ - getting NPE

2007-09-18 Thread ASavitsky
Yes, jsf-impl is the correct file. Make sure it's listed as part of WAR 
libraries (not EAR, so you don't run into classloading problems), and then 
override the class in WEB-INF/classes. Should work.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4085559#4085559

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4085559
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Something wrong with whole view layer :/ - getting NPE

2007-09-17 Thread ASavitsky
The bug is in JSF RI, filed here: 
https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=616

Just grab the CVS version of com.sun.faces.renderkit.html_basic.MenuRenderer, 
and you should be ok.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4085245#4085245

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4085245
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: LazyInitializationExceptions are staying

2007-09-13 Thread ASavitsky
Michel,

Try injecting your persistence context using @In - I believe that lazy loading 
only works with Seam-managed PC (the one injected via @PersistenceContext is 
not Seam-managed). Of course, you'll need to setup the SMPC properly as well... 
(look at examples)

HTH,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4084001#4084001

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4084001
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Last try - Conversational Feature let me feel like an id

2007-09-05 Thread ASavitsky
I wouldn't recommend reusing the same conversation in different areas of the 
system. Whenever user switches to a different area, scrap the old conversation 
and create a new one. You can do it in the same request, by ending it in the 
link itself (via propagation=end) and beginning a new one in pages.xml 
(begin-conversation join=true).

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4081309#4081309

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4081309
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Multiple beans outjecting same variable - how to control?

2007-08-21 Thread ASavitsky
Let's say I have several beans, all outjecting variable with the same name - is 
there a way to control which one does the outjection?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4076300#4076300

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4076300
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Multiple beans outjecting same variable - how to control

2007-08-21 Thread ASavitsky
vincent.latombe wrote : AFAIK, outjection is done after each call of each 
method of a component.
Yes, if there's a method call - but what if there isn't one?

My use case is pretty simple, actually: there's an entity X, with an User 
attribute, so that each user can see their own Xs, while an admin can see all 
of them (optionally filtetred by user). Thus, there's an EntityQuery set up 
(FROM X x) with restrictions in the form of x.user = #{selectedUser}, where 
selectedUser is outjected. Admin screen either outjects null (default on page 
load) or the user that list should be filtered on (via method call in admin 
screen controller). User screen, OTOH, is to automatically outject the current 
logged in user as selectedUser. To accomplish this, the controller bean for 
user screen declares @In @Out (selectedUser) User principal; (principal is 
the current logged in user, outjected into session on login).

The only problem is, there's no way to control which of the controller beans 
would outject the value first (on first page load, for instance). The hacker 
way to solve this is to introduce a no-op method in each of the controllers, 
that would execute on page load and do all the outjection, like that: page 
view-id=/attestation/accounts.xhtml
  | action=#{accountController.noOp} /, but of course this is 
just a hack...

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4076361#4076361

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4076361
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Multiple beans outjecting same variable - how to control

2007-08-21 Thread ASavitsky
The whole idea was to use selectedUser in a query without having to reference 
it via any particular controller bean. How would a @Factory help here? It still 
requires the property to be referenced via beanName.propertyName, unless I'm 
mistaken...

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4076387#4076387

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4076387
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Multiple beans outjecting same variable - how to control

2007-08-21 Thread ASavitsky
No, still doesn't work - if I add the factory only to the user controller, then 
admin controller uses it as well, as it's the only one defined (filtering where 
it shouldn't), and if I add one to admin as well (returning null, of course), 
then user controller uses that one, too...

So I guess I'm back to the no-op method, which seem to be the only working here 
:( Anyway, thanks for help.

I guess it would be nice to be able to specify a default resolver for a page 
(in pages.xml), so that on page load, a particular bean would handle all 
outjection - what do you think, is this a sensible way to handle such situation?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4076406#4076406

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4076406
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam managed transaction in Tomcat

2007-08-15 Thread ASavitsky
If you're using plain JPA (no EJB3) and you don't require JTA, then no, you 
don't need jboss-embedded at all. You'll need to

a) use Seam transaction manager transaction:entity-transaction 
entity-manager=#{entityManager} /

b) declare your datasource in Tomcat

c) reference the datasource in persistence.xml, and make sure to specify 
transaction-type=RESOURCE_LOCAL

If you need any more info, just ask (but make sure to read the docs first, it's 
all explained in detail there)

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4074518#4074518

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074518
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: seam 2.0 Tomahawk

2007-08-14 Thread ASavitsky
I successfully used both 1.1.5 and 1.1.6 Tomahawk versions (mostly dataTable 
and dataScroller components), though later switched to RichFaces anyway - it 
delivers more functionality and less bugs in a smaller footprint.

Mind you, some Tomahawk components (such as saveState) shouldn't even be used 
with Seam.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4074174#4074174

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074174
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - s:validate ignores annotations if custom validator specified

2007-08-14 Thread ASavitsky
I have an entity that contains email property:
@Email private String email;

This property is also subject to a unique constraint, which is coded in the 
backing bean:

public void validateEmail(FacesContext context, UIComponent component, Object 
value) {
  |// some custom code that validates email uniqieness in DB...
  | }

Now, when these two are combined in the view, the @Email constraint gets 
ignored:

s:validateh:inputText value=#{selectedUser.email}
  | validator=#{userController.validateEmail} //s:validate

Is this an expected behavior, or a bug?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4074178#4074178

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074178
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: s:validate ignores annotations if custom validator speci

2007-08-14 Thread ASavitsky
Looks like I mixed up the two. It's the validateAll that I used (with 
s:decorate, as per Seam examples), and yes, it now works with s:validate - 
thanks.

Now, I take it, there's no way to incorporate s:validate in s:decorate template 
(as it goes inside the input field), is there? :(

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4074190#4074190

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4074190
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: How to build action parameter expression for s:button wi

2007-08-10 Thread ASavitsky
You should be able to make it working without using the data model, or at least 
I was able to. Try placing the trackList (it's an EntityQuery, right?) inside a 
long-running conversation, as it might be that, by the time the playMediaId() 
is called, the trackList is already expired, so track.id would evaluate to null.

Then again, it's all pure guesswork, it would help to see more configuration 
than that...

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4073102#4073102

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4073102
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: please document library versions

2007-08-09 Thread ASavitsky
[EMAIL PROTECTED] wrote : All of them are custom versions IIRC.

Are there any particular reasons to use custom versions?

Where's the source code for these versions?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4072476#4072476

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4072476
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: please document library versions

2007-08-09 Thread ASavitsky
[EMAIL PROTECTED] wrote : Why? Well facelets is obvious (we needed fixes 
which weren't in a released version).  And currently Seam depends on JBoss 
Embedded at build time (but not at runtime, you do need thirdparty-all for 
deploying to non JBoss AS app servers if they don't have all the deps needed, 
normally javassist). I am working on improving dep management currently, and 
the dependency on JBoss Embedded (apart from it's api) will go away.

Well, actually, it was the custom version of Hibernate, not Facelets, that 
puzzled me. After all, with Hibernate being owned by pretty much the same team 
as Seam itself (well, Gavin is there for sure), any needed custom changes could 
have been as easily incorporated right into a Hibernate release, now couldn't 
have they?

Now, if I don't use JBoss Embedded (I deploy on Tomcat without EJB3 support), 
do I still need to use the hibernate-all.jar, or can I use the latest GA 
versions of Hibernate, Annotations, EM and such?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4072538#4072538

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4072538
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: EntityQuery.refresh() doesn't clear the result list??

2007-07-23 Thread ASavitsky
Looks like it was already fixed in CVS, so I'll be waiting on the next release 
then...

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4066655#4066655

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4066655
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: EntityQuery.refresh() doesn't clear the result list??

2007-07-20 Thread ASavitsky
Indeed, it does :(

Tracing code in ManagedEntityIdentityInterceptor:

private static final Log log = 
LogFactory.getLog(ManagedEntityIdentityInterceptor.class);
  | private void getFromWrapper(Object bean, Field field, Object dataModel)
  | throws Exception {
  | Object value = 
Contexts.getConversationContext().get(getFieldId(field));
  | if (value != null) {
  | if (dataModel == null) {
  | if (field.getName().equals(resultList))
  | log.warn(getFromWrapper: 
  | + 
bean.getClass().getSimpleName() + .
  | + field.getName() +  = 
 + value);
  | Reflections.set(field, bean, value);
  | } else {
  | setWrappedData(dataModel, value);
  | }
  | }
  | }
  | private void saveWrapper(Object bean, Field field, Object dataModel,
  | Object value) throws Exception {
  | if (field.getName().equals(resultList))
  | log.warn(saveWrapper: conversation. + 
getFieldId(field) +  = 
  | + value);
  | Contexts.getConversationContext().set(getFieldId(field), value);
  | if (dataModel == null) {
  | if (field.getName().equals(resultList))
  | log.warn(saveWrapper:  + 
bean.getClass().getSimpleName()
  | + . + field.getName() +  = 
null);
  | Reflections.set(field, bean, null);
  | } else {
  | setWrappedData(dataModel, null);
  | }
  | }
  | 

Tracing in EntityQuery:
private void initResultList() {
  | if (getEjbql() != null  getEjbql().startsWith(FROM 
Account)) {
  | log.warn(Entered initResultList: hashcode  + 
this.hashCode()
  | + , list =  + resultList);
  | }
  | if (resultList == null) {
  | javax.persistence.Query query = createQuery();
  | resultList = query == null ? null : 
query.getResultList();
  | }
  | if (getEjbql() != null  getEjbql().startsWith(FROM 
Account)) {
  | log.warn(Exited initResultList: hashcode  + 
this.hashCode()
  | + , list =  + resultList);
  | }
  | }
  | @Transactional
  | @Override
  | public List getResultList() {
  | if (getEjbql() != null  getEjbql().startsWith(FROM 
Account)) {
  | log.warn(Entered getResultList: hashcode  + 
this.hashCode()
  | + , list =  + resultList);
  | }
  | if (isAnyParameterDirty()) {
  | refresh();
  | }
  | initResultList();
  | try {
  | return truncResultList(resultList);
  | } finally {
  | if (getEjbql() != null  getEjbql().startsWith(FROM 
Account)) {
  | log.warn(Exited getResultList: hashcode  + 
this.hashCode()
  | + , list =  + resultList);
  | }
  | }
  | }
  | @Override
  | public void refresh() {
  | if (getEjbql() != null  getEjbql().startsWith(FROM 
Account)) {
  | log.warn(Entered refresh: hashcode  + this.hashCode()
  | + , list =  + resultList);
  | }
  | super.refresh();
  | resultCount = null;
  | resultList = null;
  | singleResult = null;
  | if (getEjbql() != null  getEjbql().startsWith(FROM 
Account)) {
  | log.warn(Exited refresh: hashcode  + this.hashCode()
  | + , list =  + resultList);
  | }
  | }
  | 

Tracing in AccountController (my code):
@Transactional
  | public void save() {
  | log.warn(save: before persist);
  | em.persist(selectedAccount);
  | log.warn(save: before flush);
  | em.flush();
  | selectedAccount = null;
  | log.warn(save: before refresh);
  | userAccounts.refresh();
  | log.warn(save: after refresh);
  | }
  | 

Log output on new record insert (resultList is supposed to go from one item to 
two):
WARN  [com.tdam.ptss.controller.AccountController] - save: before persist  
  | Hibernate: select SEQ_ACCOUNT.nextval from dual
  | WARN  [com.tdam.ptss.controller.AccountController] - save: before flush  
  | Hibernate: 

[jboss-user] [JBoss Seam] - Re: EntityQuery.refresh() doesn't clear the result list??

2007-07-19 Thread ASavitsky
damianharvey wrote : Why do you want your Query scoped to the conversation? 

So that all entities queried by this query would still be managed by the same 
entity manager that is used in the conversation. If I declare the query in 
session scope, I run into Entity is not managed by this session exceptions.

Now, why would the conversation scope be the cause of the problem, if it's 
running a long conversation? The conversation stays active during the whole 
described interaction, I verified that in the logs.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4065775#4065775

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4065775
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: EntityQuery.refresh() doesn't clear the result list??

2007-07-19 Thread ASavitsky
Page- or event-scoped query would be recreated (and reexecuted) for each and 
every action performed on the page, including record navigation/selection. My 
idea was to minimize database hits by caching the queried list in conversation 
scope, only updating it when I know its state would change, i.e. when a record 
gets updated/inserted/deleted.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4065801#4065801

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4065801
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: EntityQuery.refresh() doesn't clear the result list??

2007-07-19 Thread ASavitsky
I must add - sometimes the queried list would get quite big (say, if it were 
the audit record that were queried, it might be measured in millions of 
records), so it would be lazy-paged in this case, and re-executing such queries 
on every page action wouldn't be a good idea...

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4065803#4065803

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4065803
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: EntityQuery.refresh() doesn't clear the result list??

2007-07-19 Thread ASavitsky
First, thanks for the pointers. I'll look up the after transaction event in 
the CVS. It must have been a freshly added one, as it's not listed in the Seam 
2B docs... yet.

Now, in regards to anonymous wrote : How about using your debugger to find out 
why ? Sheesh!  where did I say that I didn't use one? Just tried to spare 
everyone the gory details, as my concern was mainly whether I use the 
components in a correct way - but since you asked, here goes...

To trace the problem, I used a modified EntityQuery class, with some logging 
added to the methods that manipulate resultList. Only modified methods are 
shown for brewity.
package org.jboss.seam.framework;
  | public class EntityQuery extends QueryEntityManager {
  | private static final Log log = LogFactory.getLog(EntityQuery.class);
  | private List resultList;
  | 
  | private void initResultList() {
  | log.warn(Entered initResultList(), ejbql  + getEjbql()
  | + , hashcode  + this.hashCode() + , list 
size 
  | + (resultList == null ? null : 
resultList.size()));
  | if (resultList == null) {
  | javax.persistence.Query query = createQuery();
  | resultList = query == null ? null : 
query.getResultList();
  | }
  | log.warn(Exited initResultList(), ejbql  + getEjbql() + , 
hashcode 
  | + this.hashCode() + , list size 
  | + (resultList == null ? null : 
resultList.size()));
  | }
  | @Transactional
  | @Override
  | public List getResultList() {
  | log.warn(Entered getResultList(), ejbql  + getEjbql() + , 
hashcode 
  | + this.hashCode() + , list size 
  | + (resultList == null ? null : 
resultList.size()));
  | if (isAnyParameterDirty()) {
  | refresh();
  | }
  | initResultList();
  | try {
  | return truncResultList(resultList);
  | } finally {
  | log.warn(Exited getResultList(), ejbql  + getEjbql()
  | + , hashcode  + this.hashCode() + , 
list size 
  | + (resultList == null ? null : 
resultList.size()));
  | }
  | }
  | @Override
  | @Transactional
  | public boolean isNextExists() {
  | log.warn(Entered isNextExists(), ejbql  + getEjbql() + , 
hashcode 
  | + this.hashCode() + , list size 
  | + (resultList == null ? null : 
resultList.size()));
  | return resultList != null  resultList.size()  
getMaxResults();
  | }
  | @Override
  | public void refresh() {
  | log.warn(Entered refresh(), ejbql  + getEjbql() + , hashcode 

  | + this.hashCode() + , list size 
  | + (resultList == null ? null : 
resultList.size()));
  | super.refresh();
  | resultCount = null;
  | resultList = null;
  | singleResult = null;
  | log.warn(Exited refresh(), ejbql  + getEjbql() + , hashcode 
  | + this.hashCode() + , list size 
  | + (resultList == null ? null : 
resultList.size()));
  | }
  | }

And here's the log output during the execution of controller's save() method 
for a new record:

WARN  [org.jboss.seam.framework.EntityQuery] - Entered refresh(), ejbql FROM 
Account WHERE closed = false AND familyExemption = false AND user = 
#{principal}, hashcode 10610605, list size 5  
  | WARN  [org.jboss.seam.framework.EntityQuery] - Exited refresh(), ejbql FROM 
Account WHERE closed = false AND familyExemption = false AND user = 
#{principal}, hashcode 10610605, list size null  
  | WARN  [org.jboss.seam.framework.EntityQuery] - Entered getResultList(), 
ejbql FROM Account WHERE closed = false AND familyExemption = false AND user = 
#{principal}, hashcode 10610605, list size 5  
  | WARN  [org.jboss.seam.framework.EntityQuery] - Entered initResultList(), 
ejbql FROM Account WHERE closed = false AND familyExemption = false AND user = 
#{principal}, hashcode 10610605, list size 5

ejbql and hashcode output is mainly to make sure we're dealing with the right 
query, and that it stays the same object during execution (i.e., not dropped 
and re-created).

As you can see, refresh() resets the resultList to null all right, yet the next 
time query gets accessed, it still contains the same old result list (refreshed 
one would contain 6 items, as one was added)! There are no modifications to 
resultList in between these calls, as evident from both the logs, and from the 
breakpoints I've been placing. My suspicions were at the javassist, that with 
the bytecode enhancement on 

[jboss-user] [JBoss Seam] - Re: EntityQuery.refresh() doesn't clear the result list??

2007-07-19 Thread ASavitsky
Thanks for your help Gavin.

There's a manual flush right before the refresh() call:

public void save() {
  | em.persist(selectedAccount);
  | em.flush();
  | selectedAccount = null;
  | userAccounts.refresh();
  | }

and the data does indeed get into the database. Here's the same log, this time 
with SQL logging included:

WARN  [org.jboss.seam.framework.EntityQuery] - before em.persist()  
  | Hibernate: select SEQ_ACCOUNT.nextval from dual
  | WARN  [org.jboss.seam.framework.EntityQuery] - before em.flush()  
  | Hibernate: insert into Account (CREATED_BY, CREATED_ON, MODIFIED_BY, 
MODIFIED_ON, ACCOUNT_NUMBER, closed, DEALER_NAME, discretionary, 
FAMILY_EXEMPTION, NAME_ON_STATEMENT, USER_ID, id) values (?, ?, ?, ?, ?, ?, ?, 
?, ?, ?, ?, ?)
  | Hibernate: update USERS set MODIFIED_BY=?, MODIFIED_ON=?, 
BLACKOUT_WINDOW=?, BUSINESS_UNIT=?, COVERAGE_REASON=?, DEPARTURE_DATE=?, 
email=?, FULL_NAME=?, MANAGER_EMAIL=?, MANAGER_NAME=?, role=?, START_DATE=?, 
status=?, TEMPLATE_ID=?, title=?, username=? where id=? and MODIFIED_ON=?
  | WARN  [org.jboss.seam.framework.EntityQuery] - before refresh()  
  | WARN  [org.jboss.seam.framework.EntityQuery] - Entered refresh(), ejbql 
FROM Account WHERE closed = false AND familyExemption = false AND user = 
#{principal}, hashcode 10610605, list size 5  
  | WARN  [org.jboss.seam.framework.EntityQuery] - Exited refresh(), ejbql FROM 
Account WHERE closed = false AND familyExemption = false AND user = 
#{principal}, hashcode 10610605, list size null  
  | WARN  [org.jboss.seam.framework.EntityQuery] - after refresh()  
  | Where's the SQL select that refreshes list?
  | WARN  [org.jboss.seam.framework.EntityQuery] - Entered getResultList(), 
ejbql FROM Account WHERE closed = false AND familyExemption = false AND user = 
#{principal}, hashcode 10610605, list size 5  
  | WARN  [org.jboss.seam.framework.EntityQuery] - Entered initResultList(), 
ejbql FROM Account WHERE closed = false AND familyExemption = false AND user = 
#{principal}, hashcode 10610605, list size 5  
  | 

But that's not even what baffles me. If resultList was set to null, it would 
have to be refreshed from the query. Now, where's the SELECT that refreshes the 
list? As you see, no SQL SELECT is logged between the places where resultList 
is null and where it's 5 items long again!

I'm suspecting that one of the interceptors resets the query state to what it 
was before the save() call - but again, it must be doing it in a way that my 
debugger doesn't catch. At least, the variable modification breakpoint in 
Eclipse doesn't catch that update.

I'll try it with the after transaction event, to see if it makes any 
difference, but still, it does look strange...

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4065879#4065879

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4065879
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: EntityQuery.refresh() doesn't clear the result list??

2007-07-19 Thread ASavitsky
Nope, raiseAfterTransactionSuccessEvent() didn't help. Here's the code I used:

@Observer (refreshAccounts)
  | public void refresh() {
  | userAccounts.refresh();
  | }
  | @Transactional
  | public void save() {
  | em.persist(selectedAccount);
  | em.flush();
  | selectedAccount = null;
  | 
Events.instance().raiseTransactionSuccessEvent(refreshAccounts);
  | }

and the result is exactly the same, both behavior-wise and log-wise.

Now, the EntityQuery is declared as @In private EntityQuery userAccounts; - 
does it also need to be outjected if I change its internals, for the change to 
take effect?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4065886#4065886

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4065886
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - EntityQuery.refresh() doesn't clear the result list??

2007-07-18 Thread ASavitsky
Not sure whether it's a bug, or just me, but it doesn't look like the refresh() 
method is doing anything for me - the result list is stale and never refreshes, 
until I start a new coversation...

I have a simple CRUD screen where the edit form is combined with the record 
listing:
h:form id=listForm styleClass=form
  | ui:repeat var=transaction value=#{userTransactions.resultList}
  | h:commandLink 
action=#{transactionController.select(transaction)} 
value=#{transaction.account.accountNumber}  /
  | /ui:repeat
  | h:commandButton action=#{transactionController.create} value=Add 
New /
  | /h:form
  | h:form id=rowForm styleClass=form rendered=#{not empty 
selectedTransaction}
  | !-- form fields go here --
  | h:commandButton action=#{transactionController.save} value=Save /
  | h:commandButton action=#{transactionController.remove} 
value=Remove immediate=true rendered=#{not selectedTransaction.new} /
  | h:commandButton action=#{transactionController.cancel} value=Close 
immediate=true /
  | /h:form
The query for record listing is an EntityQuery defined in components.xml:
framework:entity-query name=userTransactions scope=conversation 
order=transactionDate, securityName
  | framework:ejbql
  | FROM Transaction
  | WHERE user = #{principal}
  | /framework:ejbql
  | /framework:entity-query
and the controller code has the EntityQuery injected, and refreshes the list as 
necessary:
@Name (transactionController)
  | @Scope (ScopeType.CONVERSATION)
  | public class TransactionController extends BaseController {
  | @Out (required = false)
  | private Transaction selectedTransaction;
  | @Inprivate EntityQuery userTransactions;
  | 
  | public void cancel() {
  | selectedTransaction = null;
  | }
  | public void create() {
  | selectedTransaction = new Transaction();
  | }
  | @Transactional
  | public void remove() {
  | em.remove(selectedTransaction);
  | em.flush();
  | selectedTransaction = null;userTransactions.refresh();
  | }
  | @Transactional
  | public void save() {
  | em.persist(selectedTransaction);
  | em.flush();
  | selectedTransaction = null;userTransactions.refresh();
  | }
  | public void select(Transaction transaction) {
  | selectedTransaction = transaction;
  | }
  | }
The whole thing runs in a long conversation, started when the page is entered:
page view-id=/attestation/transactions.xhtml
  | begin-conversation flush-mode=manual join=true /
  | /page

Now, any time a new record is inserted, or an old one removed, the list should 
refresh, shouldn't it? It doesn't, and I'm running out of any ideas on to why 
would this happen... Help, anyone?

Thanks,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4065436#4065436

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4065436
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Is there a way to stop faces messages on some events

2007-07-13 Thread ASavitsky
Or just use identity.quietLogin() instead of the usual login()

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4064039#4064039

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4064039
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - BaseSeamTest - unnecessary depencency on JBoss Embedded?

2007-07-05 Thread ASavitsky
I noticed that the org.jboss.seam.mock.BaseSeamTest has some references to what 
it seems to be JBoss Embedded:

import org.jboss.deployers.spi.DeploymentException;
  | import org.jboss.embedded.Bootstrap;
  |  snip 
  |protected void startJbossEmbeddedIfNecessary() throws 
DeploymentException, IOException {
  |   if ( !started ) {
  |  Bootstrap bootstrap = Bootstrap.getInstance();
  |  bootstrap.bootstrap();
  |   snip 
  |   }
  |}

Is this intentional? As a result, SeamTest refuses to start (throws 
ClassNotFoundException) unless JBoss Embedded is present. When I removed the 
above method, SeamTest executed normally in a standalone environment, so 
there's no real dependency there. 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4061002#4061002

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4061002
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: BaseSeamTest - unnecessary depencency on JBoss Embedded?

2007-07-05 Thread ASavitsky
Given that we're stuck here with Tomcat anyways, I'd say it doesn't make much 
sense to use JBE for tests if it's not used in production (and if it is capable 
of running standalone - which it is), so, yes, if that dependency could be 
reworked into a soft one, that would greatly help...

Thanks,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4061016#4061016

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4061016
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: BaseSeamTest - unnecessary depencency on JBoss Embedded?

2007-07-05 Thread ASavitsky
Yes, and I declare it in persistence.xml, via hibernate.* properties. Have to 
maintain two persistence.xml files, though (one for app and one for test), but 
since all my test code is in a separate project, it works pretty well (the 
testing version overrides the app).

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4061033#4061033

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4061033
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: BaseSeamTest - unnecessary depencency on JBoss Embedded?

2007-07-05 Thread ASavitsky
Looks like there's one created already: 
http://jira.jboss.org/jira/browse/JBSEAM-1538 - my bad for not checking the 
JIRA in the first place. Looks like there's a patch provided as well - I'll try 
it out.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4061040#4061040

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4061040
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - s:selectDate doesn't work in IE6?

2007-07-04 Thread ASavitsky
The script for s:selectDate seems to choke on the following line (Seam 2B 
official distribution):

org.jboss.seam.ui.resource.date.calendar.js, line 458:
if (divs != popupDiv  divs.style  !/\D/(divs.style.zIndex))

Apparently, IE doesn't like the /\D/ part, and, frankly, I don't even have an 
idea on what this expression is supposed to achieve, otherwise I'd have 
submitted the patch already... BTW, removing that last expression makes popup 
to work on IE.

I checked the latest CVS, and it looks like the whole file is deleted now - 
what happened to it?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4060521#4060521

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4060521
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam 2.0 BETA

2007-06-29 Thread ASavitsky
KnisterPeter wrote : You mention that Tomcat 5.5 is not compatible with JSF 
1.2, but I have a running Tomcat 5.5 with Seam 1.2.1 and JSF RI 1.2. ;)
  | Why should it be incompatible?

I believe this incompatibility only applies if you're not using Facelets, as 
Tomcat 5.5 doesn't support JSP 2.1 that JSF 1.2 uses. Actually, it might be a 
good idea to clarify that point in Seam docs, to not freak people out 
unnecessarily :)

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4059262#4059262

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4059262
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: s:decorate vs ui:decorate - different behavior for multi

2007-06-28 Thread ASavitsky
Judging by what Pete said, it doesn't look there are many chances for this one 
to be fixed, but I opened a JIRA anyway, just in case...

http://jira.jboss.org/jira/browse/JBSEAM-1572

Thanks,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4058725#4058725

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4058725
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: s:decorate vs ui:decorate - different behavior for multi

2007-06-28 Thread ASavitsky
One idea on how this might be fixed - allow s:decorate to take for attribute, 
that would be used to identify the input field, if one is not provided within 
the tag body. That way, users can decorate the label without the field (most 
common case in forms, IMO) without losing the ability to AJAXify the thing.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4058745#4058745

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4058745
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Seam 2 Beta: XSD missing for transaction: and web: namespace

2007-06-27 Thread ASavitsky
Unless I'm using the wrong URLs, it looks like the XSD definitions are missing 
for transaction and web namespaces. Here's my components.xml:

?xml version=1.0 encoding=UTF-8?
  | components xmlns=http://jboss.com/products/seam/components;
  | xmlns:core=http://jboss.com/products/seam/core;
  | xmlns:persistence=http://jboss.com/products/seam/persistence;
  | xmlns:transaction=http://jboss.com/products/seam/transaction;
  | xmlns:security=http://jboss.com/products/seam/security;
  | xmlns:pdf=http://jboss.com/products/seam/pdf;
  | xmlns:web=http://jboss.com/products/seam/web;
  | xmlns:framework=http://jboss.com/products/seam/framework;
  | xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  | xsi:schemaLocation=
  | http://jboss.com/products/seam/components 
http://jboss.com/products/seam/components-2.0.xsd
  | http://jboss.com/products/seam/core 
http://jboss.com/products/seam/core-2.0.xsd
  | http://jboss.com/products/seam/persistence 
http://jboss.com/products/seam/persistence-2.0.xsd
  | http://jboss.com/products/seam/transaction 
http://jboss.com/products/seam/transaction-2.0.xsd
  | http://jboss.com/products/seam/security 
http://jboss.com/products/seam/security-2.0.xsd
  | http://jboss.com/products/seam/pdf 
http://jboss.com/products/seam/pdf-2.0.xsd
  | http://jboss.com/products/seam/web 
http://jboss.com/products/seam/web-2.0.xsd
  | http://jboss.com/products/seam/framework 
http://jboss.com/products/seam/framework-2.0.xsd;
  | ...snip...
  | /components
  | 

All namespaces resolved fine, except 
http://jboss.com/products/seam/transaction-2.0.xsd and 
http://jboss.com/products/seam/web-2.0.xsd. I tried these links in browser, 
they are broken. All other XSD references are ok.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4058359#4058359

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4058359
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Seam Eclipse project structure (newbie question)

2007-06-21 Thread ASavitsky
tptackab wrote : My best guess would be as follows:
  | my-application/
  |   | src/
  |   | com.myapp.foo.java
  |   | com.myapp.bar.java
  |   | ...
  |   | WebContent/
  |   | index.html
  |   | index.xhtml
  |   | foopage.xhtml
  |   | barpage.xhtml
  |   | META-INF/
  |   | MANIFEST.MF
  |   | WEB-INF/
  |   | faces-config.xml
  |   | web.xml
  |   | components.xml
  |   | seam.properties
  |   | LIB/
  |   | jboss-seam.jar
  |   | jboss-seam-ui.jar
  |   | el-api.jar
  |   | el-ri.jar
  |   | jsf-facelets.jar
  |   | hibernate3.jar
  |   | hibernate-annotations.jar
  |   | ...  
  | 
  | ...
  | 
  | Am I on the right track?

In short, yes, you are. The standard WAR structire (without application code in 
JAR) works ok for Seam. I'm currently using Eclipse 3.2 (waiting for 3.3 to hit 
GA) + WTP 1.5 (again, I'm behind you there), and my setup is pretty much the 
one you've shown, with only one difference: all JARs are instead placed in 
my-application/lib, and linked to the project as J2EE Module Dependencies. 
It's only a matter of taste though, placing them in WEB-INF/lib would work just 
the same (I tried).

And just for your reference, here's the list of JARs I have in the project, in 
case you're trying to figure out which ones you're missing:

lib/commons/commons-beanutils-1.7.0.jar
  | lib/commons/commons-codec-1.3.jar
  | lib/commons/commons-collections-3.2.jar
  | lib/commons/commons-digester-1.7.jar
  | lib/commons/commons-fileupload-1.1.1.jar
  | lib/commons/commons-lang-2.2.jar
  | lib/commons/commons-logging-1.1.jar
  | lib/commons/itext-2.0.1.jar
  | lib/commons/log4j-1.2.13.jar
  | lib/jpa/antlr-2.7.6.jar
  | lib/jpa/asm.jar
  | lib/jpa/cglib-2.1.3.jar
  | lib/jpa/dom4j-1.6.1.jar
  | lib/jpa/ejb3-persistence.jar
  | lib/jpa/hibernate-3.2.3.jar
  | lib/jpa/hibernate-annotations-3.3.0.jar
  | lib/jpa/hibernate-commons-annotations.jar
  | lib/jpa/hibernate-entitymanager-3.3.1.jar
  | lib/jpa/hibernate-validator-3.0.0.jar
  | lib/jpa/javassist.jar
  | lib/jpa/jboss-archive-browsing.jar
  | lib/jsf/ajax4jsf-1.1.0.jar
  | lib/jsf/el-api.jar
  | lib/jsf/el-ri.jar
  | lib/jsf/jsf-api.jar
  | lib/jsf/jsf-facelets-1.1.11.jar
  | lib/jsf/jsf-impl.jar
  | lib/jsf/oscache-2.3.2.jar
  | lib/mc/concurrent.jar
  | lib/mc/jboss-common-jdbc-wrapper.jar
  | lib/mc/jboss-common.jar
  | lib/mc/jboss-container.jar
  | lib/mc/jboss-dependency.jar
  | lib/mc/jboss-j2ee.jar
  | lib/mc/jboss-j2se.jar
  | lib/mc/jboss-jca.jar
  | lib/mc/jboss-local-jdbc.jar
  | lib/mc/jboss-microcontainer.jar
  | lib/mc/jboss-security.jar
  | lib/mc/jboss-system.jar
  | lib/mc/jboss-transaction.jar
  | lib/mc/jnpserver.jar
  | lib/mc/xercesImpl.jar
  | lib/seam/jboss-seam-debug.jar
  | lib/seam/jboss-seam-pdf.jar
  | lib/seam/jboss-seam-ui.jar
  | lib/seam/jboss-seam.jar
  | 

About half of them is the microcontainer, really, so if you're using embedded 
EJB, YMMV.

HTH,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4056624#4056624

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4056624
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: fetchtype.LAZY results in JSF validation error

2007-06-04 Thread ASavitsky
petemuir wrote : roeber wrote : petemuir wrote : 
  |   |   | 1) Association fetching in Hibernate is lazy by default AFAIK
  |   |   | 
  |   | 
  |   | Are you sure? This would make things strange anymore.
  | 
  | Yep.
  | 
  | 
http://www.hibernate.org/hib_docs/annotations/reference/en/html/entity.html#d0e1570
  | 
http://www.hibernate.org/hib_docs/v3/reference/en/html/performance.html#performance-fetching-lazy

Nope.
Quoting from the first link (section 2.2.5.5):
anonymous wrote : @OneToMany  and @ManyToMany associations are defaulted to 
LAZY and @OneToOne and @ManyToOne are defaulted to EAGER

and he had a @ManyToOne in his code, which is EAGER by default, not LAZY.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4050979#4050979

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4050979
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Outjected @DataModelSelection value lagging?

2007-06-01 Thread ASavitsky
Myfaces are buggy, I had similar problems with it lately. Try switching to the 
JSF RI, see if the problem goes away.

Alex.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4050503#4050503

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4050503
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Outjected @DataModelSelection value lagging?

2007-06-01 Thread ASavitsky
How do you select your items? Via the s:link that's labeled Refresh? s:link 
doesn't submit the form, so I doubt it will work for row selection... try 
h:commandLink instead (I pointed mine to a blank method in the backing bean)

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4050595#4050595

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4050595
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Which JARS do we really need for a seam application?

2007-05-04 Thread ASavitsky
To answer your questions about specific JARs you listed...

ajax4jsf-1.1.1-SNAPSHOT.jar - DO WE NEED THIS TO USE AJAX4JSF? Required for 
Ajax4Jsf, along with oscache JAR. Also RichFaces need these, too

el-api.jar - WHAT ARE THOSE FOR?
el-ri.jar - WHAT ARE THOSE FOR? Both are part of JSF implementation (either RI 
or MyFaces) and are required.

itext-2.0.1.jar - DO WE NEED THIS FOR PDF FUNCTIONALITY? Yes

jsf-facelets.jar - NEEDED? Yes, if you use Facelets

jstl-1.1.0.jar - NEEDED? Might be, if you use JSPs with JSF. If you use 
Facelets, this JAR is not required

myfaces-api-1.1.4.jar - NEEDED?
myfaces-impl-1.1.4.jar - NEEDED? Yes, but only if you use MyFaces JSF 
implementation. Not needed if you use RI

richfaces-3.0.1-SNAPSHOT.jar - NEEDED FOR RICH FACES? Yes

Also, some other JARs you listed are only needed for specific 
environments/tasks, such as Portlet JAR or JCaptcha

HTH,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4043232#4043232

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4043232
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: While Seam is great, is any weakness of this framework?

2007-05-04 Thread ASavitsky
The only complaint I have about Seam so far, is the recommended packaging for 
Tomcat. The Microcontainer-based packaging places very serious restrictions on 
the application (for example, try passing the Tomcat-configured DataSource into 
the MC-based app) that makes this configuration not acceptable for production 
environments, leaving us Tomcat users feeling like second-class citizens.

There are alternatives (using a JTA implementation), but they are not 
documented anywhere, so whoever decides to take this route is basically on 
their own (it took me awhile to get my environment running). Heck, some of the 
open-source JTA implementations are even coming from JBoss itself (JBoss 
Transactions), so why not dump the MC abomination altogether and use JBoss 
JTA/JCA modules directly, instead? 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4043279#4043279

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4043279
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: While Seam is great, is any weakness of this framework?

2007-05-04 Thread ASavitsky
Because we're a major bank where everyone cannot run whatever they please. 
There are tons of regulations regarding what is allowed to run production 
environments. There's an architectural department that makes such decisions for 
a few years ahead. There are administrators that are hired with specific skill 
sets. But, yes, I guess I'll simply go to our production admins and say Hey, 
why aren't you willing to just download JBoss AS for free and use the embedded 
Tomcat?. Yes, that suddenly seems a terribly good idea...

Seriously though, we here have WebSphere for mission-critical apps (no, I don't 
want to go into argument why are we using it), plus Tomcat for everything else 
that doesn't require a full-blown appserver. Tomcat administration is order of 
magnitude simpler than it is for an appserver, so, in the long run, these guys 
are saving a good money on support costs, both hardware and salaries.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4043296#4043296

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4043296
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: While Seam is great, is any weakness of this framework?

2007-05-04 Thread ASavitsky
You missed the point. Yes, time was spent integrating Seam with plain JTA and 
Tomcat (and I don't regret it), but I don't see why Seam documentation and 
examples shouldn't incorporate these findings. So far, I've seen no interest in 
making Tomcat users' life easier.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4043305#4043305

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4043305
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: While Seam is great, is any weakness of this framework?

2007-05-04 Thread ASavitsky
Thanks Pete. I had my findings posted a while ago in this forum 
(http://www.jboss.com/index.html?module=bbop=viewtopict=104525), and now 
waiting for JIRA admins to resolve my inability to post new issues there. My 
integration covers JOTM, Atomikos and JBoss Transactions (Arjuna JTA) - 
frankly, I hoped that the integration with the latter one would generate some 
more attention from JBoss crowd, that being a JBoss product and such. I also 
tried to explore integration with the JTA/JCA taken from the JBoss AS, but 
couldn't find any documentation on these modules (heck, even Javadoc is a pain 
to find!)

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4043320#4043320

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4043320
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Is seam-gen really a good idea to learn about seam?

2007-05-04 Thread ASavitsky
fperedo wrote : Hi!
  | -First, transient POJOs: show me what can be done in 
  | SEAM without JPA or Hibernate. (a really simple in memory POJOs example 
with 1 page first, and then 2 or three) ¿this part needs the microcontainer?
No, though one does get included in the Seam-PDF example. You can safely drop 
most of MC/JPA/Hibernate stuff in such setup - though Seam does have some 
dependencies I couldn't get rid from: namely ejb3-persistence.jar (doh!) and 
hibernate-validator.jar (expressions, facesMessages and validators Seam 
components)
fperedo wrote : -Second, persistent POJOs: evolve from the first tutorial and 
make some of its POJOs persistent (using just Hibernate, then show how to do it 
with JPA annotations) ¿this part needs the microcontainer?
there are alternatives to using MC - see 
http://www.jboss.com/index.html?module=bbop=viewtopict=104525 - though Pete 
is right, MC is the easiest to set up
fperedo wrote : 
  | -Third, full J2EE, add stuff like stateless  statefull POJOS that can only 
be done having a full J2EE5 stack (is there a difference between having a full 
J2EE5 stack and using the microcontainer?)
From top of my head (incomplete list):
Stateful, Stateless and message-driven EJBs (forget about @Stateful and 
@Stateless). Entity beans are in, though.
Persistence Context injection via @PersistenceContext (use @In)
You have to (or, rather, you better to) use Seam-managed transactions and 
Seam-managed persistence contexts if you're outside J2EE container

HTH,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4043324#4043324

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4043324

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: issue with itext pdf generation and JSF RI

2007-05-02 Thread ASavitsky
f:view doesn't have a contentType attribute, sorry.

And for some reason I don't have the ability to open JIRA issues. Damn.

borisrodman's suggestion works, though - one doesn't even need to recompile the 
whole source, just place the corrected class in the project, it will 
automatically take precedence for the one in Seam JAR.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4042421#4042421

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4042421
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: issue with itext pdf generation and JSF RI

2007-05-02 Thread ASavitsky
Whoa, it worked! Thanks Rob  Christian :)

(actually, it's the JSF specs that I checked for the contentType attribute - 
for some reason it's not listed even there...)

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4042540#4042540

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4042540
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Seam PDF - missing XSD?

2007-05-02 Thread ASavitsky
I've noticed that, for most of the Seam namespaces, there's an XSD available, 
for validation and content-assist purposes. There's one for components 
(http://jboss.com/products/seam/components-1.2.xsd), core 
(http://jboss.com/products/seam/core-1.2.xsd), security, and framework (and 
maybe some others, I haven't checked). However, I couldn't find one for Seam 
PDF - does it exist at all?

Thanks,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4042555#4042555

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4042555
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: issue with itext pdf generation and JSF RI

2007-05-01 Thread ASavitsky
Have you opened a JIRA on this one? I'm still getting the same problem you 
described. BTW, it only shows up in RI - MyFaces 1.1.4 works fine

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4042224#4042224

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4042224
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - @In with configurable component name - is it possible?

2007-04-25 Thread ASavitsky
Is it possible to declare an @In property in an (abstract) superclass, but 
allow subclasses to configure the actual component name that gets injected? 
Currently, the only way I found was to declare an abstract String 
getComponentName() in superclass, and retrieve the query via 
Component.getInstance(getComponentName()) instead of @In declaration - but I 
consider this way to be rather ugly.  Are there any alternatives, or maybe some 
planned enhancements?

Thanks,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4040688#4040688

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4040688
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @In with configurable component name - is it possible?

2007-04-25 Thread ASavitsky
My main concern with your approach is that the whole @In semantics gets lost 
from the parent class, even though it clearly belongs there. I was thinking of 
something like an @Override annotation that would look something like:

public class Parent {
  | @In private Foo foo;
  | }
  | 
  | @Override (
  | property = foo,
  | overrides = {
  | @In (specificFoo)
  | })
  | public class Child {
  | }

I found that it's possible to do the overriding in XML, but that's static DI, 
not bijection. I'll try making foo a Seam's ValueBinding, maybe that would 
result in true bijected foo...

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4040701#4040701

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4040701
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: @In with configurable component name - is it possible?

2007-04-25 Thread ASavitsky
Well, if it's the parent class that (exclusively) makes the use of foo, then I 
guess it makes sense to contain the foo declaration in parent class as much as 
possible. The only thing that child class does is wiring - specifying what 
component gets injected into foo. 

Regardign the second point - yes, it does look complicated in this particular 
case. Yet, the generic way of overriding annotations in class hierarchy 
(something that Java currently lacks on the language level, IMHO) might get 
useful in some situations, even if it's not going to be an often-used feature.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4040732#4040732

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4040732
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: What is the difference between EJB and POJO transactions

2007-04-23 Thread ASavitsky
[EMAIL PROTECTED] wrote : I recommend the last option, since it works with 
whatever components you execute and it is good from a scalability perspective. 
Also, you don't need to write any code or use any annotations with it.
  | 

Now that I've read the bold part, I'm a bit confused about the relationship 
between @Transactional and TransactionalSeamPhaseListener (I thought that I 
need both). Do you mean, that if I use the TransactionalSeamPhaseListener, I 
don't need to mark my POJOs with @Transactional at all?

Thanks,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4039855#4039855

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4039855
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - BUG - EntityQuery paging requires client-side state saving?

2007-04-23 Thread ASavitsky
I haven't found any mentions on that in Seam docs, but it seems that the 
example code in 10.3 (Query Objects) that shows pagination support for 
EntityQuery, only works when javax.faces.STATE_SAVING_METHOD is client. When 
the state is saved on the server, the application always shows the first page. 
Is this the way it was intended to work, or is this a bug?

components.xml:
fwk:entity-query name=auditRecords ejbql=FROM AuditInfo
  | order=createdOn DESC max-results=10 /

auditLog.xhtml:
h:dataTable id=table var=auditRecord 
value=#{auditRecords.resultList}
  | f:facet name=footer
  | h:panelGrid columns=4
  | s:link value=First
  | f:param name=start value=0 /
  | /s:link
  | s:link value=Prev
  | f:param name=start 
value=#{auditRecords.previousFirstResult} /
  | /s:link
  | s:link value=Next
  | f:param name=start 
value=#{auditRecords.nextFirstResult} /
  | /s:link
  | s:link value=Last
  | f:param name=start 
value=#{auditRecords.lastFirstResult} /
  | /s:link
  | /h:panelGrid
  | /f:facet
  | h:column
  | f:facet name=header
  | h:outputText value=Id /
  | /f:facet
  | h:outputText value=#{auditRecord.id} /
  | /h:column
  | h:column
  | f:facet name=header
  | h:outputText value=Date /
  | /f:facet
  | h:outputText value=#{auditRecord.createdOn} /
  | /h:column
  | h:column
  | f:facet name=header
  | h:outputText value=User /
  | /f:facet
  | h:outputText value=#{auditRecord.createdBy} /
  | /h:column
  | /h:dataTable
  | 

pages.xml:
page view-id=/auditLog.xhtml
  | param name=start value=#{auditRecords.firstResult} /
  | /page
  | 

Thanks,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4039865#4039865

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4039865
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: BUG - EntityQuery paging requires client-side state savi

2007-04-23 Thread ASavitsky
You're right, it works flawlessly in RI 1.2.04. Seems that MyFaces ain't as 
good as it was before, with such major flaws being released... Does Seam 
recommend using one implementation in preference to the other?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4039885#4039885

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4039885
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Tomcat deployment with external datasource - is it possi

2007-04-11 Thread ASavitsky
Great work, Mike! This one gets +1 from me as well.

BTW, in the meantime I managed to configure Seam (with managed transactions, 
PCs and the like) without the microcontainer at all - using either JOTM, 
Atomikos, or JBoss Transactions. Actually, the latter, being a JBoss product, 
might even be suitable to be included as a Seam-Tomcat example (instead of 
Microcontainer)

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4036342#4036342

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4036342
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Tomcat deployment with external datasource - is it possi

2007-04-11 Thread ASavitsky
Umm... I'd rather post it here, you can copy it later to Wiki if you know how 
to do it ... as I don't :(

Note: each of the JTA implementations used has its own problems: JOTM doesn't 
automatically shutdown with Tomcat; Atomikos has its own log framework that is 
a pain to configure (they promised to migrate to log4j/CL though); and JBoss Tx 
doesn't seem to have a way to configure XA-aware datasources (I've asked for 
help on their forum, waiting for answers). Nevertheless, all of them allow to 
start up Seam without the Microcontainer (that's 3.5Mb of JARs and a bunch of 
nasty restrictions, mind you...). All that is needed is the Tomcat's standard 
META-INF/context.xml file (or use server.xml if you prefer), some declarations 
in META-INF/persistence.xml file, plus some glue code and some property files.

JOTM setup (http://jotm.objectweb.org/):

context.xml:
?xml version=1.0 encoding=UTF-8?
  | Context
  | Resource name=DataSource auth=Container type=javax.sql.DataSource
  | maxActive=100 maxIdle=30 maxWait=1 username=user
  | password=password 
driverClassName=oracle.jdbc.driver.OracleDriver
  | url=url
  | factory=org.objectweb.jndi.DataSourceFactory /
  | Transaction name=UserTransaction auth=Container
  | type=javax.transaction.UserTransaction
  | factory=org.objectweb.jotm.UserTransactionFactory 
jotm.timeout=6 /
  | /Context

persistence.xml:
?xml version=1.0 encoding=UTF-8?
  | persistence xmlns=http://java.sun.com/xml/ns/persistence;
  | xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  | xsi:schemaLocation=http://java.sun.com/xml/ns/persistence 
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd;
  | version=1.0
  | persistence-unit name=unitName transaction-type=JTA
  | jta-data-sourcejava:comp/env/DataSource/jta-data-source
  | properties
  | property 
name=hibernate.transaction.manager_lookup_class
  | 
value=org.hibernate.transaction.JOTMTransactionManagerLookup /
  | /properties
  | /persistence-unit
  | /persistence

jndi.properties (place in classpath):
java.naming.factory.initial=com.sun.jndi.rmi.registry.RegistryContextFactory
  | java.naming.provider.url=rmi://localhost:1099

carol.properties (place in classpath):
carol.protocols=jrmp
  | carol.start.jndi=false
  | carol.start.ns=false
  | carol.start.rmi=false
  | carol.jndi.java.naming.factory.url.pkgs=org.apache.naming

JOTM is the only one that doesn't need any glue code, as all the necessary 
factories (Hibernate TM lookup, UT factory, and XA DataSource factory) are 
already in place.

Atomikos setup (http://www.atomikos.com/):

context.xml:
?xml version=1.0 encoding=UTF-8?
  | Context
  | Resource auth=Container name=DataSource
  | type=com.atomikos.jdbc.nonxa.NonXADataSourceBean 
connectionTimeout=20
  | factory=org.apache.naming.factory.BeanFactory poolSize=1
  | user=user password=password
  | driverClassName=oracle.jdbc.driver.OracleDriver
  | url=url /
  | Transaction name=UserTransaction auth=Container
  | type=javax.transaction.UserTransaction 
factory=test.util.AtomikosUTLookup /
  | /Context

persistence.xml:
?xml version=1.0 encoding=UTF-8?
  | persistence xmlns=http://java.sun.com/xml/ns/persistence;
  | xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  | xsi:schemaLocation=http://java.sun.com/xml/ns/persistence 
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd;
  | version=1.0
  | persistence-unit name=unitName transaction-type=JTA
  | jta-data-sourcejava:comp/env/DataSource/jta-data-source
  | properties
  | property 
name=hibernate.transaction.manager_lookup_class
  | 
value=com.atomikos.icatch.jta.hibernate3.TransactionManagerLookup /
  | /properties
  | /persistence-unit
  | /persistence

jta.properties (place in classpath):
com.atomikos.icatch.service=com.atomikos.icatch.standalone.UserTransactionServiceFactory

Atomikos needs one piece of glue code, and that is to look up the 
UserTransaction properly. The developers promised to create the lookup class in 
later versions, but for now, use this:

public class AtomikosUTLookup implements ObjectFactory {
  | public AtomikosUTLookup() {
  | }
  | public Object getObjectInstance(Object obj, Name name, Context nameCtx,
  | Hashtable environment) throws Exception {
  | return new UserTransactionImp();
  | }
  | }

JBoss Transactions (formerly Arjuna JTA) setup 
(http://labs.jboss.com/portal/jbosstm/):

context.xml:
?xml version=1.0 encoding=UTF-8?
  | Context
  | Resource name=DataSource auth=Container type=javax.sql.DataSource
  | maxActive=100 maxIdle=30 maxWait=1 username=user
  | 

[jboss-user] [JBoss Seam] - Re: Tomcat deployment with external datasource - is it possi

2007-04-11 Thread ASavitsky
I haven't got that far yet :( I guess the JTA will need to be hooked-up 
manually...

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4036496#4036496

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4036496
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - EL enhancements inside Facelet templates - got an exception

2007-04-09 Thread ASavitsky
What I was trying to achieve was a generic sortable header for dataTable. 
Here's the template:

header.xhtml
!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN
  | http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
  | ui:composition xmlns:h=http://java.sun.com/jsf/html;
  | xmlns:f=http://java.sun.com/jsf/core;
  | xmlns:ui=http://java.sun.com/jsf/facelets;
  | h:column
  | f:facet name=header
  | h:commandLink action=#{bean.sort(columnName)}
  | h:outputText value=#{columnLabel} /
  | h:outputText value=#{sortAscending ? ' ASC' : 
' DESC'}
  | rendered=#{sortColumn == columnName} 
/
  | /h:commandLink
  | /f:facet
  | ui:insert /
  | /h:column
  | /ui:composition
  | 

This template is declared in Facelet taglib as:

?xml version=1.0?
  | !DOCTYPE facelet-taglib PUBLIC
  | -//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN
  | 
https://facelets.dev.java.net/source/browse/*checkout*/facelets/src/etc/facelet-taglib_1_0.dtd;
  | facelet-taglib
  | namespacehttp://www.tdsecurities.com/jsf/namespace
  | tag
  | tag-nameheader/tag-name
  | sourcetags/header.xhtml/source
  | /tag
  | /facelet-taglib
  | 

and is used as follows:

h:dataTable id=table var=auditRecord value=#{auditRecords} 
rows=10
  | c:header bean=#{auditLog} columnName=id columnLabel=ID
  | h:commandLink value=#{auditRecord.id} 
action=#{auditLog.select} /
  | /c:header
  | /h:dataTable
  | 

The link renders, but clicking on it yields:

ERROR [org.jboss.seam.web.ExceptionFilter] - uncaught exception  
  | javax.servlet.ServletException: Error calling action method of component 
with id _id4:table:_id19
  | at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  | at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | at 
org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
  | at 
org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60)
  | at 
org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
  | at 
org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
  | at 
org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
  | at 
org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  | at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  | at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  | at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  | at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  | at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  | at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  | at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  | at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  | at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  | at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
  | at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
  | at java.lang.Thread.run(Thread.java:595)
  | ERROR [org.jboss.seam.web.ExceptionFilter] - exception root cause  
  | javax.faces.FacesException: Error calling action method of component with 
id _id4:table:_id19
  | at 
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:77)
  | at javax.faces.component.UICommand.broadcast(UICommand.java:109)
  | at javax.faces.component.UIData.broadcast(UIData.java:517)
  | at 
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
  | at 
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
  | at 

[jboss-user] [JBoss Seam] - Re: Possible bug - POJO doesn't automatically join transacti

2007-04-04 Thread ASavitsky
Ok, thanks for the clarification. So, as I understand it, managed transactions 
give me a transaction around the method, and managed PCs give me an injected EM 
- but this doesn't mean that the EM automatically joins the transaction? 
Searched the reference docs, but haven't found any mention on whether it works 
one way or the other... 

Still, the fact that it only breaks for transient entities and not for managed 
ones, is hard to explain (for me, anyway). Also, it only breaks when the @Out 
annotation is present, which makes it even more strange. 

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4034540#4034540

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4034540
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Possible bug - POJO doesn't automatically join transaction

2007-04-03 Thread ASavitsky
Environment: Tomcat 5.5 + Seam 2.1.0 + Microcontainer, Seam-managed 
transactions and PCs.

UserBean.java - displays a list of existing User records, allowing user to 
select one (a-la clickable lists example) and edit it, or to create a new 
record:
@Name (userBean)
  | @Scope (ScopeType.CONVERSATION)
  | @Transactional
  | public class UserBean extends EntityController {
  | @DataModelSelection
  | @Out (required = false)
  | private User selectedUser;
  | @DataModel
  | private ListUser users;
  | 
  | public void addUser() {
  | selectedUser = new User();
  | }
  | public void cancelEdit() {
  | selectedUser = null;
  | }
  | @Factory (users)
  | @Begin (flushMode = FlushModeType.MANUAL)
  | public void createRecords() {
  | users = createQuery(SELECT u FROM User u).getResultList();
  | }
  | public void saveUser() {
  | // getEntityManager().joinTransaction();
  | persist(selectedUser);
  | flush();
  | addFacesMessage(User #{selectedUser.username} succesfully 
saved);
  | createRecords();
  | }
  | public void selectUser() {
  | }
  | }
  | 

When executing saveUser(), if selectedUser is a transient (new) instance, the 
flush() call throws a javax.persistence.TransactionRequiredException: no 
transaction is in progress. If the first line is uncommented, the save 
completes successfully (verified in DB). When selectedUser is a managed 
(existing) instance, the updates complete successfully whether the first line 
is commented or not.

Is this a bug? Am I using the bean in a correct way?

Thanks,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4034230#4034230

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4034230
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Possible bug - POJO doesn't automatically join transacti

2007-04-03 Thread ASavitsky
EntityHome.persist might call joinTransaction, but EntityController.persist 
(which I use) certainly does not. Anyway, here's the stack trace:

ERROR [org.jboss.seam.web.ExceptionFilter] - uncaught exception  
  | javax.servlet.ServletException: Error calling action method of component 
with id _id2:_id58
  | at javax.faces.webapp.FacesServlet.service(FacesServlet.java:154)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  | at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | at 
org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
  | at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
  | at 
org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
  | at 
org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
  | at 
org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  | at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  | at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  | at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  | at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  | at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  | at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
  | at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
  | at 
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
  | at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
  | at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
  | at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
  | at java.lang.Thread.run(Thread.java:595)
  | ERROR [org.jboss.seam.web.ExceptionFilter] - exception root cause  
  | javax.faces.FacesException: Error calling action method of component with 
id _id2:_id58
  | at 
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
  | at javax.faces.component.UICommand.broadcast(UICommand.java:109)
  | at 
javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
  | at 
javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
  | at 
org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
  | at 
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
  | at 
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
  | at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  | at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | at 
org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
  | at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
  | at 
org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
  | at 
org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79)
  | at 
org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
  | at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84)
  | at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
  | at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  | at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
  | at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
  | at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
  | at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
  | at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
  |  

[jboss-user] [JBoss Seam] - Problem:

2007-04-02 Thread ASavitsky
The environment is Tomcat 5.5.20 + Hibernate EM 3.3 + Seam 1.2.0 + 
Microcontainer. I'm trying to build a simple clickable list with editing, 
everything works fine (querying, updating), except when adding a new record:

UserBean.java
@Name (userBean)
  | @Scope (ScopeType.CONVERSATION)
  | public class UserBean extends EntityController implements Serializable {
  | @DataModelSelection
  | @Out (required = false)
  | private User selectedUser;
  | @DataModel
  | private ListUser users;
  | 
  | public void addUser() {
  | selectedUser = new User();
  | }
  | public void cancelEdit() {
  | selectedUser = null;
  | }
  | @Factory (users)
  | @Begin (flushMode = FlushModeType.MANUAL)
  | public void createRecords() {
  | users = createQuery(SELECT u FROM User u).getResultList();
  | }
  | @Transactional (TransactionPropagationType.REQUIRED)
  | public void saveUser() {
  | persist(selectedUser);
  | flush();
  | addFacesMessage(User #{selectedUser.username} succesfully 
saved);
  | createRecords();
  | }
  | public void selectUser() {
  | }
  | }
  | 

users.xhtml (I'm using Facelets):
!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:ui=http://java.sun.com/jsf/facelets;
  | xmlns:h=http://java.sun.com/jsf/html; 
xmlns:f=http://java.sun.com/jsf/core;
  | xmlns:s=http://jboss.com/products/seam/taglib;
  | head
  | meta http-equiv=Content-Type content=text/html; charset=iso-8859-1 /
  | titleManage Users/title
  | /head
  | body
  | h:form
  | h:dataTable id=table var=user value=#{users}
  | f:facet name=footer
  | h:commandButton action=#{userBean.addUser} 
value=Add New /
  | /f:facet
  | h:column
  | f:facet name=header
  | h:outputText value=ID /
  | /f:facet
  | h:commandLink value=#{user.id} 
action=#{userBean.selectUser} /
  | /h:column
  | h:column
  | f:facet name=header
  | h:outputText value=Username /
  | /f:facet
  | h:outputText value=#{user.username} /
  | /h:column
  | h:column
  | f:facet name=header
  | h:outputText value=Role /
  | /f:facet
  | h:outputText value=#{user.role} /
  | /h:column
  | /h:dataTable
  | h:panelGrid columns=2 rendered=#{not empty selectedUser}
  | f:facet name=header
  | h:messages /
  | /f:facet
  | f:facet name=footer
  | h:panelGroup
  | h:commandButton action=#{userBean.saveUser} 
value=Save /
  | h:commandButton 
action=#{userBean.cancelEdit} immediate=true
  | value=Cancel /
  | /h:panelGroup
  | /f:facet
  | h:outputLabel value=Username for=username /
  | h:inputText id=username value=#{selectedUser.username} 
required=true
  | f:validateLength maximum=20 /
  | /h:inputText
  | h:outputLabel value=Password for=password 
rendered=#{selectedUser.new} /
  | h:inputText id=password value=#{selectedUser.password} 
required=true
  | rendered=#{selectedUser.new}
  | f:validateLength minimum=6 maximum=20 /
  | /h:inputText
  | h:outputLabel value=Role for=role /
  | h:selectOneMenu id=role value=#{selectedUser.role} 
required=true
  | s:convertEnum /
  | s:enumItem enumValue=ROLE_USER label=User /
  | s:enumItem enumValue=ROLE_MGR label=Manager /
  | s:enumItem enumValue=ROLE_ADMIN 
label=Administrator /
  | /h:selectOneMenu
  | /h:panelGrid
  | /h:form
  | /body
  | /html
  | 

User.java:
@Entity
  | @Table (name = USERS)
  | @SequenceGenerator (name = SEQ_GEN, sequenceName = SEQ_USER)
  | public class User implements Serializable {
  | public static enum Role {
  | ROLE_ADMIN, ROLE_MGR, ROLE_USER
  | }
  | 
  | @Column (name = CREATED_BY, nullable = false, updatable = false)
  | private String createdBy = ADMIN;
  | @Temporal (TemporalType.TIMESTAMP)
  | @Column (name = CREATED_ON, nullable = false, updatable = false)
  | private Date createdOn = new Date();
  | @Id
  | @GeneratedValue (strategy = GenerationType.AUTO, generator = SEQ_GEN)
  | private Long id;
  | @Column (name = MODIFIED_BY, 

[jboss-user] [JBoss Seam] - Re: Problem:

2007-04-02 Thread ASavitsky
It seems that forum ate part of my topic header - it was Problem: 'no 
transaction is in progress' on flush

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4033817#4033817

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4033817
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Large Data Tables in Seam - feedback welcome

2007-03-29 Thread ASavitsky
This is my take at the way to manage large datasets in @DataModel, without 
loading them all in memory. Hopefully, this code will be of use to others 
and/or generate useful improvement suggestions. Anyway, here goes:

LazyList.java - implements List interface, allowing its use in @DataModel. Only 
holds one page (size can be configured) worth of data, delegating the actual 
retrieval to the fetcher interface. Knows the total amount of data, again by 
calling the appropriate method in fetcher.
public class LazyListT implements ListT {
  | public static final int DEFAULT_PAGE_SIZE = 20;
  | private int currentPage;
  | private ListT dataset;
  | private int datasetSize;
  | private IFetcherT fetcher;
  | private int pageSize = DEFAULT_PAGE_SIZE;
  | 
  | public LazyList(IFetcherT fetcher) {
  | this.fetcher = fetcher;
  | datasetSize = fetcher.getDatasetSize();
  | currentPage = 0;
  | }
  | public LazyList(IFetcherT fetcher, int pageSize) {
  | this(fetcher);
  | this.pageSize = pageSize;
  | }
  | public T get(int index) {
  | int requestedPage = index / pageSize;
  | if (index  0 || index  datasetSize) {
  | throw new IndexOutOfBoundsException();
  | }
  | if (dataset == null || currentPage != requestedPage) {
  | currentPage = requestedPage;
  | dataset = fetcher.getDatasetPage(currentPage * 
pageSize, pageSize);
  | }
  | return dataset.get(index % pageSize);
  | }
  | public boolean isEmpty() {
  | return datasetSize == 0;
  | }
  | public int size() {
  | return datasetSize;
  | }
  | // the rest of the interface methods {
  | throw new UnsupportedOperationException(Not implemented);
  | }
  | }
  | 

IFetcher.java:
public interface IFetcherT {
  | /** Fetch a page of data */
  | ListT getDatasetPage(int start, int pageSize);
  | /** Fetch total dataset size */
  | int getDatasetSize();
  | }
  | 

CriteriaFetcher.java - implemets fetcher interface via Hibernate criteria 
calls. Hibernate Session is injected via Seam, the criteria properties neeed to 
be specified during fetcher construction (cannot be placed in constructor as 
Seam needs a no-arg one). Criterias are used because sorting and filtering can 
easily be added to them.
@Name (fetcher)
  | @Scope (ScopeType.CONVERSATION)
  | public class CriteriaFetcherT implements IFetcherT, Serializable {
  | @Logger
  | private static Log log;
  | private DetachedCriteria countCriteria;
  | private DetachedCriteria queryCriteria;
  | @In
  | private Session session;
  | 
  | @SuppressWarnings (unchecked)
  | public ListT getDatasetPage(int start, int pageSize) {
  | log.trace(Fetching #0 records starting from #1, pageSize, 
start);
  | return 
queryCriteria.getExecutableCriteria(session).setFirstResult(start).setMaxResults(pageSize).list();
  | }
  | @SuppressWarnings (unchecked)
  | public int getDatasetSize() {
  | log.trace(Fetching dataset size);
  | return (Integer) 
countCriteria.getExecutableCriteria(session).uniqueResult();
  | }
  | public void setCountCriteria(DetachedCriteria countCriteria) {
  | this.countCriteria = 
countCriteria.setProjection(Projections.rowCount());
  | }
  | public void setQueryCriteria(DetachedCriteria queryCriteria) {
  | this.queryCriteria = queryCriteria;
  | }
  | }
  | 

Now any bean would use the paged lists in the following way:
@In (create = true)
  | private CriteriaFetcherT fetcher;
  | @DataModel
  | private LazyListT records;
  | 
  | protected DetachedCriteria buildCriteria() {
  | return DetachedCriteria.forClass(T.class);
  | }
  | @Factory (records)
  | public void createRecords() {
  | fetcher.setCountCriteria(buildCriteria());
  | fetcher.setQueryCriteria(buildCriteria());
  | records = new LazyListT(fetcher, 10);
  | }
  | 

If sorting/filtering is needed, simply recreate the records variable with a 
different fetcher that has the necessary sorts/filters built in. Until then, 
the constructed LazyList stays in its scope (CONVERSATION is recommended), 
fetching data pages as necessary.

Comments/suggestions are welcome - though the code is working already, so I'm 
not looking for others to fix it for me :)

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4032810#4032810

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4032810
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Bug: no such setter method: org.jboss.seam.core.Init.userTra

2007-03-28 Thread ASavitsky
The following components.xml declaration results in exception:

core:init user-transaction-name=java:comp/env/UserTransaction /

java.lang.RuntimeException: Could not create Component: org.jboss.seam.core.init
  | at 
org.jboss.seam.init.Initialization.addComponent(Initialization.java:833)
  | at 
org.jboss.seam.init.Initialization.addComponents(Initialization.java:676)
  | at org.jboss.seam.init.Initialization.init(Initialization.java:478)
  | at 
org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:33)
  | at 
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
  | at 
org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
  | at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
  | at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
  | at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
  | at 
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
  | at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
  | at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
  | at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
  | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | at java.lang.reflect.Method.invoke(Method.java:585)
  | at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
  | at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
  | Caused by: java.lang.IllegalArgumentException: no such setter method: 
org.jboss.seam.core.Init.userTransactionName
  | at org.jboss.seam.util.Reflections.getSetterMethod(Reflections.java:217)
  | at org.jboss.seam.Component.initInitializers(Component.java:369)
  | at org.jboss.seam.Component.init(Component.java:260)
  | at org.jboss.seam.Component.init(Component.java:200)
  | at 
org.jboss.seam.init.Initialization.addComponent(Initialization.java:823)
  | ... 18 more

The XSD for the core tags (core-1.2.xsd) clearly allows the 
user-transaction-name as an attribute to the init tag, yet the corresponding 
method in Init class is protected. Was it supposed to be public? Does this one 
looks like a bug?

Thanks,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4032374#4032374

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4032374
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Bug: no such setter method: org.jboss.seam.core.Init.use

2007-03-28 Thread ASavitsky
Thanks Gavin, that was quick :)

Now, when is the next release planned? Do you guys do it once a month? Too bad 
I've missed yesterday's release with my bug report :(

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4032487#4032487

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4032487
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Tomcat deployment with external datasource - is it possi

2007-03-22 Thread ASavitsky
Actually, any JTA-compliant TM should do, I suppose, JOTM was picked only 
because it was the first one I've heard about (I plan to try Atomikos, and to 
ask around who's using what on Spring forum). No MC for me for sure, as any 
appservers are off-limits in our environment, and the ability to use Tomcat DS 
is a must.

Now, sorry for being persistent, but could you expand a little bit more on why 
you couldn't use Seam-managed Tx in your setup?

Thanks,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4030649#4030649

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4030649
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Tomcat deployment with external datasource - is it possi

2007-03-21 Thread ASavitsky
Baz, could you please post your setup that you said was working? And what do 
you mean by losing Seam-managed transactions? Did you still use Seam's 
transactional JSF interceptor?

Overall, I'm leaning towards opening a JIRA issue for that, as it doesn't look 
like it's possible to mix the lookups to the Microcontainer JNDI and to the 
Tomcat one...



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4030318#4030318

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4030318
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Tomcat deployment with external datasource - is it possible?

2007-03-20 Thread ASavitsky
I'm currently trying to adopt the Seam JPA example to our Tomcat deployment 
guidelines, and I'm facing a problem here...

The example uses a DataSource that is supplied by the Microcontainer, in 
jboss-beans.xml:

bean name=bookingDatasourceFactory
  | class=org.jboss.seam.microcontainer.DataSourceFactory
  | property name=driverClassorg.hsqldb.jdbcDriver/property
  | property name=connectionUrljdbc:hsqldb:./property
  | property name=userNamesa/property
  | property name=jndiNamejava:/DefaultDS/property
  | property name=minSize0/property
  | property name=maxSize10/property
  | property name=blockingTimeout1000/property
  | property name=idleTimeout10/property
  | property name=transactionManager
  | inject bean=TransactionManager /
  | /property
  | /bean
  | bean name=bookingDatasource class=java.lang.Object
  | constructor factoryMethod=getDataSource
  | factory bean=bookingDatasourceFactory /
  | /constructor
  | /bean
  | 

My question is: is it possible to somehow use the DataSource that is configured 
in Tomcat, as in

?xml version=1.0 encoding=UTF-8?
  | Context
  | Resource name=jdbc/DataSource auth=Container
  | type=javax.sql.DataSource maxActive=100 maxIdle=30 
maxWait=1 username=username password=password 
driverClassName=oracle.jdbc.driver.OracleDriver url=jdbc url /
  | /Context
  | 

The idea is to be able to create data sources outside the deployed WAR, so that 
the same WAR could be deployed to different environments without any changes - 
this is a common requirement for production-level Tomcat applications.

When I try to remove the data source definition from jboss-beans.xml, it gives 
me the name not bound exception (naturally), and I suspect that it only uses 
the Microcontainer's JNDI, ignoring the Tomcat-supplied one.

Is such setup supported at all? Is there any way to configure the data source 
outside the WAR, while using Seam/Microcontainer/JPA stack?

Thanks,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4029798#4029798

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4029798
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Tomcat deployment with external datasource - is it possi

2007-03-20 Thread ASavitsky
Norman,

Here's my persistence.xml file:

?xml version=1.0 encoding=UTF-8?
  | persistence xmlns=http://java.sun.com/xml/ns/persistence;
  | xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
  | xsi:schemaLocation=http://java.sun.com/xml/ns/persistence 
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd;
  | version=1.0
  | persistence-unit name=visitsDatabase transaction-type=JTA
  | providerorg.hibernate.ejb.HibernatePersistence/provider
  | jta-data-sourcejava:comp/env/jdbc/DataSource/jta-data-source
  | properties
  | property name=hibernate.show_sql value=true /
  | property name=hibernate.cache.provider_class
  | 
value=org.hibernate.cache.HashtableCacheProvider /
  | property 
name=hibernate.transaction.manager_lookup_class
  | 
value=org.hibernate.transaction.JBossTransactionManagerLookup /
  | property name=hibernate.bytecode.provider 
value=javassist /
  | property name=hibernate.jdbc.batch_size value=0 /
  | /properties
  | /persistence-unit
  | /persistence
  | 

Actually, I have tried several ways of referencing the Tomcat JNDI data source, 
like: jdbc/DataSource, java:/jdbc/DataSource, 
java:comp/env/jdbc/DataSource, java:/DataSource. The JNDI name defined in 
Tomcat is jdbc/DataSource

Thanks,

Alex

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=4029859#4029859

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4029859
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user