[JBoss Seam] - Re: Seam and XML configuration files doubt
by fernando_jmt
"gavin.king(a)jboss.com" wrote : path/to/my/viewId.page.xml
Suppose I have an application with thousands of .xhtml pages (which is true for an existing app. we have in struts and we are thinking to upgrade to Seam), it seems if I wanna configure them in Seam I should have thousands of viewId.page.xml. I think this is not a good way in this case (maybe others). What I want to do is to group the pages according the respective module (which it makes sense).
So, it seems in Seam there is no a way to do that kind of configuration.
I think you should include some way (alternative to fine grained configuration) which we can use to configure the configuration files we want to load.
maybe adding something like (web.xml):
| <context-param>
| <!-- Seam pages Context Configuration -->
| <param-name>seam.pages.CONFIG_FILES</param-name>
| <param-value>/WEB-INF/pages-sales.xml</param-value>
| </context-param>
|
what do you think?
or is there another way to do this? (please tell me).
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016347#4016347
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016347
19Â years, 2Â months
[JBoss Seam] - learning up
by laxu
Hi,
I am learning Seam and trying to build an app with simple small steps. I am trying something quite similar to Hotel Booking example. It is far plainer but I cannot seem to get it working.
I have an entity bean called "Organization", a stateful session bean "OrganizationAction" and quite like the main.xhtml from the Booking example I usa an as in:
<s:link id="viewItem" value="#{item.name}" action="#{organizationAction.selectOrganization(item)}" />
and in selectOrganization method, I do assign it to the @Out marked member in the hope that it will show up in the next page.
| @In(required=false) @Out
| private Organization organization;
|
| @Begin
| public String selectOrganization(Organization selectedOrganization){
| System.out.println("Selected org:"+selectedOrganization.toString());
| organization = em.merge(selectedOrganization);
| return "organization";
| }
|
It is almost identical (even less. i don't have ajax stuff) to the Booking example, like selecting the hotel from the list of hotels. Everything is parallel. But in the navigated organization.xhtml i cannot find the "organization" object outjected. Instead, a brand new instance of Organization is displayed.
I must be missing something quite basic. I have tried and thrown anything into it to make it work and yet could not manage.
Best regards,
Levent
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016342#4016342
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016342
19Â years, 2Â months
[EJB 3.0] - An global bean
by aleksab
I'm trying to figure out how to make a statefull bean that is global. I'll illustrate it with an example.
There a several clients that look up a bean, ie GlobalBean. Each client sends a string to the bean, which the GlobalBean stores. When a client asks the GlobalBean for the strings, all the strings are returned.
By implementing the GlobalBean as a stateful ejb bean, the GlobalBean just stores the string given by a specific client, since the bean is bound to the session between the bean and the client.
I want to create a bean which is not bound to the session in other words. I could do this by Message beans, but don't want to. I suppose I could do the same with an entity bean, but I don't want to involve databases.
So shouldn't it be some sort of annotatio like @MakePublicAvailable which exposes a bean for all sessions AND is stateful??
Ideas/suggestions are appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016341#4016341
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016341
19Â years, 2Â months
[JBoss Seam] - Invoking a PageFlow via a Clickable Table
by djeverson
I have having some difficulties invoking a PageFlow by clicking on a link in a data table.
We are using Seam 1.1.5GA running on JBoss 4.0.5.
The high level use case is that the user is presented with a data table that contains a number of subjects that need processing. The user can then click on a link for each subject to start a registration process.
The registration process is complex and we feel best implemented with a page flow.
We have a JSF page and a simple SLSB which properly displays the initial list of subjects.
On the data table, we have the following command link:
| <h:commandLink action="#{registrationWizard.startWizard(subject)}"
| value="Register >>" />
|
|
We also tried a <s:link> as well.
The command link invokes a separate SFSB which manages the Registration Wizard Conversation.
The startWizard method looks like:
| @Begin(pageflow="registration",join=true)
| public void startWizard(Subject s) {
| log.info("RegistrationWizard.startWizard[#0]", s.getId());
| this.currentSubject = s;
| }
|
The registration pageflow has the following start-page
| <start-page name="start" view-id="/regwiz_info.xhtml">
| <redirect/>
| <transition name="next" to="regwiz002" />
| <transition name="cancel" to="cancel" />
| </start-page>
|
I also updated pages.xml with the following:
| <page view-id="/regwiz_info.xhtml">
| <begin-conversation join="true" pageflow="registration"/>
| </page>
|
I will get the following message, even if I remove the above code from the pages.xml file.
When I run the app, I am getting the following error message:
| java.lang.IllegalStateException: pageflow is not currently at a <page> or <start-page> node (note that pageflows that begin during the RENDER_RESPONSE phase should use <start-page> instead of <start-state>)
|
Can someone help me understand what I am doing incorrectly?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4016340#4016340
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4016340
19Â years, 2Â months