[JBoss Seam] - Re: @In (create=true)
by blackers
In the end to get it working i duplicated TeamHome.java and renamed the original too.
Now i have HomeTeamHome.java and OppTeamHome.java
with seam names
@Name("homeTeamName")
&
@Name("oppTeamName")
respectively.
With a few changes to TeamList.xhtml, TeamList.page.xml, GameEdit.xhtml and GameEdit.page.xml (based on the versions generated by seam gen) I got the desired result.
GameEdit.page.xml
| <param name="oppTeamTeamId" value="#{oppTeamHome.teamTeamId}"/>
| <param name="homeTeamTeamId" value="#{homeTeamHome.teamTeamId}"/>
GameEdit.xhtml
(changes in bold/red)
<div class="actionButtons">
| <s:button value="Select Away Team"
| view="/TeamList.xhtml">
| <f:param name="from" value="GameEdit"/>
| <f:param name="forOppTeam" value="1"/>
| </s:button>
| </div>
|
and
<div class="actionButtons">
| <s:button value="Select Home Team"
| view="/TeamList.xhtml">
| <f:param name="from" value="GameEdit"/>
| <f:param name="forHomeTeam" value="1"/>
| </s:button>
| </div>
TeamList.page.xml
<param name="forOppTeam"/>
| <param name="forHomeTeam"/>
TeamList.xhtml
<s:link view="/#{empty from ? 'Team' : from}.xhtml"
| value="#{team.teamName}"
| id="team" rendered="#{not empty forOppTeam}">
| <f:param name="oppTeamTeamId" value="#{team.teamId}"/>
| </s:link>
| <s:link view="/#{empty from ? 'Team' : from}.xhtml"
| value="#{team.teamName}"
| id="team" rendered="#{not empty forHomeTeam}">
| <f:param name="homeTeamTeamId" value="#{team.teamId}"/>
| </s:link>
There is probably a nicer way to do the last block without making 2 separate links and only rendering the appropriate one based on the forXXXXTeam value being used. But my JSF knowledge is pretty minimal at the moment. A rendered attribute for the f:param tag would have been nice.
Thanks for all of your help
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052093#4052093
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052093
18Â years, 10Â months
[Beginners Corner] - JBoss issue
by akhil_gupta_in
Dear All,
We are using Jboss 4.0.4 for our J2EE application and we are facing a very strange issue only when working inside company network (means while working from internet, application runs fine). Our application architecture includes Struts in web, Spring & EJB in business and Hibernate in persistence tier.
In our application, home page is a login page which is a jsp. When we deploy this application on Jboss, this home page is rendered with no issue. However, when we enter valid username and password and click on login page, it gives null exception.
At first, we thought it to be an application problem. So, we put few System.out.println with dummy messages. After deployment this time, application started working. We had made no code change except adding SOPs. Just to confirm what we had done, we again restarted the server and deployed the application (code with SOP), this time application didn?t work and we got null exception again. Surprisingly, we didn?t see any SOP message on console.
Then, we changed the logging level of JBoss server console from INFO to DEBUG to check server messages. This time application again worked.
Then, we restarted JBoss server and deployed application again. Unfortunately, application didn?t work.
This is a very strange behaviour. Please provide your inputs.
Regards,
Akhil
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4052089#4052089
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4052089
18Â years, 10Â months