[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3480) s:link with propagation="none" linked to action with @Begin fails (intermittently) with conversation-required="true"
by Francisco Jose Peredo Noguez (JIRA)
s:link with propagation="none" linked to action with @Begin fails (intermittently) with conversation-required="true"
---------------------------------------------------------------------------------------------------------------------
Key: JBSEAM-3480
URL: https://jira.jboss.org/jira/browse/JBSEAM-3480
Project: Seam
Issue Type: Bug
Reporter: Francisco Jose Peredo Noguez
You can not call a s:link with propagation="none" linked to an action with @Begin from a page with conversation-required="true" to a page with conversation-required="true" because it will redirect you to the no-conversation-view-id. (And I think it shouldn't do that, it should allow you to reach the page you originally meant to reach, because the action has a @Begin and it should consider that)
Menu.java code:
@Name("menu")
public class Menu {
@Begin
public String goToCategoryList(){
return "/CategoryList.xhtml";
}
}
layout/menu.xhtml code:
<s:link value="Category List By Action" propagation="none" action="#{menu.goToCategoryList}"/>
And in CategoryList.page.xml
<?xml version="1.0" encoding="UTF-8"?>
<page xmlns="http://jboss.com/products/seam/pages"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd"
no-conversation-view-id="/Blank.xhtml" conversation-required="true">
<param name="firstResult" value="#{categoryList.firstResult}"/>
<param name="order" value="#{categoryList.order}"/>
<param name="from"/>
<param name="name" value="#{categoryList.category.name}"/>
</page>
The funny thing is that this makes the menu option work intermittently:
first time works (from a page without conversation-required to a page with conversation-required)
second time does not work (from a page with conversation-required to a page with conversation-required) and it gets redirected to Blank.seam
third time works (from a page without conversation-required to a page with conversation-required)
And so on and so forth...
The big question here is, if the @Begin is not really working, why it does work the first time? because if I comment the @Begin::
Menu.java code:
@Name("menu")
public class Menu {
//@Begin <----THIS IS NOW COMMENTED
public String goToCategoryList(){
return "/CategoryList.xhtml";
}
}
Then It fails always.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 2 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3607) Use schema for model generation, but don't include in @Table
by Valerie Griffin (JIRA)
Use schema for model generation, but don't include in @Table
------------------------------------------------------------
Key: JBSEAM-3607
URL: https://jira.jboss.org/jira/browse/JBSEAM-3607
Project: Seam
Issue Type: Feature Request
Components: Tools
Affects Versions: 2.1.0.CR1
Environment: Database with schemas, DB2 in particular
Reporter: Valerie Griffin
I'm building code using "my" development database. I need to tell Hibernate that the schema is "VALERIE" so it will ionly generate code for tables in that schema, but that's not going to be the test or release schema. Therefore, I don't want the schema to be part of the @Table lines. Perhaps there could be a question like "Is this the default schema for the connection?" where a "Yes" answer would not include the schema in the @Table lines while a "No" answer would include it.
Catalog probably could use a similar feature.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 2 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3611) exception handling causes facesmessages to not be shown
by Ken Gullaksen (JIRA)
exception handling causes facesmessages to not be shown
-------------------------------------------------------
Key: JBSEAM-3611
URL: https://jira.jboss.org/jira/browse/JBSEAM-3611
Project: Seam
Issue Type: Bug
Components: Exception Handling
Affects Versions: 2.0.2.SP1
Environment: ubuntu hardy heron amd64, firefox 3.0.3, jboss-4.2.0.GA_CP01, seam 2.0.2.SP1, richfaces 3.1.4.GA,
Reporter: Ken Gullaksen
Priority: Minor
When using ajax submit to an action method in a conversation scoped bean the following behavior is encountered.
On fresh deploy notloggedinexception message will be shown. If the page is refreshed and subsequently another action with @restrict annotation is called, the messages will not be displayed. There is no warning that facesmessages have been enqeud but not displayed, and another page refresh will cause the message to be shown.
May be a richfaces bug. I tried with the latest release of richfaces(3.2.2.GA) with same problem.
CODE:
--pages.xml
<?xml version="1.0" encoding="UTF-8"?>
<pages xmlns="http://jboss.com/products/seam/pages"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.com/products/seam/pages http://jboss.com/products/seam/pages-2.0.xsd"
no-conversation-view-id="/home.xhtml"
login-view-id="/home.xhtml">
<page view-id="*">
<navigation from-action="#{identity.logout}">
<redirect view-id="/home.xhtml"/>
</navigation>
</page>
<exception class="org.jboss.seam.security.NotLoggedInException">
<redirect view-id="/home.xhtml">
<message>You must be logged in to use this feature</message>
</redirect>
</exception>
<exception class="org.jboss.seam.security.AuthorizationException">
<redirect view-id="/home.xhtml">
<message>You do not have the necessary security privileges to perform this action.</message>
</redirect>
</exception>
</pages>
--categoryselector.java
@Conversational
@Scope(CONVERSATION)
@Name("categorySelectorAction")
public class CategorySelectorAction implements Serializable {
private static final long serialVersionUID = -1L;
@In
EntityManager entityManager;
@Logger
private Log log;
@RequestParameter("cat")
private String categoryId;
@Out(required = false)
private String selectedCategory;
@Out(required = false)
private String selectedMenuCategory;
@DataModel(scope = ScopeType.PAGE)
protected List<Category> categoryList;
@Begin(join = true)
@Factory("categoryList")
public void getCategoryList() {
categoryList = new ArrayList<Category>();
for(int i = 0; i < 3; ++i) {
List<Category> subcatList = new ArrayList<Category>();
for(int ii = 0; ii < 3; ++ii) {
subcatList.add(new Category("subcat"+ii));
}
Category cat = new Category("cat"+i, subcatList);
categoryList.add(cat);
}
}
@Begin(join = true)
@Restrict("#{identity.loggedIn}")
public void selectCategory() {
log.error("select category" + categoryId);
selectedCategory = categoryId;
if(!categoryId.contains("sub")) selectedMenuCategory = categoryId;
}
}
--home.xhtml
...
<h:form>
<rich:messages globalOnly="true" ajaxRendered="true"/>
<a4j:repeat var="cat"
value="#{categoryList}">
<a4j:commandLink action="{categorySelectorAction.selectCategory}"
value="#{cat.name}">
<f:param name="cat" value="#{cat.name}"/>
</a4j:commandLink>
<br/>
<a4j:repeat var="subcat"
value="#{cat.subcategories}"
rendered="#{selectedMenuCategory eq cat.name}">
**<a4j:commandLink action="{categorySelectorAction.selectCategory}"
value="#{subcat.name}">
<f:param name="cat" value="#{subcat.name}"/>
</a4j:commandLink>
<br/>
</a4j:repeat>
</a4j:repeat>
</h:form>
...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 2 months