Often when an action method seems not to be called it is because an error occured in the JSF lifecycle BEFORE the INVOKE_APPLICATION phase (which is when the action method is called).
Do you see in any errors (probably related to model update) in <h:messages />?
Nothing, no errors in <h:messages/>, nothing at the backend (server logs), but as I said, it's for sure related to the checkboxes, no clue what...
any way to debug such a situation? i'm clueless...
thanks for answering :)
Check the Seam startup log, to make sure that all your components are actually getting installed.
I dont think this is the problem,
the stateless bean is accessible ( I use a DataModel to display the dataTable where each of its rows is a checkbox ) and the methods are accessible, the problem -ONLY- occures when I use a 'selectBooleanCheckbox' where its value is an array! when the value is not an array the action is executed fine :-/
So then it sounds like a pure-jsf problem, nothing to do with Seam, right?
I'm not sure, but probably...
Is there any way to see if the Map i'm trying to set is really outjected?
Seems like JSF fails before the invoke-application phase if the property is not available...
This is the property in the Statless bean:
@Out(scope=ScopeType.EVENT,required=false) Map<Account, Boolean> accountSelection;
This is the code within the DataTable where 'var=account'
After spending some hours, I figured out that changing the following line in the facelets code:
made things work, submitting the form really call the action within the 'commandButton' component.
I just wonder what's wrong, as I said, I declared the 'accountSelection' variable within the 'userManager' EJB3 as:
@Out(required=false) private Map<Account, Boolean> accountSelection;
I didnt encapsulate it as seems like it's not required for Outjected vars,
So what's wrong? I'm almost sure the field is not outjected at all, this is the only difference between using the variable as outjected by SEAM and using it as a bean property.
How can I check if it's outjected at all? or maybe is it something else?
Thanks a lot,
Are you sure the accountSelection is not being outjected null? Do you have factory?
How can I know if it's outjected or not?
I dont have a factory, but on a previous function I call, I intiialize the Map to a HashMap....,
but two questions goes here:
1) How can I know what are the vlaues of the outjected vars? this is very important for debugging.
2) How can I know if the var is outjected as null?
You said the bean is stateless up the thread. So that initialised value may well be lost (I think, I'm not 100% up at what stage in the lifecycle stateless beans are created/destroyed).
If the value is null it won't be outjected.
1) Use the debugger (attached I think to the bijection interceptor)
2) Well if it is not null, you will see the Seam variable resolver find the context variable on the log. Or if you set required=true then Seam throw an exception if the value is null
Well, actually, if it's null then even calling it is a bean property would raise a null exception... so I assume the previous method which intiialize the Map to a Hashmap works....
More than that, is intiailizing the property while declaring it is for an outjected var? such as:
@Out(required=false) private Map<Account, Boolean> accountSelection = new HashMap<Account,Boolean>();
If so, then it doesnt work as well, submitting the form stays on the same form, no error is set and nothing happens.