This content has been marked as final.
Show 3 replies
-
1. Re: Can I Get the Name of the .xhtml file within my Java method?
mikebgx May 31, 2011 1:58 PM (in response to ceccareb.bceccarelli.net32.com)From the facesContext which you can either inject it or obtain by: FacesContext ctx = FacesContext.getCurrentInstance();
call the getViewId() method.
getClientId() may help too.
Click HELP for text formatting instructions. Then edit this text and check the preview. -
2. Re: Can I Get the Name of the .xhtml file within my Java method?
ceccareb.bceccarelli.net32.com May 31, 2011 5:13 PM (in response to ceccareb.bceccarelli.net32.com)Thank you Mike. That did the trick! Do you know of a way to find the line number in the file that JBoss is currently invoking?
I may be asking to land on the moon now, but you may give me landing instructions! You certainly put me in orbit. I did not find anything (in debug mode) that would indicate a line number is a low hanging fruit.
-
3. Re: Can I Get the Name of the .xhtml file within my Java method?
mikebgx May 31, 2011 5:32 PM (in response to ceccareb.bceccarelli.net32.com)Facelets stack traces contain the line number within the .xhtml so it must be possible, just like landing on the moon is possible :-)
By careful use of id's and vuews / sub-forms in the .xhtml I've managed to narrow it down to a form:subView:subView etc which can help with a big view page.