[jboss-user] [JBoss Seam] - Re: Embeddable Objects (EJB3) not working properly

2006-07-24 Thread petemuir
anonymous wrote : public ClassE getClassEInst() {
  |   | return classEInst;
  |   | }
  | h:inputText id=classEInst value=#{classAInst.classEInst} /

An inputText takes a value of type String, or, a value that has been converted 
to/from String NOT an embeddable EJB3 bean.  So, either reference specific 
fields on the embeddable object:

h:inputText id=classEInst value=#{classAInst.classEInst.classEVar} /

or, as Gavin said, provide a converter for ClassE to be set via a input string.

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

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


[jboss-user] [JBoss Seam] - Re: Embeddable Objects (EJB3) not working properly

2006-07-24 Thread niesar
Gavin,

please don't feel offended! My intention is far away to come anyway close to 
that point. Sorry about that!!! (Well, actually I'm feeling a bit offended now)

You know, my original question was which part of this combination of JBoss 
AS/EJB3/Seam/JSF/MyFaces is actually causing the problem - and where to file 
the bug. Please don't get me wrong. That is definitely not supposed to be an 
offense at all. I simply don't know if I can definitely say that this is a 
MyFaces issue. So I'm raising the question here since Seam/JBoss AS comes 
bundled with all this stuff and it looks like I'm supposed to use it. That's 
the simple reason I start the discussion here. You know, if it turns out it's a 
MyFaces issue, I'll take the discussion over there - and I'll try to tell 
people over here that there's a problem they could run into. Isn't that the way 
it should be?

Now, since I already spent days with this problem and a lot of time to boil my 
real world problem down to it's essence, I just didn't want to live with a 
strange workaround and leave the problem as it is. That won't help anybody! 
Actually, reporting these kind of problems is a bit my way to pay back a little 
to open source projects where I'm not involved myself. I think that's a lot 
better than just walking away. Offending anybody is not my business.

So I'm asking again: Where exactly is the problem?

1. possibility: 
MyFaces problem since it should be able to deal correctly with the EJB3 stuff 
Hibernate/EJB3 is producing? You know, I wasn't so confident any more when I 
decompiled the ClassA.class file (ClassE is embedded in ClassA). At least the 
decompiler gives some strange output telling me something about a reference to 
ClassE in a way I never saw before. But since this decompiler is quite old, it 
surely knows nothing about EJB3 or even EJB. However, it seems that 
ClassA.class doesn't look like standard Java meta code from a few years back 
any more. Anyway, I don't know if there is a strict definition how the meta 
code has to look like when EJB3 @Embeddable/@Embedded is used. In case this is 
well defined, it could be that EJB3/Hibernate is producing some code which is 
only working in the JBoss world or MyFaces can't handle a well defined case. 

2. possibility: 
MyFaces may not even be supposed to handle this kind of code. In that case 
there is the incompatibility I was talking about before and Hibernate/EJB3 and 
MyFaces simply don't fit. But since I only use MyFaces because it's kind of 
built in here, I can only guess that all the EJB3 stuff should work in MyFaces.

3. possibility: 
I'm doing something wrong and my code is a piece of shit. Well, that can easily 
be. But as I said, I spent more than the complete weekend on this issue and now 
I think I simplified the test case so far, that I'm pretty convinced there is 
an issue with the @Embeddable/@Embedded stuff. You know, if I'm using a 
workaround and don't use @Embeddable/@Embedded, everything works fine. However, 
that's no option for my real world stuff. But never mind.

So - without offending anybody, please -  where do you think is the problem? 
Is this definitely a MyFaces issue? Is there nobody else using 
@Embeddable/@Embedded in combination with Seam/JSF? I'm not ready to believe 
this yet, since I thought that is common practice - at least if legacy 
databases must be used. 
And no, I don't ask any more where to file the bug. That seems to be a question 
which is by far too dangerous ;)))

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

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


[jboss-user] [JBoss Seam] - Re: Embeddable Objects (EJB3) not working properly

2006-07-18 Thread [EMAIL PROTECTED]
niesar wrote : [EMAIL PROTECTED] wrote : You need a JSF converter.
  | Are you sure, Gavin?
  | 
  | ...
  | 
  | The conversion from the ClassE object to Strings seems to be quite 
straightforward. I could pass the ClassE instance to 2 different converters, 
one to convert classEVar1 to a String and another one to convert (extract) 
classEVar2. Quite inconvenient since I need 2 converters, but that can be done.
  | 

You don't need a custom converter for primitive values because JSF has a set of 
builtin converters. But if you need JSF to convert a string value to an 
instance of a user class then of course you need to tell JSF how to do that.

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

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


[jboss-user] [JBoss Seam] - Re: Embeddable Objects (EJB3) not working properly

2006-07-18 Thread niesar
Thanks for your answers, guys. I appreciate that!

Maybe I have to make the following point much more clear:

I can't access instance variables from my (embedded) ClassE instance like 
h:inputText id=classEInst value=#{classAInst.classEInst.classEVar} 
When I try to populate the input fields with a construction like that, I 
immediately get an error message.
javax.faces.el.PropertyNotFoundException: 
/WEB-INF/facelets/tags/classA-input.xhtml @20,79 
value=#{classAInst.classEInst.classEVar}: Bean: test.ClassE, property: 
classEVar
  | at 
com.sun.facelets.el.LegacyValueBinding.getValue(LegacyValueBinding.java:58)
  | at javax.faces.component.UIOutput.getValue(UIOutput.java:77)
  | at 
org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:217)
  | at 
org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderInput(HtmlTextRendererBase.java:135)
  | at 
org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:53)
  | ...
Please note, that this error occurrs much earlier than everything we were 
talking about before. With this approach I'm not even able to display the data 
and I don't even get to the point to input anything.

In fact, that is what I considered a bug or an incompatibility in my first 
post. In my understanding #{classAInst.classEInst.classEVar} should also work 
if ClassE is embedded in ClassA using the EJB3 @Embeddable/@Embedded 
annotation. However, this doesn't work! 


It looks like I can't access any instance variable from my embedded ClassE 
object. The only workaround I could find is to pass the complete ClassE object 
like
h:inputText id=classEInst value=#{classAInst.classEInst} 
But that causes the problem that I have the restriction 1object  --- 1String 
for the JSF converter. This way it's also no option.

So right now I have no clue how to solve this problem. 


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

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


[jboss-user] [JBoss Seam] - Re: Embeddable Objects (EJB3) not working properly

2006-07-18 Thread petemuir
niesar wrote : 
  | h:inputText id=classEInst value=#{classAInst.classEInst.classEVar} 
  | 

This is most definitely should work.  Doesn't matter to JSF EL whether it's 
Embedded or not.  Having looked at your code I can't see why it doesn't I'm 
afraid.  Perhaps Class is a keyword in JSF EL, have you tried using another 
name? Does accessing classAInst.classEInst.classEVar work if you put an 
inputText for it in classAEdit.xhtml rather than the tag source file?

anonymous wrote :  The only workaround I could find is to pass the complete 
ClassE object like
  | h:inputText id=classEInst value=#{classAInst.classEInst} 
  | But that causes the problem that I have the restriction 1object  --- 
1String for the JSF converter. This way it's also no option.
  | 

This is not the right way to access properties of an object.

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

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


[jboss-user] [JBoss Seam] - Re: Embeddable Objects (EJB3) not working properly

2006-07-18 Thread [EMAIL PROTECTED]
Note that none of these questions have anything to do with Seam. Now, I don't 
mind if you discuss your JSF problems here. But if you are going to talk about 
bugs and use italics and exclamation points and multiple question marks, please 
consider taking this to the correct place which would be the MyFaces forum.

OTOH, if you wish to continue this discussion here, that is fine by me, but 
please lay off of the bug or incompatibility talk. Thanks.

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

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


[jboss-user] [JBoss Seam] - Re: Embeddable Objects (EJB3) not working properly

2006-07-18 Thread [EMAIL PROTECTED]
What I can absolutely definitively promise you is that this has nothing to do 
with @Embedded/@Embeddable.

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

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


[jboss-user] [JBoss Seam] - Re: Embeddable Objects (EJB3) not working properly

2006-07-18 Thread petemuir
niesar wrote : Is this definitely a MyFaces issue? Is there nobody else using 
@Embeddable/@Embedded in combination with Seam/JSF?

In order

1) No, the issue is most likely with your code.  Having you tried cleaning and 
rebuilding from scratch.

2) Yes, I do, and it works exactly as I would expect it to for me.  For 
example, I have a Client object, which has an Address object getter/setter.  
The Address has a (String) address getter/setter and (String) postcode 
getter/setter. I can access them as

#{client.address.address}
or
#{client.address.postcode}

Whether the object has any EJB3/JPA annotations is irrelevant.

If you are still stuck perhaps put your runnable test case up somewhere and I 
can look at it.

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

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


[jboss-user] [JBoss Seam] - Re: Embeddable Objects (EJB3) not working properly

2006-07-18 Thread niesar
[EMAIL PROTECTED] wrote : What I can absolutely definitively promise you is 
that this has nothing to do with @Embedded/@Embeddable.
Thanks again for your comment, Gavin!!!

Wow, if you even promise the embedded objects are working properly in 
combination with MyFaces, I'll take that as granted (and especially if you're 
saying absolutely definitely - wow!). So I'll throw in more time to find out 
what's wrong with my code. No idea yet, since I thought I just tried about 
everything, but we'll see...

My honest apologies again for causing a bad mood. Looks like using ???, 
!!!, and italics is my way to emphasize a point (and actually I wasn't aware 
this looks strange these days). Sorry about that!

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

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


[jboss-user] [JBoss Seam] - Re: Embeddable Objects (EJB3) not working properly

2006-07-18 Thread jboss-Nth-Fan
[EMAIL PROTECTED] wrote : Note that none of these questions have anything to 
do with Seam. Now, I don't mind if you discuss your JSF problems here. But if 
you are going to talk about bugs and use italics and exclamation points and 
multiple question marks, please consider taking this to the correct place which 
would be the MyFaces forum.
  | 
  | OTOH, if you wish to continue this discussion here, that is fine by me, but 
please lay off of the bug or incompatibility talk. Thanks.

Hi Gavin,

Here is a twist to the topic: 
I've came to appreciate the power and strengths of JSF, and I really love the 
way Seam takes over in the places where JSF really needed some help.
(s:Link with actions, nicely formated exception stack trace, pages.xml, etc etc)

Now from having seen colleagues to struggle with JSF somewhat non-obvious ways 
of doing things (or presenting errors, misconfig, etc..)

Wouldn't this be another case where seam can improve things?
It looks to me like some sort of auto-converter could alliviate the need to 
look into JSF non-friendly details.

Just my $0.02

Yeyo

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

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


[jboss-user] [JBoss Seam] - Re: Embeddable Objects (EJB3) not working properly

2006-07-18 Thread CptnKirk
Nth-Fan, maybe the SeamGen utility would be something you'd be interested in.

http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossSEAMGen

Although, talk about this and other issues are off topic for the thread.  If 
you have questions about the SeamGen util, ask them in this topic.

http://www.jboss.com/index.html?module=bbop=viewtopict=86876

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

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


[jboss-user] [JBoss Seam] - Re: Embeddable Objects (EJB3) not working properly

2006-07-17 Thread [EMAIL PROTECTED]
You need a JSF converter.

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

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