[JBoss Seam] - Rendering buttons in a datatable fails
by hubaer
Hi all,
I have a problem with the rendered attribute and buttons in a h:dataTable. I have my list of entries (as in the listing). If I click on the "Edit" button all is ok - I get the edit page.
| <h:form>
| <h:dataTable var="entry" value="#{entryList}" rendered="#{entryList.rowCount>0}">
| <h:column>
| <f:facet name="header">
| <h:outputText value="Title"/>
| </f:facet>
| <h:outputText value="#{entry.title}"/>
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:outputText value="Status"/>
| </f:facet>
| <h:outputText value="#{entry.status}"/>
| </h:column>
| <h:column>
| <h:commandButton value="Edit" action="#{entryAction.edit(entry)}" />
| </h:column>
| </h:dataTable>
| </h:form>
|
Now I want to extend my table, that the button is only displayed if a status is set to a value allowing the editing of the entry.
I tried to put the rendered attribute to the h:commandButton like
| <h:commandButton value="Edit" action="#{entryAction.edit(entry)}" rendered="#{entryAction.editable}"/>
|
than only the allowed entries get a "Edit" button. But if I clicked on the button the page is rerendered and the corresponding action is not executed.
After that I tried the s:button. Here the method is executed, but the parameter is null in my method.
Has someone any hints or could help me solving this problem?
Regards
Marco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027246#4027246
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027246
19Â years, 1Â month
[Beginners Corner] - Re: Problem looking up EJB session bean (Name not bound)
by tonylmai
I think the problem I am having is relating to the way I packaged my ear file.
When I unpacked the ear and deployed only the jar file, I had no problem looking up the remote interfaces.
I would greatly appreciate if someone can help clarifying what I need in my ear file. O'Reilly's Enterprise JavaBeans 3.0 does not seem to address this at all.
Here is the structure of my ear file:
test.ear
| test-ds.xml
| test.jar
| META-INF
| application.xml
| MANIFEST.MF
My application.xml contains the following:
<?xml version="1.0" encoding="UTF-8"?>
| <application>
| <display-name>test</display-name>
| <description>Test Project</description>
| <!-- The EJB-JAR -->
| <!-- TODO: JBoss needs 'ejb' element but the spec requires 'persistence' -->
| <module>
| <!--
| <ejb>test.jar</ejb>
| -->
| <persistence>test.jar</persistence>
| </module>
| </application>
And my test-ds.xml is as followed:
<?xml version="1.0" encoding="UTF-8"?>
| <datasources>
| <local-tx-datasource>
| <jndi-name>testDS</jndi-name>
| <connection-url>jdbc:sqlserver://localhost:1814;databaseName=test;selectMethod=cursor;</connection-url>
| <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
| <user-name>***</user-name>
| <password>***</password>
| <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
| <min-pool-size>25</min-pool-size>
| <max-pool-size>100</max-pool-size>
| <blocking-timeout-millis>5000</blocking-timeout-millis>
| <idle-timeout-minutes>15</idle-timeout-minutes>
| <prepared-statement-cache-size>75</prepared-statement-cache-size>
| </local-tx-datasource>
| </datasources>
I think my test-ds.xml is OK because it worked with plain jar deployment. What else missing in my application.xml file?
Thanks for your help.
-tony
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027244#4027244
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027244
19Â years, 1Â month
[EJB/JBoss] - Re: Problem looking up EJB session bean (Name not bound)
by tonylmai
I think the problem I am having is relating to the way I packaged my ear file.
When I unpacked the ear and deployed only the jar file, I had no problem looking up the remote interfaces.
I would greatly appreciate if someone can help clarifying what I need in my ear file. O'Reilly's Enterprise JavaBeans 3.0 does not seem to address this at all.
Here is the structure of my ear file:
test.ear
| test-ds.xml
| test.jar
| META-INF
| application.xml
| MANIFEST.MF
My application.xml contains the following:
<?xml version="1.0" encoding="UTF-8"?>
| <application>
| <display-name>test</display-name>
| <description>Test Project</description>
| <!-- The EJB-JAR -->
| <!-- TODO: JBoss needs 'ejb' element but the spec requires 'persistence' -->
| <module>
| <!--
| <ejb>test.jar</ejb>
| -->
| <persistence>test.jar</persistence>
| </module>
| </application>
And my test-ds.xml is as followed:
<?xml version="1.0" encoding="UTF-8"?>
| <datasources>
| <local-tx-datasource>
| <jndi-name>testDS</jndi-name>
| <connection-url>jdbc:sqlserver://localhost:1814;databaseName=test;selectMethod=cursor;</connection-url>
| <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class>
| <user-name>***</user-name>
| <password>***</password>
| <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
| <min-pool-size>25</min-pool-size>
| <max-pool-size>100</max-pool-size>
| <blocking-timeout-millis>5000</blocking-timeout-millis>
| <idle-timeout-minutes>15</idle-timeout-minutes>
| <prepared-statement-cache-size>75</prepared-statement-cache-size>
| </local-tx-datasource>
| </datasources>
I think my test-ds.xml is OK because it worked with plain jar deployment. What else missing in my application.xml file?
Thanks for your help.
-tony
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027243#4027243
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027243
19Â years, 1Â month
[JBoss Seam] - Re: Online Seam DVD Store example broken?
by avbentem
...I did it again?
To be more precise: in Firefox I logged in as user5, and placed an order. I assume the order process management was version 1, without any check, and automatic shipment. Next, I left Firefox open and used Internet Explorer to log in as manager. Some order with zero amount and empty user was awaiting shipment, but I doubt that was my order. Hitting Ship yields an error and that order is still there...
Next, I set the process management to the 3rd version (in Internet Explorer). Then, in Firefox (which had user5 still logged in) I created another order. In Explorer (manager still logged in) I accepted and shipped that order, and back in Firefox the order details were no longer in sync.
So: I really hope this could not have been caused by running two sessions on one computer? To avoid any cookie problems, I explicitly used two different browsers. I also hope it cannot be caused by changing the order state while the customer is still logged in...?
Maybe I can run the example on my local system tomorrow or later this week, to do some more debugging.
Arjan.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4027239#4027239
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027239
19Â years, 1Â month