Re: is i18n messages suppose to be html escaped?
thanks, but I posted 2 strings, one was escaped while the other was not. Shouldn't it at least consistently escape or not escape? On Wed, Oct 19, 2011 at 4:11 PM, Kito Mann kito.m...@virtua.com wrote: Ted, The strings will only be escaped if the component you're using escapes the text. If you're just embedding the expression in the page, it's not going to be escaped, but you can use h:outputText -- this allows you to control whether or not you want the text escaped. --- Kito D. Mann | twitter: kito99 | Author, JSF in Action Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info | twitter: jsfcentral +1 203-404-4848 x3 * Listen to the latest headlines in the JSF and Java EE newscast: http://blogs.jsfcentral.com/roller/editorsdesk/category/JSF+and+Java+EE+Newscast * Keep up with the aftermath of the Oracle/Sun merger: http://www.mergerspeak.com On Tue, Oct 18, 2011 at 11:36 PM, Ted r6squee...@gmail.com wrote: I'm using string tables and to i18n some messages using jsf and I've got some unexpected behavior if I have a string table string1=boldasdf/bold string2=my cow is brown if I then go on to a jsf page and do #{msg.string1} #{msg.string2} the result I get is lt;boldgt;asdflt;/boldgt; my cow is brown My expectation is that the quote should have been converted to quot; shouldn't it? (either that or at least the 's should not have been escaped...) anyone know anything about this? -- Ted. -- Ted.
Re: is i18n messages suppose to be html escaped?
oh and in addition to the inconsistency between the 2 example strings, I just checked, to the best of my knowledge #{msg.foo} is a short cut for outputText tag, The outputText tag, according to the jsf javadocs, says it is true by default. So, if that's true, shouldn't be escaped to quot; by default? or are special for some reason? On Wed, Oct 19, 2011 at 8:02 PM, Ted r6squee...@gmail.com wrote: thanks, but I posted 2 strings, one was escaped while the other was not. Shouldn't it at least consistently escape or not escape? On Wed, Oct 19, 2011 at 4:11 PM, Kito Mann kito.m...@virtua.com wrote: Ted, The strings will only be escaped if the component you're using escapes the text. If you're just embedding the expression in the page, it's not going to be escaped, but you can use h:outputText -- this allows you to control whether or not you want the text escaped. --- Kito D. Mann | twitter: kito99 | Author, JSF in Action Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info | twitter: jsfcentral +1 203-404-4848 x3 * Listen to the latest headlines in the JSF and Java EE newscast: http://blogs.jsfcentral.com/roller/editorsdesk/category/JSF+and+Java+EE+Newscast * Keep up with the aftermath of the Oracle/Sun merger: http://www.mergerspeak.com On Tue, Oct 18, 2011 at 11:36 PM, Ted r6squee...@gmail.com wrote: I'm using string tables and to i18n some messages using jsf and I've got some unexpected behavior if I have a string table string1=boldasdf/bold string2=my cow is brown if I then go on to a jsf page and do #{msg.string1} #{msg.string2} the result I get is lt;boldgt;asdflt;/boldgt; my cow is brown My expectation is that the quote should have been converted to quot; shouldn't it? (either that or at least the 's should not have been escaped...) anyone know anything about this? -- Ted. -- Ted. -- Ted.
RE: My Faces Tunning
Mark, Can you tell me what application server you are using? Are you using any session replication and if so what kind? What OS are you using? Are you using Session Affinity? What JSF implementation are you using? We are using myFaces 1.1.7 and Tomahawk 1.1.5 (old and not able to upgrade at this point). Thanks -Original Message- From: Mark Struberg [mailto:strub...@yahoo.de] Sent: Tuesday, October 18, 2011 4:58 PM To: MyFaces Discussion Subject: Re: My Faces Tunning +1 mem is barely a problem these days. Actually we are serving 60.000++ users per day without any mem problems (w 100 views/session ServerSide-StateSaving). We need some low GB mem on our 48GB RAM server... Even if you have 1MB of session mem per user then you can serve tons of users. LieGrue, strub From: Tobias Eisentrager teisentrae...@googlemail.com To: MyFaces Discussion users@myfaces.apache.org Sent: Tuesday, October 18, 2011 10:46 PM Subject: Re: My Faces Tunning David, Usually memory is the problem - but sometimes there are also CPU problems - you can run WebSphere for example on the Mainframe. Compared to a Linux Box CPU time can be expensive there. Are you running on a 64 bit Architecture? Memory is not that expensive these days ;-) What is you total memory usage? Toby On Tue, Oct 18, 2011 at 10:42 PM, Boyd, David (Corporate) david.b...@adesa.com wrote: Scott, With your comment below but do you feel is a more realistic targeted size for session size with JSF? All, Based on some of the comments, is this not an issue for others that make use of this Technology or did we basically implement it incorrectly - from the way the .jsp are created to how we are managing the backing beans? -Original Message- From: Scott O'Bryan [mailto:darkar...@gmail.com] Sent: Monday, October 17, 2011 4:58 PM To: users@myfaces.apache.org Subject: Re: My Faces Tunning Wow.. Looks like you've done a lot, but I personally think 5K is unrealistic. Your right. Essentially JSF stores your component tree in memory. You MAY be able to enable client-side state saving which should free you up some memory at the expense of storing the entire view tree on the client. Additionally, a framework like orchestra or something home grown may allow you to get rid of managed beans quicker. One other thing. I don't know how Websphere works, but I know in the case of WLS, it only serializes object when they are added to the session. While this means they may need to be added again if they are updated, it's not subject to this limitation your describing. I'm wondering if WebSphere has some settings on the replication which might get you some better results. Scott On 10/17/2011 02:16 PM, Boyd, David (Corporate) wrote: All, I am doing some investigation into how to shrink the amount of session memory our JSF application is consuming on a per user basis. We are using MyFaces 1.1.7 and Tomahawk 1.1.5 running on IBM Websphere 7.0 patch 19. (Not able to upgrade either of these items at this time) IBM's guideline is that the session size should be less then 5k - average around 2.5k in order not to impact performance of the server and session replication. We are currently using Memory to Memory but looking at moving to database as suggested by IBM. Our site was running at about 35M per user. We changed the number of view states from 100 to 10 and that dropped it down to around 4M. We have several backing beans which are currently session scope and are looking at changing them to request scope. I also found the following: http://www.econsulting.nl/images/pdf/Tuning%20JSF%20Applications-%20J-Sp ring%202008.pdf which seems to have a lot of information concerning how JSF handles certain content on the pages. This is still under investigation to make sure what is stated make sense. I have also read somewhere that regardless if the managed backing bean is session or request scope is that the view state will still have the bean and its content. So the view state size will not change. Looking for clarification on this one. The questions is are others facing the same issue in which JSF applications tend to consume a lot of memory for a given users session? What are some of the best practices to reduce this size if any or is this just the way when using JSF? Issues with session replication on IBM WebSphere when running a JSF application? What we see as a result of this is that in the event a user hops to another server, the session data is not present due to how large the data is and how long it takes to replicate. User experience issues. We had seen an issue in which it appeared that changes to the object in the session was not being updated correctly and have done some session management tuning in which we customize the
RE: My Faces Tunning
Each page is different of course, some have lots of parts where others are straight forward. We are using myFaces 1.1.7 and Tomahawk 1.1.5. Is there a way to capture how large each page is after it has been compiled and rendered? -Original Message- From: Kito Mann [mailto:kito.m...@virtua.com] Sent: Tuesday, October 18, 2011 11:31 AM To: MyFaces Discussion Subject: Re: My Faces Tunning Hello David, How large are your pages? Do you have several tabs each with nested tabs and lots of fields? Which component suite(s) are you using? --- Kito D. Mann | twitter: kito99 | Author, JSF in Action Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info | twitter: jsfcentral +1 203-404-4848 x3 * Listen to the latest headlines in the JSF and Java EE newscast: http://blogs.jsfcentral.com/roller/editorsdesk/category/JSF+and+Java+EE+ Newscast * Keep up with the aftermath of the Oracle/Sun merger: http://www.mergerspeak.com On Mon, Oct 17, 2011 at 4:16 PM, Boyd, David (Corporate) david.b...@adesa.com wrote: All, I am doing some investigation into how to shrink the amount of session memory our JSF application is consuming on a per user basis. We are using MyFaces 1.1.7 and Tomahawk 1.1.5 running on IBM Websphere 7.0 patch 19. (Not able to upgrade either of these items at this time) IBM's guideline is that the session size should be less then 5k - average around 2.5k in order not to impact performance of the server and session replication. We are currently using Memory to Memory but looking at moving to database as suggested by IBM. Our site was running at about 35M per user. We changed the number of view states from 100 to 10 and that dropped it down to around 4M. We have several backing beans which are currently session scope and are looking at changing them to request scope. I also found the following: http://www.econsulting.nl/images/pdf/Tuning%20JSF%20Applications-%20J-Sp ring%202008.pdf which seems to have a lot of information concerning how JSF handles certain content on the pages. This is still under investigation to make sure what is stated make sense. I have also read somewhere that regardless if the managed backing bean is session or request scope is that the view state will still have the bean and its content. So the view state size will not change. Looking for clarification on this one. The questions is are others facing the same issue in which JSF applications tend to consume a lot of memory for a given users session? What are some of the best practices to reduce this size if any or is this just the way when using JSF? Issues with session replication on IBM WebSphere when running a JSF application? What we see as a result of this is that in the event a user hops to another server, the session data is not present due to how large the data is and how long it takes to replicate. User experience issues. We had seen an issue in which it appeared that changes to the object in the session was not being updated correctly and have done some session management tuning in which we customize the settings so that all session attributes are written out. Looking at the .jar file it does appear that myFaces is making the call correctly when the contents of the object in the session changes. So WebSphere session listener should be picking up that change.
Re: My Faces Tunning
Hello David, One easy way to get the page size is to use a browser plugin like Firebug or HttpWatch. They'll show you all of the requests for a particular page and how large they are. Chrome and Safari have decent tools built-in. Obviously this won't work for every single page, but it'll give you an idea if you look at some of your slowest pages. --- Kito D. Mann | twitter: kito99 | Author, JSF in Action Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info | twitter: jsfcentral +1 203-404-4848 x3 * Listen to the latest headlines in the JSF and Java EE newscast: http://blogs.jsfcentral.com/roller/editorsdesk/category/JSF+and+Java+EE+Newscast * Keep up with the aftermath of the Oracle/Sun merger: http://www.mergerspeak.com On Wed, Oct 19, 2011 at 8:51 AM, Boyd, David (Corporate) david.b...@adesa.com wrote: Each page is different of course, some have lots of parts where others are straight forward. We are using myFaces 1.1.7 and Tomahawk 1.1.5. Is there a way to capture how large each page is after it has been compiled and rendered? -Original Message- From: Kito Mann [mailto:kito.m...@virtua.com] Sent: Tuesday, October 18, 2011 11:31 AM To: MyFaces Discussion Subject: Re: My Faces Tunning Hello David, How large are your pages? Do you have several tabs each with nested tabs and lots of fields? Which component suite(s) are you using? --- Kito D. Mann | twitter: kito99 | Author, JSF in Action Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info | twitter: jsfcentral +1 203-404-4848 x3 * Listen to the latest headlines in the JSF and Java EE newscast: http://blogs.jsfcentral.com/roller/editorsdesk/category/JSF+and+Java+EE+ Newscast * Keep up with the aftermath of the Oracle/Sun merger: http://www.mergerspeak.com On Mon, Oct 17, 2011 at 4:16 PM, Boyd, David (Corporate) david.b...@adesa.com wrote: All, I am doing some investigation into how to shrink the amount of session memory our JSF application is consuming on a per user basis. We are using MyFaces 1.1.7 and Tomahawk 1.1.5 running on IBM Websphere 7.0 patch 19. (Not able to upgrade either of these items at this time) IBM's guideline is that the session size should be less then 5k - average around 2.5k in order not to impact performance of the server and session replication. We are currently using Memory to Memory but looking at moving to database as suggested by IBM. Our site was running at about 35M per user. We changed the number of view states from 100 to 10 and that dropped it down to around 4M. We have several backing beans which are currently session scope and are looking at changing them to request scope. I also found the following: http://www.econsulting.nl/images/pdf/Tuning%20JSF%20Applications-%20J-Sp ring%202008.pdf which seems to have a lot of information concerning how JSF handles certain content on the pages. This is still under investigation to make sure what is stated make sense. I have also read somewhere that regardless if the managed backing bean is session or request scope is that the view state will still have the bean and its content. So the view state size will not change. Looking for clarification on this one. The questions is are others facing the same issue in which JSF applications tend to consume a lot of memory for a given users session? What are some of the best practices to reduce this size if any or is this just the way when using JSF? Issues with session replication on IBM WebSphere when running a JSF application? What we see as a result of this is that in the event a user hops to another server, the session data is not present due to how large the data is and how long it takes to replicate. User experience issues. We had seen an issue in which it appeared that changes to the object in the session was not being updated correctly and have done some session management tuning in which we customize the settings so that all session attributes are written out. Looking at the .jar file it does appear that myFaces is making the call correctly when the contents of the object in the session changes. So WebSphere session listener should be picking up that change.
Re: Do Trinidad Tables update with new rows in PartialSubmit if a CommandButton outside table does the adding of rows?
Catherine, If the table has partialTriggers pointing to the command button, it should work just fine. I would check two things: 1) is your partial trigger Id set correctly, i.e do you need to do something like stepping out of the naming container, etc.?; 2) do you see table's HTML included in partial response when you use HTTP sniffing tools like Firebug? Max On 4/26/2011 2:31 PM, Catherine Rocchio wrote: Hi there, I am trying to achieve a Partial Submit update of a Trinidad Table upon submit of a Command Button (called Add Row). The bean behind the table is definitely getting updated because when I do an overall page refresh, I see my new rows getting added - but I can't seem to get the table to refresh on its own with the partialTriggers on it. So.. I guess my question is - should something like this work? Or.. do tables need to be programmatically poked for partial submits? This seems pretty basic - but - it just isn't working for me. I guess I will feel better if I know it SHOULD work - and I will keep trying. I am using Trinidad 2 and Myfaces 2. Sorry Thanks for help! Catherine tr:commandButton text=Add partialSubmit=true id=test actionListener=#{createworkplan.addAction} / My addAction is just boring - but adds a row to a vector which is behind the table. public void addAction(ActionEvent event) { wprolelist.add(new RoleList(test person, True, True, True)); } And my table has the specification of the partialTrigger. tr:table id=workplanroleprivs rowSelection=single value=#{createworkplan.wprolelist} var=row width = 800 styleClass=order-table partialTriggers=::test headerClass=order-table-header rowClasses=order-table-odd-row,order-table-even-row
[Trinidad] Feedback for Trinidad-2144: NumberConverter format hint changes
Hi everyone, I have some suggestions for changing the numberConverter's format hint which I would like to hear your feedback on. https://issues.apache.org/jira/browse/TRINIDAD-2144 Currently the numberConverter provides a hint using the converter's pattern like this: Sample pattern: ##.##. In particular, it follows JDK DecimalFormat's convention when the pattern is locale-independent, .ie . as decimal separator and , as grouping-separator. This has the following issues which could confuse users - It does not check if the trinidad-config parameters decimal-separator, number-grouping-separator are set. http://myfaces.apache.org/trinidad/devguide/configuration.html#trinidad-config.xml - It does not substitute the locale-specific character Therefore, I suggest the following. 1. Introduce two new trinidad-config parameters for currency-decimal-separator, currency-number-grouping-separator This is because some locales have different conventions for decimal separator when inside a currency. If not set, default to decimal/grouping-separator values. 2. If no parameters set in trinidad-config, substitute the locale-specific decimal/grouping separators. 3. Use a sample number instead of presenting the pattern, e.g. Sample pattern: 12,34 instead of Sample pattern: ##.##. Does anyone have feedback on suggestions #1, 2, 3? Thank you, Yee-Wah
[ANNOUNCE] release of myfaces commons 1.0.2
The Apache MyFaces team is pleased to announce the release of Apache MyFaces Commons 1.0.2. This project contains non-renderkit-specific code that can be used with any myfaces jsf framework. MyFaces Commons 1.0.2 is available in both binary and source distributions. * http://myfaces.apache.org/commons/download.html Apache MyFaces Commons is available in the central Maven repository under Group ID org.apache.myfaces.commons. Release Notes - MyFaces Commons - Version 1.0.2 Bug * [MFCOMMONS-27] - CLONE - Its not possible to change the summary/ detail message of a ParametrizableFacesMessage * [MFCOMMONS-32] - mcv:validateCompareTo uses for attribute to identify the target component, but JSF 2.0 facelets reserves that property name for composite components * [MFCOMMONS-34] - HTML class should declare constants * [MFCOMMONS-37] - Extended ResourceHandler should be configured after all other wrappers, to be the first one when a request is processed * [MFCOMMONS-38] - Resource ending with .css is not processed for value expressions when gzip compression is enabled and cache disk is true Improvement * [MFCOMMONS-30] - Change URL management of Advanced JSF 2 ResourceHandler * [MFCOMMONS-35] - Move some utility methods from shared to commons * [MFCOMMONS-36] - MyFaces Commons ResourceHandler should allow configuration /javax.faces.resource or ResourceHandler#RESOURCE_IDENTIFIER through a web config param New Feature * [MFCOMMONS-29] - Advanced JSF 2 ResourceHandler Task * [MFCOMMONS-33] - Extended ResourceHandler implementation Enjoy! Leonardo Uribe