[JBoss Seam] - Re: Performence of Seam 2.0 app
by sbublava
"MSchmidke" wrote :
| The most "complicated" thing on the page is a combobox with about 100 entries, all other of the about 15 components are really simple.
|
| ...
|
| Is s:selectItems / s:convertEntity a problem?
|
I just profiled on of my pages today and s:selectItems can indeed be a problem for combo-boxes with many entries.
The code below is from asSelectItems() in UISelectItems.java:
| for (Object o : iterable)
| {
| initVar(o);
| selectItems.add(new javax.faces.model.SelectItem(o, getLabel() == null ? null : getLabel(), "", getDisabled() == null ? false : getDisabled()));
| destroyVar();
| }
|
As you can see getLabel() and getDisabled() (usually value expressions) are called twice per entry. I've changed this locally to use local variables and it makes a noticeable difference.
In my case there are even more combo box entries - your mileage may vary ...
Thanks,
Stephan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100222#4100222
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100222
18Â years, 5Â months
[JBoss Seam] - skipping validation
by jamesjmp
hi,
I´ve a seam-gened form with the tipical fields that use the edit.xhtml template.
For instance
|
| <s:decorate id="benchmarkDesDecoration" template="layout/edit.xhtml">
| <ui:define name="label">#{messages['CfgBenchmark']}</ui:define>
| <h:inputText id="benchmarkDes"
| size="20"
| maxlength="50"
| required="true"
| value="#{rstReportHome.instance.cfgBenchmark.benchmarkDes}"
| disabled="true">
| <a:support event="onblur" reRender="benchmarkDesDecoration"/>
| </h:inputText>
| </s:decorate>
|
When I press the save button the validation is done (in my case to see it compulsory fields have been filled). Ok, that´s perfect.
But, I´ve added an extra button that invokes a method in the POJOHome, and I want it to be executed withoth previous validation, because the action of that button doesn´t need all info to be filled.
Is there a way of preventing validation from being performed for a button?
This is the button code
| <h:commandButton id="testIt"
| value="#{messages['test']}"
| action="#{rstReportHome.test}"/>
|
thanks in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100220#4100220
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100220
18Â years, 5Â months
[JBoss Seam] - Seam, Cache and EJB
by Stateless Bean
Hi,
In persistence I set cache like this:
| <property name="dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
| <!-- These are the default for JBoss EJB3, but not for HEM: -->
| <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
| <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
|
| <property name="hibernate.cache.use_query_cache" value="true"/>
| <property name="hibernate.cache.region_prefix" value="hibernate.test"/>
| <property name="hibernate.jdbc.use_streams_for_binary" value="true"/>
| <property name="hibernate.cache.use_minimal_puts" value="true"/>
| <property name="hibernate.cache.use_query_cache" value="true"/>
| <property name="hibernate.cache.use_structured_entries" value="true"/>
|
for using cache.
My app has also scheduler whitch add's some records to db, and here is my problem.
When user goes in to some subpage for example "we" load 10 records from db, but after that scheduler add new 2 records, and when user goes again to my subpage he still see 10 records.
How can I check of new records and load changes or force seam/ejb to load new data?
In this example only way to see what has changed in db, is to logout destroy session and login.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100212#4100212
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100212
18Â years, 5Â months