[jboss-user] [JBoss Seam] - Re: messages.properties are not loaded when included in a ja

2007-08-23 Thread pnorman4
Ok. That's a good idéa. Thanks for your time!


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077237#4077237

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077237

___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: messages.properties are not loaded when included in a ja

2007-08-23 Thread pnorman4
Tanks

By naming my message bundles differently I could get them all loaded. 

The only thing is that I now need to specify each bundle in components.xml, 
which resides in the generic web application. That means that for each new 
plug-in I have to update the web application. It would be better if the plugin 
could point out its own message bundle.

I tried to add 
  | org.jboss.seam.core.resourceBundle.bundleNames=plugin_specific_messages
  |  
in seam.properties (as in 13.2.1 in the Seam 1.2.1 reference), but it didn't 
work. 

Question: Is there a way to inside a jar-file configure Seam to add a new 
message bundle?


View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077163#4077163

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077163
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - messages.properties are not loaded when included in a jar-fi

2007-08-22 Thread pnorman4
Hi

I have a Seam 1.2.1 web application where I can add functionality as plug-ins. 
A plug-in consist of jsf pages, web resources and a jar-file with classes. The 
jar-file is put in WEB-INF/lib and contains messages.properties in the root. 
The jared beans work fine but messages.properties doesn't seem to be loaded. 

Do I have to explicitly point out the message bundle? How?

If I have several plug-in jar-files, can they all contain messages.properties, 
or do they need to have different names?

Thanx

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076635#4076635

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076635
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Question regarding performance and multiple JavaBean bij

2007-04-25 Thread pnorman4
anonymous wrote : 
  | Each time that you call a method on your Seam component, Seam will biject 
as required. When the method is complete Seam disinjects the any injections. 
So, each time you call #{testBean.testValue}, you get an injection. 
  | 

OK. I hadn't understood the difference between @Out and property access. 

I think the problem is we're using Seam the wrong way. We're mixing up session 
beans and entity beans (because they're all JavaBeans to us). We're accessing 
properties on complex controller beans with lots of injections (dependencies to 
other beans), instead of using simple entity objects. This is triggering long 
chains of injections repeated multiple times, which is slowing down our app.

I will now redesign our beans.

Thanx for your time and good support!





View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040652#4040652

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040652
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Question regarding performance and multiple JavaBean bij

2007-04-24 Thread pnorman4
I've done some research and a mini test application to show my results:

The bean

  | import org.jboss.seam.annotations.In;
  | import org.jboss.seam.annotations.Logger;
  | import org.jboss.seam.annotations.Name;
  | import org.jboss.seam.annotations.Out;
  | import org.jboss.seam.log.Log;
  | import javax.faces.context.FacesContext;
  | 
  | @Name("testBean")
  | public class TestBean {
  | @Logger Log log;
  | 
  | @In
  | public void setFacesContext(FacesContext facesContext) {
  | log.debug(" === Inject: @In setFacesContext.");
  | }
  | 
  | @Out
  | private String testValue = "test value";
  | 
  | public String getTestValue() {
  | return testValue;
  | }
  | }
  | 

The view

  | 
  | http://www.w3.org/1999/xhtml";
  |   xmlns:jsp="http://java.sun.com/JSP/Page";
  |   xmlns:h="http://java.sun.com/jsf/html";
  |   xmlns:f="http://java.sun.com/jsf/core";
  |   xmlns:ui="http://java.sun.com/jsf/facelets";>
  | 
  | 
  | 
  | 
  | 
  | Bean access
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 

The result is that facesContext is injected 4 times - twice for each 
#{testBean.testValue}. Adding another #{testBean.testValue} will force two more 
injections! 

The #{testValue} on the other hand does not enforce any injections.

Now I wonder: 
* Is this behavior a bug? 
* Do I get this behaviour because I'm using JavaBeans instead of EJB3 
SessionBeans?

Also:
* To get the @Out outjection to work, I must first access the bean (with 
#{testBean.testValue} for instance). Is there another way to "wake up" the bean 
so that @Out works?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040381#4040381

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040381
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Question regarding performance and multiple JavaBean bij

2007-04-20 Thread pnorman4
The table references the model with:
  

But also mainBean properties directly like:
 
 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039211#4039211

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039211
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Question regarding performance and multiple JavaBean bijecti

2007-04-19 Thread pnorman4
Hi

We're developing a site based on MyFaces, Facelets and Seam, and now we're a 
little concerned about the performance - it's a bit slow. While analyzing the 
code I found out some strange Seam behavior.

Background: All our Seam beans are normal JavaBeans (no EJB beans). We'r 
running the web application in Tomcat (no EE container).

Case: I have a SESSION scoped bean called mainBean with (among other things) a 
@DataModel getter, a @DataModelSelection setter and an @In setter like the 
following fragment. 

  | @In(create = true)
  | public void setWebUser(WebUserBean webUser) {
  | log.debug(" === Injecting @In 'webUser' (#0 times).", 
bullCounter3++);
  | this.webUser = webUser;
  | }
  | 
  | @DataModel
  | public List getMainListItems() {
  | log.debug(" === Reading @DataModel 'getMainListItems' (#0 times).", 
bullCounter++);
  | if (isCurrentList())
  | return currentMainObjectAsList().getListItems();
  | else
  | return null;
  | }
  | 
  | 
  | protected MooxObject selectedListItem;
  | 
  | @DataModelSelection("mainListItems")
  | public void setSelectedListItem(MooxObject selectedListItem) {
  | log.debug(" === Injecting @DataModelSelection 'setSelectedListItem' 
(#0 times).", bullCounter2++);
  | this.selectedListItem = selectedListItem;   
  | }
  | 

The page that uses mainBean can contain either nothing, an object or a list. We 
use facelets'  to alter the page depending on what it contains. 

The strange thing is that the annotated getters and setters are called multiple 
times for each request. I've included three different log outputs to visualize 
it:

With an empty page (no reference to @DataModel):

  | [org.jboss.seam.jsf.SeamPhaseListener - 40] before phase: RESTORE_VIEW(1)
  | [org.jboss.seam.jsf.SeamPhaseListener - 84] after phase: RESTORE_VIEW(1)
  | [org.jboss.seam.jsf.SeamPhaseListener - 40] before phase: RENDER_RESPONSE(6)
  | [com.fastsearch.w2p.moox.beans.MainBean - 48]  === Injecting @In 'webUser' 
(54 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 118]  === Reading @DataModel 
'getMainListItems' (27 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 48]  === Injecting @In 'webUser' 
(55 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 48]  === Injecting @In 'webUser' 
(56 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 118]  === Reading @DataModel 
'getMainListItems' (28 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 48]  === Injecting @In 'webUser' 
(57 times).
  | [org.jboss.seam.jsf.SeamPhaseListener - 84] after phase: RENDER_RESPONSE(6)
  | 
The strange thing is that @DataModel getter is called twice, although never 
referenced. And webUser bean is injected 4 times.

With a single object page (no reference to @DataModel): 

  | [org.jboss.seam.jsf.SeamPhaseListener - 40] before phase: RESTORE_VIEW(1)
  | [org.jboss.seam.jsf.SeamPhaseListener - 84] after phase: RESTORE_VIEW(1)
  | [org.jboss.seam.jsf.SeamPhaseListener - 40] before phase: RENDER_RESPONSE(6)
  | [com.fastsearch.w2p.moox.beans.MainBean - 48]  === Injecting @In 'webUser' 
(560 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 130]  === Injecting 
@DataModelSelection 'setSelectedListItem' (228 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 118]  === Reading @DataModel 
'getMainListItems' (298 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 48]  === Injecting @In 'webUser' 
(561 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 48]  === Injecting @In 'webUser' 
(562 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 130]  === Injecting 
@DataModelSelection 'setSelectedListItem' (229 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 268] ** MainBean - 
setCurrentObject
  | [com.fastsearch.w2p.moox.beans.MainBean - 118]  === Reading @DataModel 
'getMainListItems' (299 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 48]  === Injecting @In 'webUser' 
(563 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 48]  === Injecting @In 'webUser' 
(564 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 118]  === Reading @DataModel 
'getMainListItems' (300 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 48]  === Injecting @In 'webUser' 
(565 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 48]  === Injecting @In 'webUser' 
(566 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 118]  === Reading @DataModel 
'getMainListItems' (301 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 48]  === Injecting @In 'webUser' 
(567 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 48]  === Injecting @In 'webUser' 
(568 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 118]  === Reading @DataModel 
'getMainListItems' (302 times).
  | [com.fastsearch.w2p.moox.beans.MainBean - 48]  === Injecting @In 'webUser' 
(569 times).
  | [org.jboss.seam.jsf.SeamPhaseListener - 84] after phase: RENDER_RESPONSE(6)
  | 
Now we hav

[jboss-user] [JBoss Seam] - Re: DataModelSelection property not set after using the back

2007-02-23 Thread pnorman4
That's it!! I'm reloading the list when entering detail view. Of cours I can't 
go back to thelist again. Completely logical now when I see it.

I removed the updateListItems() call and now it works!!

You're my hero! 

Per

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021075#4021075

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021075
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: DataModelSelection property not set after using the back

2007-02-22 Thread pnorman4
Actually, I'm using four different @DataModel. Three of these have their own 
@DataModelSelection.

The page is composed of a page with a table (uses mainListItems). and a small 
list of selected items (populated by selectedListItems).

The page uses a facelet template, which contains a menu (populated by 
leftMenuList), and a special list (populated by oPoolItems). 

The main table looks like this (i'm not sending complete xhtml listings for all 
6 files yet):

  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 

The other lists are rendered in the same way.

The link navigates to a new detail page, with the same template.

The bean looks like this:

  | @Name("mainBean")
  | @Scope(ScopeType.SESSION)
  | public class MainBean extends AbstractSeamBean {
  | 
  | /* REMOVED: Import of referenced beans */
  | 
  | /**
  |  * This list contains the select list items.
  |  */
  | @DataModel
  | private List selectedListItems = new 
ArrayList();
  | 
  | /**
  |  * This is the current content of the main content area.
  |  */
  | @Out(required = false)
  | private ContentListItem currentMainObject = new ContentListItem(0, new 
MooxMock("Nothing"));
  | 
  | public boolean isCurrentList() {
  | return (null != currentMainObject && 
currentMainObject.getLocalItem() instanceof MooxList);
  | }
  | 
  | 
  | /**
  |  * This is the data model for the left menu.
  |  */
  | @DataModel
  | private List leftMenuList;
  | 
  | @DataModelSelection("leftMenuList")
  | private ContentListItem selectedLeftMenItem;
  | 
  | @Factory("leftMenuList")
  | public void loadMenu() {
  | /* REMOVED: "leftMenuList" initialization */
  | }
  | 
  | public String selectLeftMenuItem() {
  | return setCurrentObject(selectedLeftMenItem);
  | }
  | 
  | 
  | /**
  |  * This is the data model for the list view.
  |  */
  | @DataModel
  | @SuppressWarnings({"MismatchedQueryAndUpdateOfCollection"})
  | private List mainListItems = new 
ArrayList();
  | 
  | @DataModelSelection("mainListItems")
  | private ContentListItem selectedListItem;
  | 
  | @Factory("mainListItems")
  | public void updateListItems() {
  | /* REMOVED: "mainListItems" initialization */
  | }
  | 
  | /**
  |  * Action method used when selecting a list view item.
  |  *
  |  * @return Navigation.
  |  */
  | public String selectListItem() {
  | return setCurrentObject(selectedListItem);
  | }
  | 
  | /**
  |  * Sets a list item as the new object for the main area.
  |  *
  |  * @param newObject The new object to show in main area.
  |  * @return Navigation.
  |  */
  | public String setCurrentObject(ContentListItem newObject) {
  | log.debug("** MainBean - setCurrentObject: #0", currentMainObject);
  | 
  | currentMainObject = newObject;
  | updateListItems();
  | 
  | return (isCurrentList() ? "listSelected" : "objectSelected");
  | }
  | 
  | 
  | /**
  |  * O-pool.
  |  */
  | @DataModel
  | private List oPoolItems;
  | 
  | @DataModelSelection("oPoolItems")
  | private ContentListItem selectedOpoolItem;
  | 
  | @Factory("oPoolItems")
  | public void updateOPoolItems() {
  | /* REMOVED: "oPoolItems" initialization */
  | }
  | 
  | /**
  |  * Action method used when selecting an O-pool item.
  |  *
  |  * @return Navigation.
  |  */
  | public String selectOpoolItem() {
  | return setCurrentObject(selectedOpoolItem);
  | }
  | 
  | }
  | 

There are no stack traces or errors. 

We're using 
  Seam 1.1.6, MyFaces 1.1.5, Facelets 1.1.12, Ajax4JSF 1.0.6.

/Per

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4020670#4020670

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4020670
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - DataModelSelection property not set after using the back but

2007-02-21 Thread pnorman4
Hi,

I have a navigation problem in my Seam app. 

A have a standard h:dataTable with links (s:link) to a "detail view" (much like 
the hotel booking demo). To find out what row was clicked, I use 
@DataModelSelection. 

xhtml:


mainBean (ScopeType.SESSION):

  | @DataModelSelection("mainListItems")
  | private ContentListItem selectedListItem;
  | 
  | public String selectListItem() {
  | return setCurrentObject(selectedListItem);
  | }
  | 

The first time a click the link, the annotated property selectedListItem is 
set, my selectListItem action method is called and the detail view is shown 
correctly.

If I then use the back button, the list is shown again. But if I then click 
another row in the list, the selectedListItem property is not updated and the 
old detail view will be shown again!

The scenario is the same independent of if I'm in a conversation or not.

If I refresh the list screen after using the back button, the links works 
properly!

Am I doing something wrong? I can't find anything in the documentation about 
special configuration that's neede to get back button to work.

/Per

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019837#4019837

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019837
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Null Value in s:link w/IceFaces

2007-02-21 Thread pnorman4
Thanks! 

It's good to know why it didn't work. The workaround solved it. 

Per

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019756#4019756

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019756
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JBoss Seam] - Re: Null Value in s:link w/IceFaces

2007-02-20 Thread pnorman4
I have the same problem. I've been trying several different repeater and 
datatable components from both Tomahawk, Trinidad and Facelets with the same 
result. The standard h:commandLink works fine, but an identical s:link always 
send null as parameter value.

Whats wrong?

I m using Seam 1.1.6,
Myfaces 1.1.4,
Facelets 1.1.12,
Ajax4JSF 1.0.6,
Trinidad incubator-m1-SNAPSHOT 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019371#4019371

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019371
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user