[JBoss Seam] - Problem with injection
by thierry.rietsch
Hi all
I have a problem with injection.
I have an interface called SearchCriteria and three classes (Entities) which implement this interface. Additional I have an EJB which saves the entities in the database. The search criteria gets injected into the bean from the facelet. Therefor I have three facelets which cover the fields of the entities. All this facelets call the EJB.save() methods and pass the search criteria object.
Now I figured out, that I need to annotate the entity (@Name("..")) the same as the field name in the EJB is named (else other facelets and beans don't work. Is this correct?). This leads me into a problem as I have three different annotations for the names of the entities but one field name in the EJB which saves the entitites. How can I solve this?
-> In the EJB save method, I compare an enum value to figure out what kind of object it is. Then I cast it to the right class and persist it then with the entity manager. I know that using a command pattern would be the better way (figured it out just a few minutes before), but this wouldn't change my problem.
Thanks for your help and your answers,
Thierry
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050229#4050229
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050229
17 years, 6 months
[JBoss Portal] - Re: About JBoss Portal 2.6 ...
by andres.bustamante
Hi.
I've got a question about the last topic: What are the implications of making a change in the backend of the users management? Is it necessary to recompile the source code of JBoss Portal to make my changes effective?
Basically, I need to manage user and roles in a different way than just a portal access. Users are so much important for other bussiness logic. So, I'm not sure if it's a good idea to make changes directly on the users module already available in Portal, or maybe it could be better to make my own users module apart, using another database and under my own rules. In that case, I should disable the default portal users module, and actually, I don't know wheter it is possible or not, and how this could affect Portal functionality.
Another interesting topic for me is Usability of software in my project. In the case I work over the modules that Portal currently offers, I could need to change some messages for the UI. How might I customise my outputs for final users? Again, should be necessary to recompile Portal sources to make my changes effective?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050219#4050219
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050219
17 years, 6 months