Do you really need a lot of converters? The @SelectItems binder does the
conversion from whatever to SelectItem for you. I see you're using the Object
strategy. The strategy works fine if you already have a lot of converters, but
it wasn't my intention that you create additional converters
This is what I am using now. Every Entity in my project has an id named id
that is a Long. So all I have to do is add the interface Idable to the entity.
There is no doubt a better way. With discussions like this we can find an
optimal technique that everyone can easily use with minimal
I teaked it a bit to make it a SFSB and pull a list of objects. For anyone
else that tries this do not put valueMethod=??? if you change the value
stragety to valueStrategy = SelectItems.Strategy.OBJECT.
I thought for sure I needed this, but errors occur after you add the converter.
It kept
One more time. Than you Jim. I cleaned it up even more. I cannot believe how
easy it is to use SelectItems now. Your code is really clear and easy to
follow. I did have it working, but now it is cake.
:-) :+) :~)
| @Name(selector)
| @Stateless
|
I'm glad it's useful. If you put the following in your ejb-jar.xml you'll be
able to remove the @Interceptors annotation from all of your components. That
should clean up the code even more.
| ejb-jar
|assembly-descriptor
| interceptor-binding
| ejb-name*/ejb-name
I was aware there was a way to remove that, but never looked into it.
I was able to clean up over 75 SLSB an SFSB. Thx for the tip.
What are your thoughts on a slick converter. I am using one that forces me to
make my entites implement an interface.
Not a big problem, but I am looking for a
Yes. Let me head on over to the wiki and find a place to post it.
-Jim
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3954928#3954928
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3954928
Using Tomcat but need to do more?
Thanks Captain. I will be looking for it.
You really seem to know your shiz.
Do you have any suggestion for a solution to the following unrelated problem?
http://www.jboss.com/index.html?module=bbop=viewtopict=85986
View the original post :
The @SelectItems example can be found on the Wiki here.
http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossSeam
It doesn't currently support selection, you'll need to use JSF EL to bind
selected values to your controller. This should help you get your drop down
started though.
-Jim
View the
Thanks again Jim. I will look into it. Hopefully this type of functionality
will be added to Seam sometime soon.
Everyone needs dropdowns. :-} And using them should be a trivial matter.
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3954937#3954937
Reply to
10 matches
Mail list logo