[JBoss Seam] - Using enhanced EL
by twocoasttb
When selecting an entity from a list (like in the hotel booking example), does the source of the list have to be a DataModel? The following isn't working for me:
<rich:dataTable id="users" value="#{organizationUsers.resultList}" var="u">
| <f:facet name="footer">
| <s:link value="Add user" action="#{userAdmin.create}"/>
| </f:facet>
| <rich:column>
| <f:facet name="header">Last Name</f:facet>
| <h:outputText value="#{u.lastName}"/>
| </rich:column>
| <rich:column>
| <f:facet name="header">First Name</f:facet>
| <h:outputText value="#{u.firstName}"/>
| </rich:column>
| <rich:column>
| <f:facet name="header">Email</f:facet>
| <h:outputText value="#{u.emailAddress}"/>
| </rich:column>
| <rich:column>
| <f:facet name="header">Last Connected</f:facet>
| <h:outputText value="#{u.lastConnected}">
| <f:convertDateTime pattern="MM/dd/yyyy h:mm a" timeZone="#{userTimeZone}"/>
| </h:outputText>
| </rich:column>
| <rich:column>
| <f:facet name="header">Action</f:facet>
| <s:link id="editUser" action="#{userAdmin.edit(u)}" value="edit"/>
| </rich:column>
| </rich:dataTable>
The source of the list is:
@Name("organizationUsers")
| public class OrganizationUsers extends EntityQuery {
|
| @In
| SessionPreferences prefs;
|
| @Override
| public String getEjbql() {
| return "from SiteUser u where u.organization = #{prefs.currentOrganization}";
| }
|
| @Override
| public String getOrder() {
| return "u.lastName, u.firstName";
| }
|
| }
And I believe things are properly configured in faces-config.xml to enable enhanced EL:
<faces-config>
|
| <!-- Select one of the standard transaction models for the Seam application -->
|
| <lifecycle>
| <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
| </lifecycle>
|
| </faces-config>
A null value is passed to userAdmin.edit(). The URLs behind the 'edit' links do not reference a 'DataModelSelection' like they do in the booking example.
Any ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039464#4039464
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039464
19 years
[JBoss Seam] - Seems to be a bug
by KoniKoni
Environment jboss as 4.2.0CR2, seam 1.2.1 cvs today.
Value of selectOneMenu will not be set:
1.
| @In(required=false)
| @Out(required=false)
| private Kfz kfz;
|
| @DataModel
| private List<Kfz> bearbkfzList;
|
| @Begin(join=true)
| public String searchKfz(){
|
| currentPage=0;
| if ( ! bid.equals("") ){
| try{
| lid = Long.parseLong(bid);
| }catch(NumberFormatException ex){
| facesMessages.add("FNr ist keine Ziffer!");
| return "null";
| }
| }else{
| lid = 0L;
| }
| updateResults();
| if ((bearbkfzList == null) || (bearbkfzList.isEmpty()) ){
| facesMessages.add("Keine Treffer");
| return "null";
| }
|
| return "/kfzresultbearb";
| }
|
2.From kfzresultbearb
@DataModelSelection("bearbkfzList")
| Kfz selectedKfz;
|
| public String editKfz() {
| kfz = selectedKfz;
| return "/editkfz";
| }
|
Than to follow view
<h:form>
| <rich:panel>
| <h:panelGroup id="frms">
| <h:panelGrid columns="2">
| <h:outputText value="FNr: "/> <h:outputText value="#{kfz.id}"/>
| </h:panelGrid>
| <h:panelGrid columns="3">
| <h:outputText value="Fabrikat: "/>
| <h:panelGroup style="display:block">
| <a4j:region renderRegionOnly="false">
| <h:selectOneMenu id="hrs23" value="#{kfz.hersteller}" required="true">
| <s:convertEntity />
| <s:selectItems value="#{hListe.resultList}" var="her" label="#{her.bezeichnung}" noSelectionLabel="Bitte waehlen..." />
| <a4j:support event="onchange"
| reRender="modelsel" />
| </h:selectOneMenu>
|
| </a4j:region>
| </h:panelGroup>
| <h:message for="hrs23" />
<framework:entity-query name="hListe" ejbql="select h from Hersteller h" />
All take place in a session statefull bean
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039455#4039455
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039455
19 years
[JBoss Seam] - Re: Integrating Tomahawk with Seam
by atao
anonymous wrote :
| I was thinking perhaps we need to add the configuration to JBoss not our app, since the MyFaces stuff is in JBoss but I couldnt find anything on the JBoss site except in some forums people say they do have this configured.
|
Tomahawk works fine with application configuration. I put this in web.xml:
| <!-- MyFaces : Tomahawk extension -->
|
| <filter>
| <filter-name>MyFacesExtensionsFilter</filter-name>
| <filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
| <init-param>
| <param-name>maxFileSize</param-name>
| <param-value>20m</param-value>
| </init-param>
| </filter>
|
| <!-- extension mapping for adding <script/>, <link/>, and other resource tags to JSF-pages -->
| <!-- keep only the mappingwith url-pattern
| <filter-mapping>
| <filter-name>MyFacesExtensionsFilter</filter-name>
| <servlet-name>Faces Servlet</servlet-name>
| </filter-mapping>
| -->
|
| <filter-mapping>
| <filter-name>MyFacesExtensionsFilter</filter-name>
| <url-pattern>*.seam</url-pattern>
| </filter-mapping>
|
| <!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
| <filter-mapping>
| <filter-name>MyFacesExtensionsFilter</filter-name>
| <url-pattern>/faces/*</url-pattern>
| </filter-mapping>
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039453#4039453
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039453
19 years
[JBoss Seam] - Re: s:fragment in dataTable
by tony.herstell@gmail.com
Well I hope that this post helps someone who got as frustrated as myself.
tis like second nature to do this:
| <h:column>
| <s:fragment rendered="#{eachDisplayableCategory.refined}">
| <s:fragment
| rendered="#{eachDisplayableCategory.immutableCategory.parent == null}">
| <h:selectBooleanCheckbox
| value="#{eachDisplayableCategory.selected}" disabled="true" />
| </s:fragment>
| <s:fragment
| rendered="#{eachDisplayableCategory.immutableCategory.parent != null}">
| <h:selectBooleanCheckbox
| value="#{eachDisplayableCategory.selected}" />
| </s:fragment>
| </s:fragment>
| <s:fragment rendered="#{eachDisplayableCategory.refined}">
| <h:selectBooleanCheckbox
| value="#{eachDisplayableCategory.selected}" disabled="true" />
| </s:fragment>
| </h:column>
|
its only a small set to add <s:fragment> outside the column!!! and you have NO IDEA why suddenly nothing happens...
:/
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039452#4039452
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039452
19 years
[Clustering/JBoss] - Re: Cluster is loosing his master
by bernd.koecke
No I don't have FD_SOCK next to FD. I saw the doubled node when the whole cluster had a high load with lots of garbage collection runs. That was the reason why I thought that the use of FD_SOCK will lessen the likelihood of the problem, but it still can happen, especially when a node takes a GC run of about 5 to 8 seconds. Ok, the nodes were less powerful machines, now they are much stronger :).
I have a UDP-based config. And some of the timing parameter are not very smart. The result is that it sometimes happens that a node is suspected before he had the chance to send his first message. But changing these parameters will again only reduce the likelihood of the doubled node, but it can't be avoided.
I agree, the base problem is that the doubled node is not completely recognised. I thought it was easier to make a node name unique, than detecting that he is in the list twice and that one of this names is from a dead member. But it may be that the unique name is not a clean design and that it only works because of some side effects ;).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039444#4039444
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039444
19 years