[JBoss Seam] - Re: facesMessages and t:panelNavigation2
by cayo
And the problem with rendering the navigation:
the code from the facelets template:
anonymous wrote :
| <ui:insert name="navigation">
|
|
| <ui:include src="navigationmenu.xhtml" />
|
|
| </ui:insert>
|
the inserted navigationmenu.xhtml
anonymous wrote :
| <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <div xmlns="http://www.w3.org/1999/xhtml"
| xmlns:c="http://java.sun.com/jstl/core"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:t="http://myfaces.apache.org/tomahawk"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html">
|
|
| <h:form id="navForm">
| <t:panelNavigation2 id="nav01" layout="list" itemClass="mypage" activeItemClass="selected" openItemClass="selected" >
|
| <t:commandNavigation2 id="listing" value="#{messages['nav_0']}" >
|
| <t:commandNavigation2 id="listingStandard" value="1" action="#{productform.processAction}">
| <t:outputText value="#{messages['nav_0_1']}" />
| </t:commandNavigation2>
|
| <t:commandNavigation2 id="listingNonfood" value="4" action="#{productform.processAction}">
| <t:outputText value="#{messages['nav_0_2']}" />
| </t:commandNavigation2>
|
| <t:commandNavigation2 id="listingRqm" value="3" action="#{productform.processAction}">
| <t:outputText value="#{messages['nav_0_3']}" />
| </t:commandNavigation2>
|
| <t:commandNavigation2 id="listingRol" value="5" action="#{productform.processAction}">
| <t:outputText value="#{messages['nav_0_4']}" />
| </t:commandNavigation2>
|
| <t:commandNavigation2 id="listingTest" value="2" action="#{productform.processAction}">
| <t:outputText value="#{messages['nav_0_5']}" />
| </t:commandNavigation2>
|
| <t:commandNavigation2 id="listingAktion" action="null" value="#{messages['nav_0_6']}" >
|
| <t:commandNavigation2 id="listingAktionNonfood" value="7" action="#{productform.processAction}">
| <t:outputText value="#{messages['nav_0_6_1']}" />
| </t:commandNavigation2>
|
| <t:commandNavigation2 id="listingDrogerie" value="6" action="#{productform.processAction}">
| <t:outputText value="#{messages['nav_0_6_2']}" />
| </t:commandNavigation2>
|
| </t:commandNavigation2>
|
| <t:commandNavigation2 id="listingDezentral" value="8" action="#{productform.processAction}">
| <t:outputText value="#{messages['nav_0_7']}" />
| </t:commandNavigation2>
|
| </t:commandNavigation2>
|
| <t:commandNavigation2 id="arbeitsliste" action="worklist" actionListener="#{worklist.processAction}" >
| <t:outputText value="#{messages['nav_1']}" />
| </t:commandNavigation2>
|
| <t:commandNavigation2 id="prozesse" value="#{messages['nav_2']}" >
|
| <t:commandNavigation2 id="prozessTemplates" actionListener="#{templatelist.processAction}">
| <t:outputText value="#{messages['nav_2_1']}" />
| </t:commandNavigation2>
|
| <t:commandNavigation2 id="prozessInstanzen" actionListener="#{instancelist.processAction}">
| <t:outputText value="#{messages['nav_2_2']}" />
| </t:commandNavigation2>
|
| </t:commandNavigation2>
|
| <t:commandNavigation2 id="logoff" action="#{worklist.logoff}" >
| <t:outputText value="#{messages['nav_4']}" />
| </t:commandNavigation2>
|
| </t:panelNavigation2>
| </h:form>
|
|
|
the web.xml is configured correctly, every t:-component is use works fine including the navigation. It only initializes after ervery rendering and doesn't hold the state.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958663#3958663
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958663
19 years, 9 months
[JBoss Seam] - Re: facesMessages and t:panelNavigation2
by cayo
First the thing with the messages:
anonymous wrote :
| <t:div styleClass="messageBlock">
| <h:messages layout="list" globalOnly="false" errorClass="error" showDetail="true" />
| </t:div>
|
above the declaration which is inserted in a facelets template like this:
anonymous wrote :
| <ui:insert name="messages">
|
| <ui:include src="messagefooter.xhtml" />
|
| </ui:insert>
|
and used in the source like this:
anonymous wrote :
| @In(create=true)
| private transient FacesMessages facesMessages;
|
| ...
|
| facesMessages.addFromResourceBundle("msg.info.6");
|
| or
|
| facesMessages.addFromResourceBundle(FacesMessage.SEVERITY_WARN, "msg.warn.2");
|
The message "msg..." is found in the resourceBundle which is declared in the seam.properties and displayed twice in one row on the screen.
If I don't use a message from the bundle it works correct.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958660#3958660
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958660
19 years, 9 months
[JBoss jBPM] - Re: Remove or Delete User - Group from Identity store
by hosierdm
As promised, here are the hibernate cascade changes. All the identity hibernate mapping files I changed can be found in the jBPM source directory src\java.identity\org\jbpm\identity.
In User.hbm.xml, change <set name="memberships" cascade="all"> to <set name="memberships" cascade="all-delete-orphan">
In Group.hbm.xml, change <set name="memberships" cascade="all"> to <set name="memberships" cascade="all-delete-orphan">
In Membership.hbm.xml, change
<many-to-one name="user" column="USER_" cascade="all"
| foreign-key="FK_ID_MEMSHIP_USR"/>
| <many-to-one name="group" column="GROUP_" cascade="all"
| foreign-key="FK_ID_MEMSHIP_GRP"/> to <many-to-one name="user" column="USER_" cascade="save-update"
| foreign-key="FK_ID_MEMSHIP_USR"/>
| <many-to-one name="group" column="GROUP_" cascade="save-update"
| foreign-key="FK_ID_MEMSHIP_GRP"/>
Bear in mind that I have absolutely zero experience with Hibernate. I was only able to tweak these settings after checking out a website that my boss sent me, which I unfortunately did not bookmark (so I can't pass it along). But I'm sure a Google search can help elucidate these cascade settings if you have questions about them. And maybe someone smart like Ronald or Koen might stumble across this and point out that I've done something terribly wrong. All I know is that these changes worked for me to accomplish what I needed to add to jBPM (running with Oracle10g to boot). I've added other methods to the IdentitySession class as well if you have any other needs, but you could also try taking a stab at writing the methods based on my example and the others that already exist...which is what I did.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958657#3958657
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958657
19 years, 9 months
[JBoss jBPM] - Re: Remove or Delete User - Group from Identity store
by hosierdm
So first off, sorry for the delay...very busy with work stuff. Second, I'm not sure what you mean when you ask about using the identitySession to commit transactions. I call IdentitySession methods, that's it. Hibernate takes care of all that stuff in the background. I responded to the thread you referenced, but my response isn't much help right now.
Ok, here is what I did for deleting Users. I added a method called deleteUserByName(String ) to the IdentitySession class, which is as follows:
public void deleteUserByName(String userName) {
| User user = getUserByName(userName);
| session.delete(user);
| }
And here is the method I have in a class of mine where I call this:
public void deleteUser(String userName)
| {
| JbpmContext jbpmContext = _jbpmConfig.createJbpmContext();
| try
| {
| IdentitySession idSession = new IdentitySession(jbpmContext.getSession());
| idSession.deleteUserByName(userName);
| }
| finally
| {
| jbpmContext.close();
| }
| }
As for the cascade changes, give me a bit to do a diff, and then I'll post that information as well.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958656#3958656
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958656
19 years, 9 months