New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JDF 149 - shows how to use DeltaSpike BeanManagerProvider to access CDI in a EntityListener #365
Conversation
This is ready for review |
Technologies: CDI, Deltaspike, JPA, JSF | ||
Summary: Shows how to use DeltaSpike BeanManagerProvider to access CDI in a EntityListener | ||
Prerequisites: | ||
Target Product: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
per @pmuir, target product is WFK
@rafabene : Very nice! Tested this and it works great! I made a few minor suggestions for the README file. I would like to see instructions on the rendered application page, similar to the comments in the README.
But I'm afraid it might take up to much real estate on the page. Looks good to me! |
|
||
Create, edit or remove some contacts to see the audit records being registered. | ||
|
||
_NOTE: To fire the update audit, you must change one of the contact fields |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't render properly. It's missing the ending underscore, :-)
NOTE: To fire the update audit, you must change one of the contact fields
@pmuir: This is ready for your technical review :-). |
|
||
This project demonstrates the use of DeltaSpike's BeanManagerProvider. | ||
|
||
BeanmanagerProvider provides access to the BeanManager by registering the current BeanManager during the startup. This is really handy if you like to access CDI functionality from places where no CDI based injection is available. If a simple but manual bean-lookup is needed, it's easier to use the BeanProvider. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last sentence is a bit confusing. Maybe "If a simple but manual bean-lookup is needed, it's easier to use BeanProvider instead"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, you should use backticks to enclose references to classes e.g. BeanProvider
looks good, but it's very short on javadoc and comments. We need to increase this. Pretend you are writing this as a real app, as well as a tutorial. |
I think that's better now :) |
@@ -0,0 +1,95 @@ | |||
jboss-as-deltaspike-beanmanager: Shows how to use DeltaSpike BeanManagerProvider to access CDI in a EntityListener |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The quickstart name doesn't match the quickstart folder name. This name should probably be deltaspike-beanmanagerprovider to match the folder name. Also, the "jboss-as" prefix is only used in the URL to access the application. :-)
Ohter than changing the quickstart name in the first line of the README.md file from @pmuir , do you need to review this? |
|
||
/** | ||
* This method will promote the conversation when this component is constructed through the {@link PostConstruct} annotation | ||
* This will also create a new entity to be managed/edited |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do you end the conversation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually this is never ended since the user has no option to leave the screen :0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should add a comment to that effect. Explain what is going on there.
Pretty short on comments still. Every file, every public method needs at least one javadoc comment explaining what it is for. Put comments about the implementation into normal comments. |
The instructions are a big help! I'm being a little picky here, but it's hard to distinguish button and table names in the instructions for the running application. Is it possible to use quotes or italics for the form title and button names in the contactsCRUD.xhtml like this:
I wonder if it would look better with the form fields and everything else left aligned. It looks a little odd to me now with the Contacts title, result message, form fields, and *Note centered, while the rest is left aligned. |
Looks good. |
Looks good. |
I get conflicts when I rebase upstream/master: For some reason, the README.md file has this at the end: The .gitignore also has errors. @rafabene : this could be due to your initial commit. It looks like you check in a root README.md file and a .gitignore file. These are messing it up. :-) |
Rebased upstream, squashed the commits, and merged. |
No description provided.