[JBoss Seam] - Re: s:link missing conversationId, sometimes
by pdpantages
Hi Gavin, OK, following is my xhtml. The first reference to the object, "triggertable" is before the s:ilnk, but the reference is on some buttons, so the object may not instantiated until the corresponding action is invoked.?
Your comment has got me thinking, though. I didn't think that the order on the page would matter. The dataTable is constructed from an outjected DataModel (from the SFSB) so the component would have been created before the datatable was created; thus the s:links inside the table are OK. I will try to reference some part of the object ahead of the s:link and see if that fixes me up.
My firefox location/URL shows the correct conversationId when I load the page
Wrt. a4j:commanLink, if I "copy link location" from the link in question I see something like:
| http://nebula:8080/client/view/workflow/triggertable.seam?conversationId=...
|
I thought the seam redirect filter was adding it for me? Anway, I did not use f:param or other mechanism to set the conversationId here... I did not add the # character either.
Here is my page. The s:link that gives me trouble is in the div_control_buttons, right after the ui:include. If I change this to a4j:commanLink, I get the url as above.
| <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:t="http://myfaces.apache.org/tomahawk"
| xmlns:c="http://java.sun.com/jstl/core"
| xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
| xmlns:centina="http://www.centinasystems.com/jsf"
| template="/view/main.xhtml">
|
| <ui:define name="page_title">
| <h:outputText value="Workflow > Trigger Table"/>
| </ui:define>
|
| <ui:define name="ui_pagelayout">
| <ui:include src="/view/layout1.xhtml" />
| </ui:define>
|
| <ui:define name="ui_a4j_poll">
| <a4j:poll
| id="triggerTablePoller"
| interval="4000"
| enabled="true"
| eventsQueue="triggerTablePollerQueue"
| reRender="#{mainPanel}">
| </a4j:poll>
| </ui:define>
|
| <ui:define name="ui_control_panel">
|
| <div class="div_control_buttons">
|
| <ui:include src="/view/ajaxtablebuttons.xhtml">
| <ui:param name="object" value="trigger"/>
| <ui:param name="reRender" value="mainPanel"/>
| <ui:param name="entity" value="#{triggerTable}"/>
| </ui:include>
|
| <t:div styleClass="icontool">
| <s:link
| title="Create a new scheduled trigger"
| action="#{workFlowAction.newTrigger}" >
| <img src="/client/img/newtrigger32x32.png"
| class="iconButtonOut"
| onMouseOver="this.className='iconButtonUp'"
| onMouseOut="this.className='iconButtonOut'"
| onMouseDown="this.className='iconButtonDown'"
| onMouseUp="this.className='iconButtonUp'" />
| <f:param name="ctx" value="triggertable"/>
| </s:link>
| </t:div>
|
| </div>
|
| </ui:define>
|
| <ui:define name="ui_content">
|
| <div class="unbounded_container">
|
| <a4j:outputPanel id="mainPanel">
|
| <t:dataTable value="#{triggerList}" var="trigger"
| rendered="true">
|
| <t:column>
| <a4j:commandLink
| title="select"
| value="M"
| reRender="mainPanel"
| styleClass="#{(triggerTable.selections[trigger.id]) ? 'selectedbutton' : 'selectbutton' }"
| action="#{triggerTable.select}" >
| </a4j:commandLink>
| </t:column>
|
| <t:column>
| <f:facet name="header">
| <h:outputText
| title="Description"
| value="Description"/>
| </f:facet>
|
| <s:link value="#{trigger.name}"
| action="#{workFlowScheduledTrigger.editWfc}" >
| <f:param name="wfid" value="#{trigger.id}"/>
| <f:param name="wftype" value="#{trigger.type}"/>
| <f:param name="ctx" value="triggertable"/>
| </s:link>
| </t:column>
|
| <t:column>
| <f:facet name="header">
| <h:outputText
| title="Start Date"
| value="Start Date"/>
| </f:facet>
| <h:outputText value="#{trigger.startDate}"/>
| </t:column>
|
| <t:column>
| <f:facet name="header">
| <h:outputText
| title="Repetitions"
| value="Repetitions"/>
| </f:facet>
| <h:outputText value="#{trigger.repetitions}"/>
| </t:column>
|
| <t:column>
| <f:facet name="header">
| <h:outputText
| title="Period"
| value="Period"/>
| </f:facet>
| <h:outputText value="#{trigger.period}"/>
| </t:column>
|
| </t:dataTable>
|
| </a4j:outputPanel>
|
| </div>
|
| </ui:define>
|
| </ui:composition>
|
|
The included ajaxtablebuttons:
|
| <ui:composition xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:h="http://java.sun.com/jsf/html"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:t="http://myfaces.apache.org/tomahawk"
| xmlns:c="http://java.sun.com/jstl/core"
| xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
| xmlns:centina="http://www.centinasystems.com/jsf">
|
| <t:div styleClass="icontool">
| <a4j:commandLink
| title="Select all #{object}s"
| reRender="#{reRender}"
| limitToList="true"
| ajaxSingle="true"
| action="#{entity.selectAll}" >
| <img src="/client/img/selectall32framed.png"
| class="iconButtonOut"
| onMouseOver="this.className='iconButtonUp'"
| onMouseOut="this.className='iconButtonOut'"
| onMouseDown="this.className='iconButtonDown'"
| onMouseUp="this.className='iconButtonUp'" />
| </a4j:commandLink>
| </t:div>
|
| <t:div styleClass="icontool">
| <a4j:commandLink
| title="Unselect all #{object}s"
| reRender="#{reRender}"
| limitToList="true"
| ajaxSingle="true"
| action="#{entity.unselectAll}" >
| <img src="/client/img/unselectAll32.png"
| class="iconButtonOut"
| onMouseOver="this.className='iconButtonUp'"
| onMouseOut="this.className='iconButtonOut'"
| onMouseDown="this.className='iconButtonDown'"
| onMouseUp="this.className='iconButtonUp'" />
| </a4j:commandLink>
| </t:div>
|
| <t:div styleClass="icontool">
| <a4j:commandLink
| title="Delete Selected #{object}s"
| onclick="if (!window.confirm('Confirm delete of selected #{object}s')) return false;"
| reRender="#{reRender}"
| limitToList="true"
| ajaxSingle="true"
| action="#{entity.deleteSelections}" >
| <img src="/client/img/deleteall32framed.png"
| class="iconButtonOut"
| onMouseOver="this.className='iconButtonUp'"
| onMouseOut="this.className='iconButtonOut'"
| onMouseDown="this.className='iconButtonDown'"
| onMouseUp="this.className='iconButtonUp'" />
| </a4j:commandLink>
| </t:div>
|
| </ui:composition>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994870#3994870
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994870
19 years, 4 months
[JBoss Seam] - Re: Basic Seam questions
by lightbulb432
Wouldn't those objects still be in memory with the SFSB still being alive? If you persist many objects and the persistence context closes, doesn't that mean the objects become detached only...aren't those objects still in memory though?
On an unrelated note, does <s:decorate> only work for per-field validation as defined in the annotations? Let's say a backing session bean figures out in its action method that multiple fields are invalid (based on business logic, not Hibernate Validator), how from the action method would you get <s:decorate> for certain fields to alert the user of invalid input?
The reason the validation can't be done directly on a per-field basis is because whether a form field is invalid depends on the value of another form field... Is what I'm suggesting even possible?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994867#3994867
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994867
19 years, 4 months