[JBoss Seam] - Developing a very simple action
by SmokingAPipe
I'm trying to develope a very simple action within Seam. My goal is to eventually create a system which lets me register users, but the first step is to just have Seam actually call register() method in a session bean. The method doesn't do anything useful. Here's what I have:
In the JSP:
| <f:view>
| <h:form>
| <h:commandButton type="submit" value="Register" action="#{registerDude.register}"/>
| </h:form>
| </f:view>
|
And the RegisterDudeAction.java:
| @Stateless
| @Name("registerDude")
| public class RegisterDudeAction implements RegisterDude {
|
| /** Creates a new instance of RegisterDudeAction */
| public RegisterDudeAction() {
| System.out.println("************** just constructed a registerdudeaction!!!!!!!!");
| }
|
| @Logger private Log logger;
|
| public String register() {
| logger.info("************** just started the register action !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
| return "/registered.jsp";
| }
| }
|
and an interface to go with it:
| @Local public interface RegisterDude {
|
| public String register();
|
| }
|
So simple it can't fail, right? Wrong! The RegisterDudeAction never gets constructed, and of course the action never gets called. What could be happening here? There's no data model, nothing to validate. It should be brain-dead trivial, right?
I appreciate any ideas. Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965112#3965112
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965112
19 years, 10 months
[JNDI/Naming/Network] - Re: How to determine what is in an InitialContext?
by bsheward
I've written code which dumps out an InitialContext using the list() method. I used an empty String and "java:" as the inputs which seems to give me decent results. Are there any other names which would make sense?
Also, I found that in some circumstances, as I recurse through the tree of objects within the context, the Enumeration returns by the list() method sometimes returns a String object, rather than a NameClassPair object:
| private static void dumpContextList( Logger lgr, Level lvl, Context ctx, String name, String prefix)
| {
| ...
| for( Enumeration e = ctx.list( name ); e.hasMoreElements(); ) {
| Object o = e.nextElement();
| if ( o instanceof NameClassPair ) {
| ...
| } else {
| lgr.log( "Found object of Class " + o.getClass().getName() + " = \"" + o.toString() + "\"" );
| }
| }
| }
|
Am I missing something here, or is this a bug?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3965108#3965108
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3965108
19 years, 10 months