Re: [Stripes-users] Stripes Wiki, JIRA, and Build have moved!

2014-10-06 Thread Samuel Santos
Awesome job Rick!
Thank you for all the time and effort you put into this.

--
Samuel Santos
http://www.samaxes.com/

On Tue, Oct 7, 2014 at 12:15 AM, Rick Grashel rgras...@gmail.com wrote:

 Stripes Users,

 I wanted to send a note out to everyone on the mailing list to inform you
 that due to some issues with our hosting provider, we have moved the
 Stripes JIRA, Confluence, and Jenkins sites for Stripes.  Github has and
 will remain unchanged.  Ben has repointed the DNS and it should be updated
 for everyone in the next couple of hours.

 Stripes JIRA and Confluence are now hosted free of charge by Atlassian
 using their OnDemand cloud service with a Free Open Source license.  This
 takes us to the latest version of both JIRA and Confluence.  We have
 migrated everything the best that we can.  There is a minor issue where
 attachments on JIRA issues did not come over, but I will be trying to bring
 those over in the coming days.

 The wiki pages have had to be recreated one-by-one as the version of
 Confluence that Stripes was on is too old to provide a stable migration
 path.  As a result, we did lose the history and original author attribution
 of those pages.  If you were an author of one of those Wiki pages, I
 encourage you to sign up to the new Wiki, edit those pages, and give
 yourself credit!

 If you had a prior registered account on the old Stripes Wiki/JIRA, when
 you go to the new site and sign up using the *same* email address as
 before, it should link your old account without creating a duplicate
 account.  The Wiki/Confluence site is located at the normal URL
 (http://stripesframework.org).  There are hot links from the new Wiki to
 Stripes JIRA, Github, Jenkins, Javadoc, and IRC.  The Stripes builds have
 been moved Cloudbees who is (thankfully) providing free Jenkins build
 facilities for Stripes under their FOSS license.

 This migration has uncovered a lot of staleness in the Stripes wiki, and
 over the coming weeks, we will be working to renovate some of that.  If
 anybody is interested in making a Wiki contribution, please let me know.
 There can never be too many contributors.

 If anybody has questions, feel free to post them here or come to #stripes.

 Thanks all!

 -- Rick (RickG on IRC)



 --
 Slashdot TV.  Videos for Nerds.  Stuff that Matters.

 http://pubads.g.doubleclick.net/gampad/clk?id=160591471iu=/4140/ostg.clktrk
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
Slashdot TV.  Videos for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471iu=/4140/ostg.clktrk___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Twilio API and capitalized parameters

2013-11-06 Thread Samuel Santos
You will probably need to get them directly from the request:
request.getParameter()

--
Samuel Santos
http://www.samaxes.com/


On Wed, Nov 6, 2013 at 11:09 PM, Adam Stokar ajsto...@gmail.com wrote:

 Hi everyone,

 I'm having a binding issue using the Twilio api (SMS sending service).

 The parameters come in as shown below.  Since they start with capital
 letters, Stripes default binding mechanism is not working as it expects the
 parameters to be in camel case, i.e. accountSid.  Is there a simple
 workaround for this?  I'm assuming that the getters and setters aren't
 working because they don't map exactly to the camel case version of the
 parameters.  Thanks.

 *AccountSid* AC296de75a472e0b68fa0a85432f3ea301
 *MessageSid* SM760b2008c62485500dc44824a0a32128
 *Body* Howdy
 *FromState* PA
 *ToCity* AUSTIN
 *ToZip* 78722
 *SmsSid* SM760b2008c62485500dc44824a0a32128
 *ToState* TX
 *To* +15127828698
 *ToCountry* US
 *FromCountry* US
 *SmsMessageSid* SM760b2008c62485500dc44824a0a32128
 *ApiVersion* 2010-04-01
 *FromCity* PHILADELPHIA
 *SmsStatus* received
 *NumMedia* 0
 *From* +12158470493
 *FromZip* 19109


 --
 November Webinars for C, C++, Fortran Developers
 Accelerate application performance with scalable programming models.
 Explore
 techniques for threading, error checking, porting, and tuning. Get the most
 from the latest Intel processors and coprocessors. See abstracts and
 register
 http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231iu=/4140/ostg.clktrk___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] how to check if error collections not empty

2013-07-31 Thread Samuel Santos
Hi,

You can also check for errors using:
c:if test=${not empty actionBean.context.validationErrors}
s:errors /
/c:if
Similarly using the following code may also work for messages (not tested):
c:if test=${not empty actionBean.context.messages}
s:messages /
/c:if

--
Samuel Santos
http://www.samaxes.com/


On Wed, Jul 31, 2013 at 1:42 PM, Poitras Christian 
christian.poit...@ircm.qc.ca wrote:

  Hi,

 ** **

 There is no such function for messages. But you can do that easily in EL.*
 ***

 ** **

 For example, if you save your message like this:

 LocalizableMessage message = *new* LocalizableMessage(some_message);

 context.getMessages(“my_key”).add(message);

 ** **

 Then the EL will look like this:

 ${!empty request[‘my_key’]}

 ** **

 I think this will work even after a redirect since messages are saved in
 FlashScope.

 ** **

 Christian

 ** **

 *De :* Chris Cheshire [mailto:cheshira...@gmail.com]
 *Envoyé :* July-30-13 5:29 PM
 *À :* Stripes Users List
 *Objet :* Re: [Stripes-users] how to check if error collections not empty*
 ***

 ** **

 *facepalm* I didn't even see that and I've had the JDoc open for the last
 couple of days.

 What about for the messages collection? I don't see anything analogous to
 it there.

 Chris

 ** **

 On Tue, Jul 30, 2013 at 2:41 PM, Freddy Daoud xf2...@fastmail.fm wrote:*
 ***

 Hi Chris,

 Perhaps use the hasErrors() JSP function from the Stripes taglib?


 http://stripes.sourceforge.net/docs/current/taglib/stripes/hasErrors.fn.html

 Hope that helps,
 Freddy


 On Tue, Jul 30, 2013, at 02:36 PM, Chris Cheshire wrote:

 In my JSP page, how do I check if the errors for a field that are
 rendered by the stripes:errors tag is not empty?

 In some places I need to display them under the field and use a line
 break before them, and in some places I need to display them next to
 the field without the line break. Due to this I can't use the
 stripes.fieldErrors.X properties because it affects everything.

 What I need to do is conditionally insert the line breaks in the places
 where it is appropriate. I am assuming they are hidden as a request
 attribute, but what is the key for them? What about the collection that
 stripes:messages renders?

 Thanks
 Chris

 ---
 ---

 Get your SQL database under version control now!

 Version control is standard for application code, but databases havent

 caught up. So what steps can you take to put your SQL databases under

 version control? Why should you start doing it? Read more to find out.

 [1]http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg
 .clktrk

 ___

 Stripes-users mailing list

 [2]Stripes-users@lists.sourceforge.net

 [3]https://lists.sourceforge.net/lists/listinfo/stripes-users

 References

 1.
 http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk
 2. mailto:Stripes-users@lists.sourceforge.net
 3. https://lists.sourceforge.net/lists/listinfo/stripes-users


 --
 Get your SQL database under version control now!
 Version control is standard for application code, but databases havent
 caught up. So what steps can you take to put your SQL databases under
 version control? Why should you start doing it? Read more to find out.
 http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

 ** **


 --
 Get your SQL database under version control now!
 Version control is standard for application code, but databases havent
 caught up. So what steps can you take to put your SQL databases under
 version control? Why should you start doing it? Read more to find out.
 http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.
http://pubads.g.doubleclick.net/gampad/clk?id=49501711iu=/4140/ostg.clktrk___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Page refresh on second page

2013-02-25 Thread Samuel Santos
Hi Venkat,

You should use the Redirect-After-Post pattern, basically in your
myactionbean.register() to a redirect to myactionbean.done() (or
myactionbean.view()) which forwards to your JSP page.

To prevent double-click use JavaScript:
document.getElementById('buttonId').onclick = function(event) {
event.preventDefault();
this.disabled = true;
this.form.submit();
};

Best,

--
Samuel Santos
http://www.samaxes.com/


On Mon, Feb 25, 2013 at 11:42 PM, Venkat Ravuri ravuri.ven...@gmail.comwrote:

 I have a question regarding page refresh. I have a jsp page ( some
 registration page) which goes to  myactionbean.view(), when user submits it
 goes to myactionbean.register() and then finally on to results jsp page(
 done).

 When I hit browser refresh on results jsp page, my action bean is getting
 invoked again myactionbean.register() even though I have DefaultHandler
 annotation. I want the browser refresh to go back to myactionbean.view().
 How do I do that?.

 Only thing that shows up on my browser windows is /register always ( for
 all the methods).

 Also is there any way to avoid form re-submit when users clicks submit
 button twice?.

 Thanks,
 Venkat


 --
 Everyone hates slow websites. So do we.
 Make your web apps faster with AppDynamics
 Download AppDynamics Lite for free today:
 http://p.sf.net/sfu/appdyn_d2d_feb
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Stripes and Angular.js

2013-02-19 Thread Samuel Santos
In our case, we have gone even further, we have completely removed Stripes
from AngularJS apps.
We have found to be easier to just go with plain JAX-RS services on the
server (in our case RESTEasy in JBoss AS).
I've also posted an article about how you can use Bean Validation with
JAX-RS at 
samaxes.comhttp://www.samaxes.com/2013/01/beanvalidation-with-jaxrs-in-javaee6/for
server input validations.

Best,

--
Samuel Santos
http://www.samaxes.com/


On Tue, Feb 19, 2013 at 5:08 PM, Marcus Kraßmann m...@syn-online.de wrote:

  Am 19.02.2013 15:55, schrieb gshegosh:

 Let me ressurect this thread for a bit longer :-)
 Has any one of you successfully (or not) done some work with AngularJS
 together with Stripes? I'm especially interested in pairing Stripes
 validation with AngularJS' one and servicing form submissions (the
 source page attribute, etc.) -- maybe someone has already cleared the
 path and wouldn't mind sharing solutions?


 Here a short report about my first AngularJS experiences. Although I did
 not try to pair validation of Stripes and Angular, I'll write it down.
 Maybe it will bring back life into the discussion ;-)

 At the beginning of 2013, I decided to use AngularJS within an existing
 Stripes application for a customizable calendar management solution. The
 application allows customers to order special articles from different
 locations for a selectable date. For date selection the jQuery UI
 Datepicker is used. The new calendar management page should allow
 exceptions from the general rule Order allowed from Monday till Friday.

 At fist I just build the JavaScript model for the calendar. Then I use a
 separate async http request for getting all existing exceptional dates from
 the backend. After putting them into the calendar controller, it
 magically renders itself the way I want it to do. By clicking calendar
 items, the state of these dates is inverted with every click. In the end,
 when the user clicks submit, another async request is sent to Stripes
 with the new exceptional date list. The incoming JSON is validated by
 Stripes.

 IMHO AngularJS is a brilliant JS framework. As it already has built-in
 templating, I tend to go away from JSP tags and to use Angular's own way of
 doing templating. Stripes' remaining responsibility reduces more and more
 to...

- input validation
- calling of backend services
- delivery of html snippets for Angular's routing functionality
- security checks

 As AngularJS' $resource service allows accessing RESTful services, I fear
 that I will more and more move away from Stripes itself the more I learn
 about Angular and frameworks like Jersey. But it was again nice to see that
 Stripes was no showstopper when I started experiments with AngularJS -
 together with the stripes-dynattr.tld I had no trouble at all.

 Kind regards,
 Marcus



 --
 Everyone hates slow websites. So do we.
 Make your web apps faster with AppDynamics
 Download AppDynamics Lite for free today:
 http://p.sf.net/sfu/appdyn_d2d_feb
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Validation question

2012-08-15 Thread Samuel Santos
Hi Aaron,

As you say, you'll have to remove the @Validate annotation and validate all
three in the validation method.
Stripes executes validations in a very specific order -
http://www.stripesframework.org/display/stripes/Validation+Reference#ValidationReference-ValidationProcessingFlowand
will not execute any further validations until all the
@Validate(required=true) are passing.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Wed, Aug 15, 2012 at 6:05 AM, Iwao AVE! haraw...@gmail.com wrote:

 Hi,

 when = ValidationState.ALWAYS should work as you expect.
 Is your validation method public?

 Regards,
 Iwao

 2012/8/15 Aaron Stromas passog...@gmail.com:

  Hello,
 
  I have three attributes that I'm validating. One of them is annotated
 with
  @Validate whereas the other two are validated in the method annotated
 with
  @ValidationMethod. All three mus be provided value, however, if I don't
  enter the value, only the attribute which is annotated is validated and
 it
  seems that the validation method does not get a chance to execute.
  I would like to have all three validated before errors are reported.
  The validation method has the when=ValidationState.ALWAYS. I even tried
 the
  set the Stripes filter parameter ValidationInvokeWhenErrorsExist to true
 to
  no avail.
  I have a feeling that I would have to remove the @Validate annotation and
  validate all three in the validation method. Is that true or can I
 somehow
  combine both and have them all execute?
  Thanks,
 
  --
  Aaron Stromas


 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Create a session-less page

2012-07-09 Thread Samuel Santos
Hi Joe,

It's the application server that creates automatically a session on the
first request, not Stripes.
You should look at your application server documentation to check if an
option for disabling this is available.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Mon, Jul 9, 2012 at 9:58 PM, Joe Adams joe.ad...@vividseats.com wrote:

  I was asked to create a page on our site that does not create a session
 when people visit it.  Is there any setting that I can use in Stripes to
 make an Action and JSP that can be called with no session being created?

 Thanks,
 Joe


 --
 Live Security Virtual Conference
 Exclusive live event will cover all the ways today's security and
 threat landscape has changed and how IT managers can respond. Discussions
 will include endpoint security, mobile security and the latest in malware
 threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Page Scope - Implementation

2012-04-11 Thread Samuel Santos
Hi Chut,

If the goal is to mimic ASP.NET VIEWSTATE why not just call it @ViewState?
Sorry if I'm missing something.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Thu, Apr 12, 2012 at 4:08 AM, Chut Yee yeec...@gmail.com wrote:

 Here it is. I think the name BrowserScope is better. What do you think?

 --
 package org.stripesstuff.plugin.pagescope;

 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;

 /**
  * For annotating fields in ActionBean for persisting to the web browser.
  *
  * @see PageScopeInterceptor
  *
  * @author y...@eutama.com
  *
  */
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.FIELD)
 public @interface PageScope {
 }


 --
 package org.stripesstuff.plugin.pagescope;

 import java.lang.reflect.Field;
 import java.util.HashMap;

 import org.apache.log4j.Logger;

 import net.sourceforge.stripes.action.Resolution;
 import net.sourceforge.stripes.controller.ExecutionContext;
 import net.sourceforge.stripes.controller.Interceptor;
 import net.sourceforge.stripes.controller.Intercepts;
 import net.sourceforge.stripes.controller.LifecycleStage;
 import net.sourceforge.stripes.util.Base64;
 import net.sourceforge.stripes.util.CryptoUtil;

 /**
  * Persisting actionbean fields to the web browser:
  * ul
  * liAfter LifecycleStage.ActioBeanResolution - fields annotated with
  * {@link PageScope} will be restored from the _pageScope parameter/li
  * liAfter LifecycleStage.EventHandling - fields annotated with
  * {@link PageScope} will be serialized into a request attribute named
  * _pageScope/li
  * liJSP: adds a hidden field ltinput type=hidden name=_pageScope
  * value=${_pageScope} /gt to form/li
  * ul
  * br/
  *
  * @author y...@eutama.com
  *
  */
 @Intercepts({LifecycleStage.ActionBeanResolution,
LifecycleStage.EventHandling})
 public class PageScopeInterceptor implements Interceptor
 {
private static final String PAGE_SCOPE_KEY = _pageScope;

private static final Logger logger = Logger
.getLogger(PageScopeInterceptor.class);

public Resolution intercept(ExecutionContext context) throws
 Exception
{
Resolution resolution = context.proceed();

// Restores annotated fields from _pageScope parameter
if (LifecycleStage.ActionBeanResolution.equals(context
.getLifecycleStage())) {
bindPageScopeFields(context);
}

// serialise annotated fields into _pageScope parameter
if
 (LifecycleStage.EventHandling.equals(context.getLifecycleStage())) {
serializePageScopeFields(context);
}

return resolution;
}

private void serializePageScopeFields(ExecutionContext context)
throws IllegalAccessException
{
HashMapString, Object map = new HashMapString,
 Object(5);
collectPageScopeFields(context.getActionBean(), map);

if (map.size()  0) {
String pageScopeStr =
 CryptoUtil.encrypt(Base64.encodeObject(map));
logger.debug(pagescope length: +
 pageScopeStr.length());

context.getActionBeanContext().getRequest()
.setAttribute(PAGE_SCOPE_KEY,
 pageScopeStr);
}
}

private void collectPageScopeFields(Object actionBean,
HashMapString, Object map) throws
 IllegalAccessException
{
Class? clazz = actionBean.getClass();
while (clazz != null) {
for (Field field : clazz.getDeclaredFields()) {
// add field with PageScope annotation to
 map
if (field.getAnnotation(PageScope.class) !=
 null) {
field.setAccessible(true);
if (field.get(actionBean) != null)
map.put(field.getName(),
 field.get(actionBean));
}
}
clazz = clazz.getSuperclass();
}
}

private void bindPageScopeFields(ExecutionContext context)
throws IllegalAccessException
{
String pageScopeStr =
 context.getActionBeanContext().getRequest()
.getParameter(PAGE_SCOPE_KEY);

if (pageScopeStr == null)
return;

pageScopeStr = CryptoUtil.decrypt(pageScopeStr);

@SuppressWarnings(unchecked

Re: [Stripes-users] Page Scope - Implementation

2012-04-11 Thread Samuel Santos
Hi Chut,

By giving a quick look at your code, I see that you are encrypting all your
annotated fields and keeping them in a hidden input between pages.
So what about @FormState or @FieldState or @ActionBeanState? :)

Just out of curiosity, why don't you just keep your data in the session or
in a cache store on the server?

Best,

--
Samuel Santos
http://www.samaxes.com/


On Thu, Apr 12, 2012 at 4:45 AM, Chut Yee yeec...@gmail.com wrote:

 Samuel Santos samaxes@... writes:

 
 
  Hi Chut,If the goal is to mimic ASP.NET VIEWSTATE why not just call it
  at
 ViewState?Sorry if I'm missing something.Cheers,--Samuel
 Santoshttp://www.samaxes.com/

 Apart from the idea of persisting data to the web browser, there is nothing
 similar between VIEWSTATE and PageScope. ASP.NET is a completely
 different beast
 compared to JSP.

 Cheers,
 Chut



 --
 For Developers, A Lot Can Happen In A Second.
 Boundary is the first to Know...and Tell You.
 Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
 http://p.sf.net/sfu/Boundary-d2dvs2
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Proposal: Page Scope

2012-04-08 Thread Samuel Santos
Hi all,

I find that the name @PageScope can be easily confused with JSP
pageScope[1], which is very different from what we are trying to do here.
Can you think of a better name for this?

[1] http://docs.oracle.com/javaee/5/tutorial/doc/bnahq.html#bnaij

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Sun, Apr 8, 2012 at 4:18 PM, Chut Yee yeec...@gmail.com wrote:

 Thanks Will Hartung for providing some some very sensible ideas. I think
 something like this should work:

 (1) Add an annotation org.stripestuff.pagescope.PageScope

 (2) Page Rendering - interceptor at After EventHandling.
 - Collects the fields annotated with @PageScope into a Map.
 - Serialize the Map, encrypt it, and adds it to a Request attribute
 _pageScope.

 (3) The JSP page. Adds a hidden field:
  stripes:form .
stripes:hidden name=_pageScope value=${_pageScope}
  /stripes:form

 (4) Form postback - interceptor at Before BindingAndValidation
 - decrypt _pageScope, and marshal the serialized map.
 - Loop through the @PageScope annoted variable in action bean, and try to
 locate
 an object in the Map.


 Any comments?

 My work schedule mandates I can only squeeze time during weekends - and I
 am
 going away for the next 3 weekends! Anybody like to volunteer?

 Best regards,
 Chut



 --
 For Developers, A Lot Can Happen In A Second.
 Boundary is the first to Know...and Tell You.
 Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
 http://p.sf.net/sfu/Boundary-d2dvs2
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] auto

2012-03-09 Thread Samuel Santos
Hi all,

Write once run anywhere ain't happening yet in the GUI world...

I disagree.

We have been using Media Queries, part of the so called Responsive
Design, and have been quite successful with it.
There is no GUI generated magically, just plain normal CSS at work.

http://mediaqueri.es/ has some great examples of sites using it.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


2012/3/9 VANKEISBELCK Remi r...@rvkb.com

 Yeah they've been busy apparently ! Last time I checked it wasn't that
 advanced.

 Nope I haven't really used that myself, I only took it for a spin quite a
 while ago, just to have a look...
 They don't seem to integrate with the Stripes taglib. One could write the
 necessary adaptors : metawidget is all about this, it basically grabs the
 more metadata it can from your environment (domain models etc) and spits
 out GUIs magically for the target platform.

 I remember concluding it was a very interesting project but too complex
 for what I need everyday. I mean, generating GUIs is a graal many have
 tried to find, but in my own experience it's impossible to abstract a User
 Interface completely : you will definitly need to put your hands in the
 dirt eventually. There's no practical meta model for describing User
 Interfaces as far as I know.
 And anyways I'm always (even morethat usually) skeptical when something
 has the word meta in it :)

 Still, these tools can help a lot in terative development, they allow to
 build faster on top of something solid. The only drawnback is when the
 framework gets into your way and makes it harder to do what you want.

 Metawidget is probably heavy stuff if you only target Stripes. It would
 shine in a multi-platform environment where you need GUIs that run in
 Swing, in a webapp etc. But this type of approach, as far as I know, has
 always failed as well...

 Write once run anywhere ain't happening yet in the GUI world...

 Cheers

 Remi



 2012/3/9 Grzegorz Krugły g...@karko.net

 Wow, this metawidget stuff looks really nice. Remi, do you have any
 experience using it together with Stripes?

 W dniu 09.03.2012 10:17, VANKEISBELCK Remi pisze:
  Hi Joaquin,
 
  What exactly are you thinking about ?
  Widget-only tools like http://metawidget.org/ or a full stack a la
 rails ?



 --
 Virtualization  Cloud Management Using Capacity Planning
 Cloud computing makes use of virtualization - but cloud computing
 also focuses on allowing computing to be delivered as a service.
 http://www.accelacomm.com/jaw/sfnl/114/51521223/
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users




 --
 Virtualization  Cloud Management Using Capacity Planning
 Cloud computing makes use of virtualization - but cloud computing
 also focuses on allowing computing to be delivered as a service.
 http://www.accelacomm.com/jaw/sfnl/114/51521223/
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] auto

2012-03-09 Thread Samuel Santos
Hi Joaquim,

Stripes does not have such thing.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Fri, Mar 9, 2012 at 2:49 PM, Joaquin Valdez joaquinfval...@gmail.comwrote:

 Hi Remi!

 I was thinking more along the lines of a full stack thing that worked with
 Stripes.

 Joaquin



 On Mar 9, 2012, at 1:17 AM, VANKEISBELCK Remi wrote:

 Hi Joaquin,

 What exactly are you thinking about ?
 Widget-only tools like http://metawidget.org/ or a full stack a la rails ?

 Cheers

 Remi


 2012/3/9 Joaquin Valdez joaquinfval...@gmail.com

 UI generation?  Is there such a thing for Stripes?

  Joaquin Valdez
 joaquinfval...@gmail.com





 --
 Virtualization  Cloud Management Using Capacity Planning
 Cloud computing makes use of virtualization - but cloud computing
 also focuses on allowing computing to be delivered as a service.
 http://www.accelacomm.com/jaw/sfnl/114/51521223/
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users



 --
 Virtualization  Cloud Management Using Capacity Planning
 Cloud computing makes use of virtualization - but cloud computing
 also focuses on allowing computing to be delivered as a service.

 http://www.accelacomm.com/jaw/sfnl/114/51521223/___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


  Joaquin Valdez
 joaquinfval...@gmail.com
 541-690-8593





 --
 Virtualization  Cloud Management Using Capacity Planning
 Cloud computing makes use of virtualization - but cloud computing
 also focuses on allowing computing to be delivered as a service.
 http://www.accelacomm.com/jaw/sfnl/114/51521223/
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] New CDI Extension brewing...

2012-02-06 Thread Samuel Santos
Hi Nick,

You can use Stripes Injection Enricher which supports @EJB, @Inject (CDI)
and @Resource standard Java EE annotations:
http://www.stripesframework.org/display/stripes/Stripes+Injection+Enricher

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Mon, Feb 6, 2012 at 4:29 PM, Nick Stuart nick.stu...@bit-theory.comwrote:

 Hey all, old user of Stripes (been about a year since I've used it
 actively) here and just wanted to let you all know I'm trying out a way to
 get Stripes and CDI/EE6 integration going. So far results are promising,
 and I'm hoping for minimal changes needed to Stripes itself to get the
 nicest possible integration between the two. I've got a github project
 setup if anyone is interested: https://github.com/nstuart/stripes-cdi

 Beware, this is the result of two days of hacking, so it's very sparse at
 the moment, but, even with that it still is working at the basic level of
 interaction. (and no real test cases yet!)

 I'll update the stripes wiki itself at some point if I get to the point
 where I feel comfortable with the working level of the code, but it's not
 there yet. I mainly wanted throw this out there to see if anyone else has
 considered this route yet and taken a look at possible issues and/or
 complications with it. Right now, my big issues is how to cleanly handle
 the Proxies CDI/Weld are returning for when Stripes tries to do some
 inspection on them, and this is where I think I might need to tweak some
 internal code a bit.

 Let me know what you think!
 -Nick


 --
 Try before you buy = See our experts in action!
 The most comprehensive online learning library for Microsoft developers
 is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
 Metro Style Apps, more. Free future releases when you subscribe now!
 http://p.sf.net/sfu/learndevnow-dev2
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] actiona name without .action suffix

2012-01-13 Thread Samuel Santos
It is possible using clean URLs.

See slide #16 at
http://www.slideshare.net/samaxes/java-web-development-with-stripes.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Fri, Jan 13, 2012 at 9:26 AM, ted_smith2...@comcast.net wrote:

 I am using freemarker

servlet-mapping
 servlet-nameFreemarker/servlet-name
 url-pattern*.ftl/url-pattern
 /servlet-mapping

 in order to do this, I have to put .action
 servlet-mapping
 servlet-nameStripesDispatcher/servlet-name
 url-pattern*.action/url-pattern
 /servlet-mapping

 without explicit suffix, if I just use url-pattern*/url-pattern
 *.ftl are also sent to the dispatchers instead of freemarker servlet.

 Is there any way to work around this so that I can use url like
 http://host/context/createuser   instead of
 http://host/context/createuser.action

 Thanks



 --
 RSA(R) Conference 2012
 Mar 27 - Feb 2
 Save $400 by Jan. 27
 Register now!
 http://p.sf.net/sfu/rsa-sfdev2dev2
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
RSA(R) Conference 2012
Mar 27 - Feb 2
Save $400 by Jan. 27
Register now!
http://p.sf.net/sfu/rsa-sfdev2dev2___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] File inputs with the new multiple attribute

2012-01-12 Thread Samuel Santos
Does it also work with an array (does not need an index)?

In the ActionBean:
   @Validate
   public FileBean[] files;

In the JSP:
stripes-dynamic:file id=files name=files[] multiple=multiple/

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Thu, Jan 12, 2012 at 7:57 PM, Mike McNally emmecin...@gmail.com wrote:

 whoa that's awesome ... I'll def. give that a try.

 Thanks!!!

 On Thu, Jan 12, 2012 at 1:19 PM, Poitras Christian
 christian.poit...@ircm.qc.ca wrote:
  Hi,
 
  I've managed to create a workarounf for this a while ago.
  I thought about adding it to StripesStuff project, but it would be
 better if it was in Stripes itself.
  I think it would be easy to change it so that we won't need to add a
 [0] at the end of the name element.
 
  In the ActionBean:
 @Validate
 public ListFileBean files;
 
  In the JSP:
  stripes-dynamic:file id=files name=files[0] multiple=multiple/
 
  You need a new
 net.sourceforge.stripes.controller.multipart.CommonsMultipartWrapper.
 @SuppressWarnings(unchecked)
 public void build(HttpServletRequest request, File tempDir, long
 maxPostSize)
 throws IOException, FileUploadLimitExceededException {
 String charset;
 MapString,FileItem files = new HashMapString,FileItem();
 MapString,String[] parameters = new HashMapString, String[]();
 
 try {
 charset = request.getCharacterEncoding();
 DiskFileItemFactory factory = new DiskFileItemFactory();
 factory.setRepository(tempDir);
 ServletFileUpload upload = new ServletFileUpload(factory);
 upload.setSizeMax(maxPostSize);
 
 ListFileItem items = upload.parseRequest(request);
 MapString,ListString params = new HashMapString,
 ListString();
 
 for (FileItem item : items) {
 // If it's a form field, add the string value to the list
 if (item.isFormField()) {
 ListString values = params.get(item.getFieldName());
 if (values == null) {
 values = new ArrayListString();
 params.put(item.getFieldName(), values);
 }
 values.add(charset == null ? item.getString() :
 item.getString(charset));
 }
 // Else store the file param
 else {
 processFile(item, files);
 }
 }
 
 // Now convert them down into the usual map of
 String-String[]
 for (Map.EntryString,ListString entry :
 params.entrySet()) {
 ListString values = entry.getValue();
 parameters.put(entry.getKey(), values.toArray(new
 String[values.size()]));
 }
 }
 catch (FileUploadBase.SizeLimitExceededException slee) {
 throw new FileUploadLimitExceededException(maxPostSize,
 slee.getActualSize());
 }
 catch (FileUploadException fue) {
 IOException ioe = new IOException(Could not parse and cache
 file upload data.);
 ioe.initCause(fue);
 throw ioe;
 }
 
 try {
 Field charsetField =
 net.sourceforge.stripes.controller.multipart.CommonsMultipartWrapper.class.getDeclaredField(charset);
 if (!charsetField.isAccessible()) {
 charsetField.setAccessible(true);
 }
 charsetField.set(this, charset);
 Field filesField =
 net.sourceforge.stripes.controller.multipart.CommonsMultipartWrapper.class.getDeclaredField(files);
 if (!filesField.isAccessible()) {
 filesField.setAccessible(true);
 }
 filesField.set(this, files);
 Field parametersField =
 net.sourceforge.stripes.controller.multipart.CommonsMultipartWrapper.class.getDeclaredField(parameters);
 if (!parametersField.isAccessible()) {
 parametersField.setAccessible(true);
 }
 parametersField.set(this, parameters);
 } catch (NoSuchFieldException e) {
 throw new RuntimeException(Could not set fields in super
 class, e);
 } catch (IllegalAccessException e) {
 throw new RuntimeException(Could not set fields in super
 class, e);
 }
 }
 private void processFile(FileItem item, MapString,FileItem files) {
 if (item.getFieldName().endsWith([0])
  files.containsKey(item.getFieldName())) {
 String baseName = item.getFieldName().substring(0,
 item.getFieldName().length() - 3);
 int index = 0;
 while (files.containsKey(baseName + [ + index + ])) {
 index++;
 }
 log.trace(renaming file parameter  + item.getFieldName() +
  to  + baseName + [ + index + ]);
 files.put(baseName + [ + index + ], item);
 } else {
 files.put

Re: [Stripes-users] Stripes state management probelm

2011-12-17 Thread Samuel Santos
Hi Ravi,

That page is a bit outdated and does need an update.

You should not use the flash scope attributes to build your page...
Instead, when submitting your form, do a redirect-after-post to one of your
actionbeans (you can pass the record id as a querystring parameter), and
get your inserted record normally from the DB:

// Runs before binding and validation are executed
@Before(stages = LifecycleStage.BindingAndValidation)
public void doPreValidationStuff() {
// get the inserted record here...
}

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Sat, Dec 17, 2011 at 6:14 AM, Ravi amlani 6789.ravi.aml...@gmail.comwrote:

 Hi all,

 Currently I'm facing a problem of state management. After submitting my
 form(to add record) , I forward my request to another jsp from the action
 bean. So on refresh same event (add record) is called and it re-submits my
 form.
 Then I've gone though
 http://www.stripesframework.org/display/stripes/State+Management .

 This link suggests me to use FlashScope. But my problem is that in my page
 I'm using session attributes and request parameters.  So if I use
 FlashScope it works fine but only first time. Once the page loads and as I
 refresh, all my attributes and parameters goes away.

 So how to take control of all my parameters and avoid the problem of
 re-submit on refresh?


 - Thanks,
Ravi Amlani


 --
 Learn Windows Azure Live!  Tuesday, Dec 13, 2011
 Microsoft is holding a special Learn Windows Azure training event for
 developers. It will provide a great way to learn Windows Azure and what it
 provides. You can attend the event by watching it streamed LIVE online.
 Learn more at http://p.sf.net/sfu/ms-windowsazure
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Learn Windows Azure Live!  Tuesday, Dec 13, 2011
Microsoft is holding a special Learn Windows Azure training event for 
developers. It will provide a great way to learn Windows Azure and what it 
provides. You can attend the event by watching it streamed LIVE online.  
Learn more at http://p.sf.net/sfu/ms-windowsazure___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Eclipse plugin for Stripes developers

2011-10-25 Thread Samuel Santos
Hi Grzegorz,

Intellij Idea and Netbeans already have a Stripes plugin:
http://www.stripesframework.org/display/stripes/Stripes+Around+The+Web.

--
Samuel Santos
http://www.samaxes.com/


2011/10/25 Grzegorz Krugły g...@karko.net

 W dniu 2011-10-25 16:10, Iwao AVE pisze:
  For my daily Stripes development, I wrote a small Eclipse plugin and
  named it Stlipse.

 Cool, thanks for sharing. Would be awesome if someone did the same for
 NetBeans :-)


 --
 The demand for IT networking professionals continues to grow, and the
 demand for specialized networking skills is growing even more rapidly.
 Take a complimentary Learning@Cisco Self-Assessment and learn
 about Cisco certifications, training, and career opportunities.
 http://p.sf.net/sfu/cisco-dev2dev
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] What is the proper empty resolution for an ajax update?

2011-09-29 Thread Samuel Santos
Are you expecting a JSON object?

If so, you can return a JavaScriptResolution(null) or a
StreamingResolution(application/json,
).

--
Samuel Santos
http://www.samaxes.com/


On Fri, Sep 30, 2011 at 2:23 AM, fatefree fatef...@gmail.com wrote:


 Just curious, in the event of some ajax update which really supplies no
 response to the browser, what is the appropriate way to respond via a
 resolution? I have been returning null by default but firebug does not like
 that. Is there a specific status code I should return and perhaps
 encapsulate that with an EmptyResolution class?
 --
 View this message in context:
 http://old.nabble.com/What-is-the-proper-empty-resolution-for-an-ajax-update--tp32553645p32553645.html
 Sent from the stripes-users mailing list archive at Nabble.com.



 --
 All of the data generated in your IT infrastructure is seriously valuable.
 Why? It contains a definitive record of application performance, security
 threats, fraudulent activity, and more. Splunk takes this data and makes
 sense of it. IT sense. And common sense.
 http://p.sf.net/sfu/splunk-d2dcopy2
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] How to include css within Stripes app

2011-09-13 Thread Samuel Santos
Hi Enrico,

You need to place your CSS folder outside WEB-INF directory.
Files under WEB-INF will not be accessible from URL entered in the browser.

*The WEB-INF-directory is a protected one to hold internal configuration
 data like the web.xml. Nothing inside should be delivered by HTTP access. No
 URL should contain WEB-INF at all. So if you are having same problem then,
 please move your style sheets, images and all other files to be accessible
 by a browser outside WEB-INF. And if WEB-INF directory would be available
 then the configuration files like web.xml would be available as well which
 will lead to security issues*.


Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Tue, Sep 13, 2011 at 10:42 PM, Enrico Iorio writetoenr...@gmail.comwrote:

 Hi everybody

 I'm trying to include some an external css file on a page which comes from
 a ForwardResolution, but it seems not to work at all, while using servlets
 it does.
 The structure of WEB-INF is:

  * WEB-INF
  JSP(folder)
 CSS(folder)
stijl.css
 home.jsp*

 So basically home.jsp and the CSS folder are parallels, a simple relative
 url from the home.jsp page should work:
   link rel=stylesheet href=css/stijl.css type=text.css /

 But it does not,
 I have also tried this way:
   link rel=stylesheet type=text/css
 href=${pageContext.request.contextPath}/WebContent/WEB-INF/jsp/css/stijl.css/

 But nothing,

 Do you know if this is an url-based issue?

 Thank you, any help would be appreciated, i've never worked with Stripes
 before



 --
 *Enrico Iorio*



 --
 BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
 Learn about the latest advances in developing for the
 BlackBerryreg; mobile platform with sessions, labs  more.
 See new tools and technologies. Register for BlackBerryreg; DevCon today!
 http://p.sf.net/sfu/rim-devcon-copy1
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerryreg; mobile platform with sessions, labs  more.
See new tools and technologies. Register for BlackBerryreg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 ___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Strange introspection issue after upgrade to 1.5.2

2011-05-04 Thread Samuel Santos
Hi John,

Do you use any Stripes extension/plugin?

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Wed, May 4, 2011 at 3:24 PM, Newman, John W newma...@d3onc.com wrote:

  All,



 We’ve been using jdk5 / jboss4.22 / stripes 1.5 in production, stable for a
 long time now.   We’ve decided it’s about time to do some upgrades to jdk6 /
 jboss 5.  The classpath scanner in stripes 1.5 does not work on jboss 5,
 which was fixed in 1.5.2 as a result of
 http://www.stripesframework.org/jira/browse/STS-655



 Ok so in addition to jdk / jboss upgrade, we have to upgrade stripes.jar.
 Not a big deal.  Everything has gone smoothly, except for one remaining
 issue that is about as bizarre as it gets.  The application starts up and
 runs fine.  But, if you leave it sit idle for a period of time, say ~30
 minutes, sometimes, the bean introspection results will somehow change.
 This doesn’t make a whole lot of sense to me, but it’s what we’re seeing.



 After startup, DefaultActionBeanPropertyBinder says this one field is of
 type java.lang.Short (which it is), it will take a value and bind into that
 no problem.  You can click around all you want and everything is good.  Now,
 ~30 minutes of idle time go by, all of a sudden
 DefaultActionBeanPropertyBinder now decides to say this same field is of
 type java.lang.Serializable, foolishly tries to do new
 Serializable(“value”); and fails.  I can’t explain why that result would
 change over time.



 Might we be running into a regression that came from the changes in
 http://www.stripesframework.org/jira/browse/STS-664  also in 1.5.2 ?
 That’s the only thing I’m seeing related to introspection.  Because this is
 such a weird issue, I’m not even sure if it’s stripes related.  We are
 working on narrowing it down and continuing to research, but I thought I’d
 ask here first.  Unfortunately I can’t run 1.5 in jboss5, but we are trying
 1.5.2 in jboss4 right now (I suspect this will still show the issue).



   Is there any reasonable explanation for that change causing the result to
 say “java.lang.Short” one minute, and “java.lang.Serializable” the next?
  Has anyone else ran into this?





 Thanks in advance for any ideas.

 -John


 --
 WhatsUp Gold - Download Free Network Management Software
 The most intuitive, comprehensive, and cost-effective network
 management toolset available today.  Delivers lowest initial
 acquisition cost and overall TCO of any competing solution.
 http://p.sf.net/sfu/whatsupgold-sd
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network 
management toolset available today.  Delivers lowest initial 
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] how to find action bean in jar package

2011-04-29 Thread Samuel Santos
I suspect that this issue may be related with Stripes VFS.

I still have some issues with it, when creating @Deployment archives with
ShrinkWrap and Arquillian.

--
Samuel Santos
http://www.samaxes.com/


On Fri, Apr 29, 2011 at 6:45 AM, Nikolaos Giannopoulos 
nikol...@brightminds.org wrote:

  In addition to what Samuel said.

 Try packaging the working class files into a JAR and remove them from your
 classes output folder and add the JAR to your lib folder.

 That way you are directly testing the same thing.
 I too don't see why this would be an issue but the above should make it
 clear.

 I suspect the classes in your JAR and the classes you are testing outside
 your JAR are not the same classes and you may perhaps be doing something
 unintentional like not configuring your web.xml appropriately i.e. still say
 pointing to the test classes outside the JAR.

 If you still can't figure it out then posting an ActionBean class from your
 JAR and one outside as well as your web.xml might help.

 --Nikolaos




 samuel baudouin wrote:

 Damien,

 Normally, there is no difference between the jar and source/classes
 folder since, as you may know, a jar is simply a zip file of the
 .class files with some additional metadata.

 If you are sure that the jar is indeed in the classpath, and one of
 its class is available to another class in the source/classes folder
 (ie: try to construct an object of the jar out of the jar) at runtime,
 then maybe the problem comes from the way you build the jar.

 If I were you that's where I would try to investigate!

 Cheers,

 Sam

 On 4/29/11, Damien Chen damien.c...@arcs.org.au damien.c...@arcs.org.au 
 wrote:


  Thanks for the reply.

 I've done some tests and it seems like these is no problem with scanning the
 beans, the problem is the annotations in the beans are not processed.

 The annotations like
 @UrlBinding(/user/manager/groups.html)
 @Table(name=group_info)

 do not work.

 If I add all these java files to the source tree directly, then the
 annotations work all well.

 Does the jar do something special to the annotation? Is this a common issue?

 On Thu, Apr 28, 2011 at 12:20 AM, Hussachai Puripunpinyo 
 hussac...@gmail.com wrote:



  Hi Damien

 If you put the jar that contains you ActionBean classes to classpath such
 as WEB-INF/lib directory in Tomcat,
 it should be in classpath, otherwise it's serious bug in Tomcat.
 I think the problem is not classpath problem but it's URL mapping problem.
 You have to examine Stripes debug log to see what happen or you just use
 @UrlBinding annotation
 to override default generated URL mapping and try again.

 Hope this help. Good luck!

 --
 Sincerely Yours
 Hussachai Puripunpinyohttp://www.siberhus.com/

 On Wed, Apr 27, 2011 at 3:01 AM, Damien Chendamien.c...@arcs.org.au 
 damien.c...@arcs.org.auwrote:



  Hi,

 I have action beans which are in a jar package. I have
 configured ActionResolver.Packages in web.xml like normal way. The action
 beans couldn't be found. Is there a way to handle the action bean in jar?
  I'm using striptes 1.5.6 and tomcat 6.

 Any help would be much appreciated.

 Damien


 --
 WhatsUp Gold - Download Free Network Management Software
 The most intuitive, comprehensive, and cost-effective network
 management toolset available today.  Delivers lowest initial
 acquisition cost and overall TCO of any competing 
 solution.http://p.sf.net/sfu/whatsupgold-sd
 ___
 Stripes-users mailing 
 listStripes-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/stripes-users




 --
 WhatsUp Gold - Download Free Network Management Software
 The most intuitive, comprehensive, and cost-effective network
 management toolset available today.  Delivers lowest initial
 acquisition cost and overall TCO of any competing 
 solution.http://p.sf.net/sfu/whatsupgold-sd
 ___
 Stripes-users mailing 
 listStripes-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/stripes-users




 --
 Nikolaos Giannopoulos
 Director, Information Technology
 BrightMinds Software Inc.
 e. nikol...@brightminds.org
 w. www.brightminds.org
 t. 1.613.822.1700
 c. 1.613.797.0036
 f. 1.613.822.1915



 --
 WhatsUp Gold - Download Free Network Management Software
 The most intuitive, comprehensive, and cost-effective network
 management toolset available today.  Delivers lowest initial
 acquisition cost and overall TCO of any competing solution.
 http://p.sf.net/sfu/whatsupgold-sd
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

Re: [Stripes-users] plugin strategies?

2011-04-20 Thread Samuel Santos
Hi guys,

Again, I totally agree with Will about the plugins strategy and about
including them in Stripes source tree.
That's why I've suggested GitHub. I believe it can handle what we are trying
to achieve here.

As for the Git conversion, I don't get it. We're not the Linux kernel. There
 aren't zillions of patches pending to be applied every day.


This is not a valid argument to me. I don't think that the amount of patches
submitted is a decisive factor, it's all about organization.
Lately, I've been working a lot with
ShrinkWraphttps://github.com/shrinkwrap/shrinkwrapand
Arquillian https://github.com/arquillian/arquillian from JBoss. It were
those two projects that made me move to and started loving GitHub, I've even
start to commit code into ShrinkWrap so easy it was.
Now, take a look at ShrinkWrap organization https://github.com/shrinkwrap/,
it's exactly what we are trying to achieve here. A central place to have a
project and its sub-projects or extensions. And plugins don't need to be (or
must not be) on the Core project source code tree.
Each plugin is maintained by its creator, not the core team. Have its
developer lose interest and stop updating it, we can easily fork the project
under Stripes organization and continue evolving it to remain compatible
with later Stripes versions.

I'm not a GitHub guru nor even an advanced user, but I believe it is a
better solution than the one we have now and can fix the majority of the
issues we are discussing here. Some people have brought it to discussion in
this mailing list long before me, not sure why we haven't heard anything
from them since then...

If your problem is about using Git, don't worry, GitHub also supports
Subversion https://github.com/blog/644-subversion-write-support.

I will not continue to argue about GitHub if no one, apart from me, sees the
advantages in using it, but please think about it for a second before
shooting arguments like the one I quoted above.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Wed, Apr 20, 2011 at 10:09 AM, VANKEISBELCK Remi r...@rvkb.com wrote:

 Hi Will, folks,


  That said, I don't agree with the plugins concept at all.

 To be honest, I also think a clean dependency mechanism + some centralized
 docs would be enough.
 Anyway, it's a nice to have, as it allows beginners to have no ramp up.
 Simply list plugins, install them, it adds the deps, classes and updates
 your web.xml.
 Even if many Stripers won't probably use it once they are used to the
 framerwork, consider it a selling feature.

  If those are included then, regardless of original intent, users will
 think that these are first class citizens of Stripes, and that the
  there is some obligation for the maintainer of Stripes core to maintain
 these as well.

 Well, everything is subjective, but clearly some of the extensions will
 be first class citizens. Think about what's already in the core and will be
 moved (e.g. Spring integration). Now, I've never said that ALL extensions
 should be included to the main repo and built along with the framework. I
 think every extension, once it gets popular, stable etc., turns into a good
 candidate for integration into the offficial extensions of the framework.

  There's also the issue of code segregation, IP rights, and commit access.


 Yep, but on the other hand it ensures that all parts are consistent when
 new versions are released, that they have the same license, and that they
 are managed by the same group of developers. Last, it could drag new coders
 into the framework. And again, it doesn't mean that evey extension has to be
 there, just the ones that have been approved by the community. You can still
 write your separate, third party extension if you want, and distribute it
 the way you want.

 In short, think about how life would be if Spring's codebase contained only
 core container, and everything else (JDBC, JMS, ...) was scattered around
 the web... Different builds, different policies of maven sync, different
 websites... admin drag you said ?
 :P

 That's the way all projects handle scalability of the codebase : they split
 stuff into modules.
 I guess Stripes is now at that point, and it's a good sign.

  There's no reason to repaint the whole thing or re-engineer it from the
 ground up [...]

 Not sure you talk about the modularization of the build here.
 If you do, c'mon... the build already exists, there's nothing to do. I'd
 say half a day work, not a class file touched, only a few moves...
 From the ground up ???

  There's always stuff to do. Leverage the processes in place [...]

 That's exactly what I'm trying to do :)

 Cheers

 Remi


  2011/4/20 Will Hartung redro...@sbcglobal.net

 I'm not going to copy the entire thread, and I'm not responding to any one
 in particular.

 Not being a maven fan, even I can agree with the conversion to Maven. The
 primary reason is that Maven has become a de facto portable project meta
 data that all of the IDEs support well

Re: [Stripes-users] plugin strategies?

2011-04-19 Thread Samuel Santos
Hi Freddy,

On Tue, Apr 19, 2011 at 1:40 PM, Freddy Daoud xf2...@fastmail.fm wrote:

 Hi Samuel,

  2. Validate what belongs to core and what doesn't, I do believe
  that:
   3. Stripes Security should be moved from plugin to core
   (Security and JAAS integration is a fundamental feature in any
   Java web framework).

 I disagree with that. By your logic of not having Spring integration
 nor layouts in the core because people can use alternative solutions,
 Stripes Security, as much as I like it, should not be in the core
 because people who use Spring Security or Apache Shiro will probably
 never use/need this feature. Also, while I disagree that layouts
 should not be in the core, I don't feel strongly about it; but you
 have to agree that layouts are a fundamental feature in any Java web
 framework!


I don't feel strongly about it neither, it's just a matter of opinion.
I'm OK with whatever the majority of the Stripes community decision is.



   However, I'm not sure that we should do any change before
   Stripes 1.6.
   I miss ObjectPostProcessor so much that I rather prefer to
   release 1.6 first and then make the changes.

 Oh yes, absolutely agree on that one! :)


Of course you do :)



 Cheers,
 Freddy


 --
 Benefiting from Server Virtualization: Beyond Initial Workload
 Consolidation -- Increasing the use of server virtualization is a top
 priority.Virtualization can reduce costs, simplify management, and improve
 application availability and disaster protection. Learn more about boosting
 the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Samuel Santos
http://www.samaxes.com/
--
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Still seeing ConcurrentModificationException

2011-02-10 Thread Samuel Santos
Hi Yee and Nikolaos,

We do not use JRebel and have come across the same issue several times, so
it's surely a Stripes issue.
While we get the exception logged, it's transparent to the client, the
application does not crash and the client never sees an error.
This issue is very rare and only happens when you open multiple tabs at once
as Yee pointed out.

--
Samuel Santos
http://www.samaxes.com/


On Thu, Feb 10, 2011 at 3:00 PM, Nikolaos Giannopoulos 
nikol...@brightminds.org wrote:

 Yee,

 Well then... turn off JRebel and attempt to reproduce the bug... if you
 can't then it isn't Stripes.  Right?

 I know its tempting to keep JRebel engaged all the time and I recall the
 time I hit a bug in JRebel and thought it was one in Stripes... it took
 me a long time to consider simply turning off JRebel... but if you
 already suspect JRebel then flip it off and attempt to reproduce.

 --Nikolaos



 Yee wrote:
  Hi Nokolaos,
 
  The bug has already been reported to JRebel. Stripes plugin for JRebel
 was
  created by third party, so it could take a while for it to be fixed.
 
  My concern here is to ascertain whether ConcurrentModificationException
 error is
  a bug in Stripes - or caused by the bug in JRebel.
 
  Cheers,
  Yee
 
 
 
 
 
 --
  The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
  Pinpoint memory and threading errors before they happen.
  Find and fix more than 250 security defects in the development cycle.
  Locate bottlenecks in serial and parallel code that limit performance.
  http://p.sf.net/sfu/intel-dev2devfeb
  ___
  Stripes-users mailing list
  Stripes-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/stripes-users
 
 



 --
 The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
 Pinpoint memory and threading errors before they happen.
 Find and fix more than 250 security defects in the development cycle.
 Locate bottlenecks in serial and parallel code that limit performance.
 http://p.sf.net/sfu/intel-dev2devfeb
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] UTF8 from form to mySQL

2011-02-08 Thread Samuel Santos
Hi Yee,

The right answer has already be given to you on previous mails.


   1. Configure your LocalePicker:

public class MyLocalePicker implements LocalePicker {
  ...
  @Override
  public final String pickCharacterEncoding(HttpServletRequest request,
Locale locale) {
return (UTF-8);
  }
}

   1. Add the parameter URIEncoding=UTF-8 to your HTTP connector in
   server.xml.
   2. Finally, add the following line to your JSPs:

%@ page language=java pageEncoding=UTF-8
contentType=text/html;charset=UTF-8 %

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Tue, Feb 8, 2011 at 4:32 AM, Yee yeec...@gmail.com wrote:

 Janne Jalkanen janne.jalkanen@... writes:

 
 
  Simple solution: declare the accept-charset value on all your forms to be
 UTF-8 (and *only* UTF-8), then
  put up a simple Filter in front of your chain which says
 request.setCharacterEncoding(UTF-8). This
  should ensure that you get full unicodes to the ActionBean, and then you
 only
 have to deal with your DB encodings.
 
  Works for me well.
 
 I did just that - but then I found out that many users are still using
 European
 keyboards (or input programs) that output double byte characters.

 This is still an unresolved problem for me. I have users using German,
 Dutch,
 French, Spanish spanning half the world - including Mexico.

 Any suggestions?

 Regards,
 Yee



 --
 The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
 Pinpoint memory and threading errors before they happen.
 Find and fix more than 250 security defects in the development cycle.
 Locate bottlenecks in serial and parallel code that limit performance.
 http://p.sf.net/sfu/intel-dev2devfeb
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] IndexedProperty + Map + validate key

2011-02-05 Thread Samuel Santos
Hi Thomas,

You can validate your keys using a @ValidationMethod:
http://www.stripesframework.org/display/stripes/Validation+Reference#ValidationReference-CustomValidation
.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Sat, Feb 5, 2011 at 11:55 PM, Thomas Menke stripe...@cipher-code.dewrote:

 Hi,

 if I want to use indexed properties (using a Map) as parameter (by the
 way: Thank you so badly for this feature. It just works so amazingly
 easy and great). Is it possible to validate the key?

 In my case the key is a string and I would like to validate it by
 testing with a simple regex if it's ok.

 Thomas


 --
 The modern datacenter depends on network connectivity to access resources
 and provide services. The best practices for maximizing a physical server's
 connectivity to a physical network are well understood - see how these
 rules translate into the virtual world?
 http://p.sf.net/sfu/oracle-sfdevnlfb
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] UTF8 from form to mySQL

2011-02-05 Thread Samuel Santos
Hi Daniil,

I've an old post about this topic at
http://www.samaxes.com/2006/12/java-and-utf-8-encoding/.

Hope it helps,

--
Samuel Santos
http://www.samaxes.com/


On Sat, Feb 5, 2011 at 8:16 AM, Janne Jalkanen janne.jalka...@ecyrd.comwrote:

 Really???  A filter just to set character encoding???  Although I imagine
 it would work isn't that a little sledge hammer-ish ;-)


 I seem to recall it was the recommended practice.


 Why not just put the following at the top of each of your JSPs (or tweak as
 necessary):
 %@ page language=java pageEncoding=UTF-8
 contentType=text/html;charset=UTF-8 %

 That will ensure your web page supports UTF-8.


 No, it will just ensure that it outputs UTF-8; it does not say anything
 about incoming request (which is what the request.setCharacterEncoding()
 does.)

 As far as Stripes is concerned you don't have to do anything for it to
 support UTF-8... and Java retains all Strings in unicode so no issue there
 either.


 The problem stems from the fact that servlet spec says that the default
 input encoding is ISO-8859-1. Especially older browsers do not send the
 character encoding correctly, so you're better off declaring the input
 encoding explicitly.

 Please see Servlet specification version 2.5 Section SRV.3.9.

 /Janne



 --
 The modern datacenter depends on network connectivity to access resources
 and provide services. The best practices for maximizing a physical server's
 connectivity to a physical network are well understood - see how these
 rules translate into the virtual world?
 http://p.sf.net/sfu/oracle-sfdevnlfb
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] UTF8 from form to mySQL

2011-02-05 Thread Samuel Santos
Hi Nikolaos,

My post was about Java EE in general and not about Stripes.

With Stripes, a custom LocalePicker implementation will correctly encode
POST parameters, but you still need to add the URIEncoding=UTF-8 attribute
to your connector configuration.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Sun, Feb 6, 2011 at 3:11 AM, Nikolaos Giannopoulos 
nikol...@brightminds.org wrote:

  Janne and Samuel,

 Ok... I think there are some things that need to be clarified... b/c it was
 a while since I set this up in Stripes... I hadn't realized I even set it
 up.

 Technically speaking yes - you are both correct -
 request.setCharacterEncoding(UTF-8) is required and should be performed if
 you are doing UTF-8 with a simple Servlet.  However, as StripesFilter is
 already in place one would hope you wouldn't have to wrap yet another
 Servlet filter around it and clearly you don't.

 Basically, in addition to the other things I mentioned there indeed is one
 Stripes configuration that I set... by creating a custom LocalePicker
 subclass that picks the character encoding UTF-8... and dropping it the
 configured Stripes extensions folder... the relevant code is as follows:
 public class MyLocalePicker implements LocalePicker {
   ...
   @Override
   public final String pickCharacterEncoding(HttpServletRequest request,
 Locale locale) {
 return (UTF-8);
   }
 }

 And voila... all is well... and NO need for your additional Stripes
 wrapper... why b/c the StripesFilter performs the following:
 *String encoding =
 this.configuration.getLocalePicker().pickCharacterEncoding(httpRequest,
 locale);*
 *if (encoding != null) {*
 *httpRequest.setCharacterEncoding(encoding);*
 log.debug(LocalePicker selected character encoding: ,
 encoding);
 }
 else {
 log.debug(LocalePicker did not pick a character
 encoding, using default: ,
 httpRequest.getCharacterEncoding());
 }

 So, in fact we are golden via simple Stripes configuration vs. wrapping a
 custom filter around the Stripes filter.

 I had done this so long ago that I forgot I even did it.  And yes,
 technically the web browser should adhere to what its asked to use as the
 encoding and sure older web browsers may have issues - problem is what
 older means today is very unclear - so I agree this needs to be done but
 let Stripes do it for you.

 So the above should be added to my previous list :-)

 Cheers,

 --Nikolaos



 Samuel Santos wrote:

 Hi Daniil,

 I've an old post about this topic at
 http://www.samaxes.com/2006/12/java-and-utf-8-encoding/.

 Hope it helps,

 --
 Samuel Santos
 http://www.samaxes.com/


 On Sat, Feb 5, 2011 at 8:16 AM, Janne Jalkanen 
 janne.jalka...@ecyrd.comwrote:

   Really???  A filter just to set character encoding???  Although I
 imagine it would work isn't that a little sledge hammer-ish ;-)


  I seem to recall it was the recommended practice.


 Why not just put the following at the top of each of your JSPs (or tweak
 as necessary):
 %@ page language=java pageEncoding=UTF-8
 contentType=text/html;charset=UTF-8 %

 That will ensure your web page supports UTF-8.


  No, it will just ensure that it outputs UTF-8; it does not say anything
 about incoming request (which is what the request.setCharacterEncoding()
 does.)

  As far as Stripes is concerned you don't have to do anything for it to
 support UTF-8... and Java retains all Strings in unicode so no issue there
 either.


  The problem stems from the fact that servlet spec says that the default
 input encoding is ISO-8859-1. Especially older browsers do not send the
 character encoding correctly, so you're better off declaring the input
 encoding explicitly.

  Please see Servlet specification version 2.5 Section SRV.3.9.

  /Janne



 --
 The modern datacenter depends on network connectivity to access resources
 and provide services. The best practices for maximizing a physical
 server's
 connectivity to a physical network are well understood - see how these
 rules translate into the virtual world?
 http://p.sf.net/sfu/oracle-sfdevnlfb
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https

Re: [Stripes-users] valication error cannot find the proper localized message for label

2011-01-31 Thread Samuel Santos
Hi again,

Take a look at the link that Ben shared and change your resource declaration
to:
primaryAddress.streetName=Street name

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Mon, Jan 31, 2011 at 10:55 PM, hairinwind robin@gmail.com wrote:

 Hi, Samuel
 Based on your suggestion
 the same label in different pages cannot be shared in properties file.

 For example
 The user and its primary address are on the same page.
 They have to be saved together.
 There is another page for adding secondary address.
 From the perspective of the domain, primary address and secondary address
 are
 the same.
 Their fields should share the same properties on the UI.
 so when it is changed, it is changed for both primary and secondary.
 Otherwise you need duplicate your changes. Not good, right?

 Thanks



 --
 Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
 Finally, a world-class log management solution at an even better
 price-free!
 Download using promo code Free_Logger_4_Dev2Dev. Offer expires
 February 28th, so secure your free ArcSight Logger TODAY!
 http://p.sf.net/sfu/arcsight-sfd2d
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] lost information after Validation error

2011-01-30 Thread Samuel Santos
Hi,

You can also use @Before methods to pre-populate domain objects
http://www.stripesframework.org/display/stripes/Best+Practices.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Sat, Jan 29, 2011 at 2:00 PM, Freddy Daoud xf2...@fastmail.fm wrote:

 Hi,

  The table on the jsp page gets the data
  from
  ${actionBean.object.children}.
 
  When it is submitted and its get validation error, it goes back to
  getContext().getSourcePageResolution(). The defaultHandler method was
  not
  executed and the actionBean was not populated with its children. All data
  in
  child table is gone. Fields are ok, as they get the data from
  httpRequest.
 
  Is it a bug? How to make the pages display correct data after validation
  error?

 The way Stripes works is that event handlers are not called if there are
 validation errors. That way, you can write code in event handlers
 knowing
 that all validations have passed.

 In your case, populate your table data in the getter instead of in the
 event handler method:

 public Object getObject() {
  if (object == null) {
object = new Object();
List children = new ArrayList();
object.setChildren(children);
// ...
  }
  return object;
 }

 Hope that helps.

 Cheers,
 Freddy
 http://www.fdaoud.com


 --
 Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
 Finally, a world-class log management solution at an even better
 price-free!
 Download using promo code Free_Logger_4_Dev2Dev. Offer expires
 February 28th, so secure your free ArcSight Logger TODAY!
 http://p.sf.net/sfu/arcsight-sfd2d
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Stripes 1.5.5 released

2011-01-04 Thread Samuel Santos
Thanks Ben for all your hard work!

--
Samuel Santos
http://www.samaxes.com/


On Tue, Jan 4, 2011 at 7:55 PM, Ben Gunter gunter...@gmail.com wrote:

 That's great to hear! You can thank David Dundua and Nick Stuart for
 helping with that. They gave me quite a workout in STS-788.

 http://www.stripesframework.org/jira/browse/STS-788

 http://www.stripesframework.org/jira/browse/STS-788-Ben


 On Tue, Jan 4, 2011 at 2:32 PM, Janne Jalkanen 
 janne.jalka...@ecyrd.comwrote:


 Thank you! Seems to solve all the weird-o layout issues I was having with
 1.5.4 that I never got around to debugging...

 /Janne

 On Jan 4, 2011, at 20:17 , Ben Gunter wrote:

 Stripes 1.5.5 is available for 
 Downloadhttp://www.stripesframework.org/display/stripes/Download from
 Sourceforge. Maven users will find it in the central repository.

 For information on what has changed and what you need to know before you
 upgrade, see the Release 
 Noteshttp://stripes.svn.sourceforge.net/viewvc/stripes/tags/1.5.5/ReleaseNotes.html
 .

 Thanks to all who contributed to this release.

 -Ben



 --
 Learn how Oracle Real Application Clusters (RAC) One Node allows customers
 to consolidate database storage, standardize their database environment,
 and,
 should the need arise, upgrade to a full multi-node Oracle RAC database
 without downtime or disruption
 http://p.sf.net/sfu/oracle-sfdevnl
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] extensions to stripes

2010-12-31 Thread Samuel Santos
Hi Daniil,

Place an enhancement request on Stripes bug tracking tool -
http://www.stripesframework.org/jira.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Thu, Dec 30, 2010 at 7:27 PM, Daniil Sosonkin dan...@orbisfn.com wrote:

 Question. I asked some time ago regarding HTML5 support since Stripes
 doesn't have built in support for new input types. Since its not planned in
 near future I've decided to implement a few quickly. Its not full
 implementation yet. But it doesn't hurt to have those around. Is there a
 place where I can submit the code? Just a few tags for numbers and emails.

 Daniil


 --
 Learn how Oracle Real Application Clusters (RAC) One Node allows customers
 to consolidate database storage, standardize their database environment,
 and,
 should the need arise, upgrade to a full multi-node Oracle RAC database
 without downtime or disruption
 http://p.sf.net/sfu/oracle-sfdevnl
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


[Stripes-users] Matt Raible's JVM Web Framework matrix

2010-11-30 Thread Samuel Santos
quoteAfter updating my JVM Web Framework matrix based on community
feedback, Tapestry  Vaadin tied for 5th.
http://bit.ly/jvm-frameworks-matrix/quote

Is he joking?

--
Samuel Santos
http://www.samaxes.com/
--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Form Validation: Stripes and MooTools (field-metadata Tag)

2010-11-16 Thread Samuel Santos
You can return a JSP file in response to your AJAX request (return new
ForwardResolution(/ajax-response.jsp)).
Making it super easy to include your errors and messages (s:errors/ and
s:messages/).

Not the best traffic saver though. But at least it allows you to update
small portions of your site.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Tue, Nov 16, 2010 at 3:03 PM, Nikolaos Giannopoulos 
nikol...@brightminds.org wrote:

 Andrey,

 Clearly the choice of JS framework is not the issue here.  However, what
 I was looking for was a MooTools version of the jQuery script that Aaron
 Porter wrote that leverages the field-metadata tag and that is why I
 mentioned MooTools here.

 Your suggestion however is very interesting and sounds very simple to
 implement and does solve the localization of error messages.

 However, I am concerned thought that doing an Ajax call per each field
 change will amount to a lot of extra server requests and may be a
 performance clog on a high traffic site.  Did you ever consider limiting
 to 1 Ajax request on hitting form submit... basically a pre-validation
 to actual form submission?

 Thoughts???

 --Nikolaos



 Andrey Listochkin wrote:
  Hi, Nikolaos
 
  I don't think the choice of JS framework could affect validation in
  any way. After all you do use ajax, don't you? :)
 
  Here's how we solved it in one of our projects:
 
  1. On client side we add an event listener to each form field (we
  listen for onChange event).
  2. This event listener does a plain vanilla ajax request. Something like:
 
  /my/action/bean?fieldName=User+ValueajaxValidate=atrue
  In our action bean we have fields with some validation rules and
  (optionally) custom methods assigned. If we leave it as is it won't
  handle our request correctly because some other fields might be
  required. That's why ..
 
  3. Our action bean implements ValidationErrorHandler [1] interface to
  hijack the default validation handling mechanism.
  4. By the time handleValidationErrors method is called all validation
  rules are already applied and ValidationErrors array is already filled
  in.
  5. Inside this handleValidationErrors we check for ajaxValidate
  parameter in request and if it's present we filter out validation
  errors corresponding to filedName field.
  6. If no errors are found we return a JSON {status: 'ok'}. Otherwise
  we return JSON with validation errors.
  7. On a client side aour Ajax callback function expects a JSON
  response data. If JSON has any errors we show them to user.
 
  It's not really hard to implement ajax validation this way and it's
  completely library-agnostic. In our project we use jQuery so I don't
  show the code to you to avoid confusion. But if you follow the
  guidelines that's going to be easy.
 
  Note that we still required to have a ajaxValidate handler defined in
  our action bean. It's going to be invoked when the last field in a
  form is being validated and is going to pass validation. This is
  because in this case ValidationErrors array is empty and
  handleValidationErrors isn't called. If this method isn't defined
  Stripes will use a default handler - and it might be not something you
  intend to.
 
  Cheers,
  Andrey
 
  [1]
 
 http://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/stripes/validation/ValidationErrorHandler.html
 
 
  On Mon, 15 Nov 2010 20:05:09 +0200, Nikolaos Giannopoulos
  nikol...@brightminds.org wrote:
 
  Hi,
 
  I noticed the following page which shows how to integrate Stripes w/
  client side validation via JQuery:
 
 http://www.stripesframework.org/display/stripes/Validation+Reference#ValidationReference-Usingthe{{fieldmetadata}}taghttp://www.stripesframework.org/display/stripes/Validation+Reference#ValidationReference-Usingthe%7B%7Bfieldmetadata%7D%7Dtag
 
 
  Has anyone done anything similar w/ MooTools?
 
  If so, was it a rewrite of Aaron's code or did it hook into MooTools
  Form Validation?
 
  And if so - anything shared would be appreciated.
 
  We are debating whether to do this now (though are short on time - what
  else is new) but anything that accelerates that could help us and in
  turn we would post it back to the community.  I also realize the effort
  isn't huge but JQuery notation is new to me and doing this right w/
  MooTools and classes will result in a pretty extensive re-write I'm
  afraid.
 
  Lastly, this is probably a stretch but did anyone solve the localization
  issue in all of this i.e. localized error messages exist in resource
  bundles on the Stripes server side yet the messages need to be
  accessible to provide the correct message to the user... Ajax is one
  possibility... using a generic set of translated messages is another...
  but all don't appear optimal.
 
  Much Appreciated.
 
  --Nikolaos
 
 
 --
 
  Centralized Desktop Delivery: Dell and VMware Reference Architecture
  Simplifying

Re: [Stripes-users] Preventing multiple form submission

2010-11-16 Thread Samuel Santos
I usually do that on the client side:

document.getElementById(submitButton).onclick = function(e) {
e.preventDefault();
this.disabled = true;
this.form.submit();
};

But if the user presses the stop button before the response is returned, he
will have to refresh the page in order to re-enable the submit button.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Tue, Nov 16, 2010 at 3:34 PM, Oscar Westra van Holthe - Kind 
os...@westravanholthe.nl wrote:

 On 16-11-2010 at 10:17, Nikolaos Giannopoulos wrote:
  Just wondering how others elegantly solve this situation:
 
  1) User is editing a form and fills it out and clicks submit button
  2) Form gets successfully processed on the server however before a
  response is returned the user hits the stop button, their internet
  connection drops, etc...
  4) User clicks on submit again and tries to re-submit the same
  information(*)
 
  Now, this would be trivial if there was a unique piece of information in
  the content being posted however lets assume someone posting some blog /
  news content wherein there is really no unique info (e.g. although it
  may be rare there is nothing wrong with 2 people say posting the same
  content with the same title).
 
  I was thinking to tag the users session with the last successfully
  submitted Stripes _sourcePage field and direct the user to the view
  handler if they are trying to do an edit and the _sourcePagematches.
 
  Thoughts???

 It is always possible to render a hidden field nonce with a bit of opaque
 information (like a random long, hex-encoded), that is also stored in the
 session. Generally, you get a flow like this:
 - A form is prepared
 - Generate a few random bytes (e.g. a long, anf hex-encode it)
 - Store the value in the session
 - Display the form, including a hidden field nonce with the generated
 value
 ...
 - When receiving a request that's not intended for a default handler, check
  the field nonce:
  - If it isn't present, give an error
  - If it is present but doesn't match the value in the session, present an
error message this form has already been submitted, and re-display the
form or the detail page
  - Otherwise the nonce is present and matches the stored value: perfect
 - Unless there is an error (see above), proceed as usual

 As a variation you may generate a nonce per form or form/record combination
 to explicitly allow people to edit multiple things at once.

 Also, given that I match on default handler or not, it is perfectly
 possible to handle this using an interceptor and custom form tag. The first
 check upon submit forced the use of the custom tag, so there will be no
 omissions there.


 Oscar

 --
   ,-_  Oscar Westra van Holthe - Kind  
 http://www.xs4all.nl/~kindop/http://www.xs4all.nl/%7Ekindop/
  /() )
  (__ (  Inequality is the inevitable consequence of liberty.
 =/  ()  -- Salvador De Madariaga - Anarchy or Hierarchy (1937)

 -BEGIN PGP SIGNATURE-

 iEYEARECAAYFAkzipKAACgkQLDKOJAl7tOJnngCg/nFW5qfrRcKTMo7C/uOQ2iqn
 XXEAoJRR0AXjseiwUCR7IhZoPYDyd8sx
 =jgb0
 -END PGP SIGNATURE-


 --
 Beautiful is writing same markup. Internet Explorer 9 supports
 standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
 Spend less time writing and  rewriting code and more time creating great
 experiences on the web. Be a part of the beta today
 http://p.sf.net/sfu/msIE9-sfdev2dev
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Maven convention

2010-11-12 Thread Samuel Santos
We have always used JAAS in our projects for user authentication and
authorization and never had problem with it. It's easy and straightforward
to use.
I find myself using the SecurityInterceptor (Securing Stripes With ACLs) all
the time since it's a lot simpler than J2EESecurityManager (Security
Interceptor for custom authorization) and its Taglib is a lot more intuitive
and practical. Only once was it not able to satisfy our requirements and we
had to implement our own interceptor.

As Will pointed out, it's a lot more convenient to use an annotation in your
handler methods instead of calling getRequest().isUserInRole(role) each
time you need to authorize a user.

Also, I do not understand why you should have to override the Java EE
authentication mechanism in order to have it propagated to the EJB tier. Can
you explain further?

--
Samuel Santos
http://www.samaxes.com/


On Fri, Nov 12, 2010 at 6:29 AM, Oscar Westra van Holthe - Kind 
os...@westravanholthe.nl wrote:

 On 11-11-2010 at 20:57, Will Hartung wrote:
 [...]
  Unfortunately, this is easier said than done, especially before Servlet
  3.0. It gets very container specific, especially if you want to propagate
  the credentials back to the EJB tier in a JEE server.

 Here you touch the heart of many problems: AFAIK, overriding the JavaEE
 authentication mechanism and then propagating it to the EJB tier so it can
 be
 used by the standard mechanisms is container specific. It's probably easier
 (for local EJB's at least) to create an entire framework using a session
 variable, and ditch the standard mechanism altogether.


  However, there's nothing stopping Stripes from leveraging the existing
  infrastructure even if it doesn't provide a way to programmatically set
 the
  role and principle. If someone uses out of the box Form or BASIC
 security,
  the @Role or whatever annotations will do the trick.

 IMHO, this is the best course of action for any framework (if you need it):
 only add to the authorization mechanism, and let the container handle
 authentication and propagate the principal.


  I know we have our own custom login handler and our own realm for
  GlassFish, using its programmatic login so it all works within the
  framework of the JEE server. But its also GF specific, we'd have to port
  that were we to go to another server.
 
  As far as implementing those modules and such in Stripes, that's not its
  role, frankly. We use Stripes for login forms, and feed those inputs in
 to
  our security mechanism. We use a Filter like every one else, but rely on
  the Principals and Roles back on the EJB tier.

 Indeed: a filter at least allows you to override the roles and principles
 in
 the request. Given that Stripes (and many other frameworks as well) work
 more
 or less in the context of a servlet, overriding the principal and roles
 isn't
 even feasible.


 Regards,
 Oscar

 --
   ,-_  Oscar Westra van Holthe - Kind  
 http://www.xs4all.nl/~kindop/http://www.xs4all.nl/%7Ekindop/
  /() )
  (__ (  No trees were killed in the creation of this message. However,
 =/  ()  many electrons were terribly inconvenienced.

 -BEGIN PGP SIGNATURE-

 iEYEARECAAYFAkzc3tEACgkQLDKOJAl7tOJWYwCg4JdHEtcoY/MxKJUFzJjfgaO3
 4QcAmgOFZxfkUdnuCu6fFWTPBlvPGJA/
 =KYOS
 -END PGP SIGNATURE-


 --
 Centralized Desktop Delivery: Dell and VMware Reference Architecture
 Simplifying enterprise desktop deployment and management using
 Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
 client virtualization framework. Read more!
 http://p.sf.net/sfu/dell-eql-dev2dev
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Maven convention

2010-11-09 Thread Samuel Santos
I do agree that we should at least add the support for Java Authentication
and Authorization Service (JAAS) to Stripes core.

On the other hand, I also feel that the support for external frameworks
(i.e. Spring) don't belong in Stripes core and should me moved to external
extensions.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Mon, Nov 8, 2010 at 7:07 AM, dimension123 dimension123 
dimension...@gmail.com wrote:

 I am curious if there are any things related to security that are going
 into 1.5.4.
 I think the only thing lacking with stripes is security and while i
 understand the argument that there are other frameworks that handle security
 well, i feel large corporate tech shops turn down proposals from architects
 pushing stripes because of its lack of security consideration ...security is
 perhaps one of the most important factors when it comes to IT heads adopting
 a new framework;  if they have to use say spring security with stripes, then
 they are going to go spring all the way in many cases i think as the
 impression is that it will be more economical to pour resources into
 learning/adopting a single framework rather than two.
 Just my 2 pennies...

 On Sun, Nov 7, 2010 at 9:09 PM, Nikolaos Giannopoulos 
 nikol...@brightminds.org wrote:

  Samuel,

 I am very much in favour of Maven on any project to the point that I have
 been very vocal about Stripes and Maven support.

 However, I would agree with Ben that for 1.5.4 that we just keep things as
 they are.  In fact, I think 1.5.4 has stewed long enough and should be
 officially released as we are approaching a year since the release of
 1.5.3.  As I have mentioned a number of times perception is key in
 software IMHO and a release of 1.5.4 trumps internal project changes - at
 least for me.

 Speaking of which:

 Ben:  Any idea when 1.5.4 will be released?  It contains a lot of key
 fixes and it has baked long enough?  No???

 --Nikolaos





 Samuel Santos wrote:

 Ben,

 Consider this as an excuse to optimize our code structure ;)

 Cheers,

 --
 Samuel Santos
 http://www.samaxes.com/


 On Fri, Nov 5, 2010 at 2:04 PM, Ben Gunter gunter...@gmail.com wrote:

 This is something we can consider after the release of 1.5.4. I didn't
 feel the need to add a Maven build in the first place, and I surely don't
 like the idea of having to move stuff all around to accommodate it so there
 will be resistance.

 -Ben


 On Sun, Oct 31, 2010 at 11:17 AM, VANKEISBELCK Remi r...@rvkb.comwrote:

 Hi Nathan,

 In order to keep the current tooling (ant, ide settings, scripts, etc)
 working, and to get the first maven build working smoothly without being
 intrusive, it has been agreed that nothing had to be changed.

 Now that it works, I already talked about some refactoring of the
 folders to allow less config in poms, and more importantly, to allow tests
 to be in the same module than the core code.

 For the moment, due to the folder layout that was imposed, I had to
 create a specific module for the unit tests. This means that the core 
 module
 is built (and deployed if you do mvn deploy) even when tests fail. It only
 has to compile to get installed/deployed into maven repos. That sucks (not
 that word again...) a lot, and IMHO is the main reason to so some small
 refactorings.

 Ben ? Have you thought about it a little ? Would you mind if I do some
 small surgery in 1.5.x and trunk so that we have the tests in the core
 module ?

 Cheers

 Remi


 2010/10/31 Nathan Maves nathan.ma...@gmail.com

 Just curious if anyone has thought to migrate the current layout of the
 stripes code to use more Maven conventions?

  Nathan




 --
 The Next 800 Companies to Lead America's Growth: New Video Whitepaper
 David G. Thomson, author of the best-selling book Blueprint to a
 Billion shares his insights and actions to help propel your
 business during the next growth cycle. Listen Now!
 http://p.sf.net/sfu/SAP-dev2dev
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users




 --
 The Next 800 Companies to Lead America's Growth: New Video Whitepaper
 David G. Thomson, author of the best-selling book Blueprint to a
 Billion shares his insights and actions to help propel your
 business during the next growth cycle. Listen Now!
 http://p.sf.net/sfu/SAP-dev2dev
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users




 --
 The Next 800 Companies to Lead America's Growth: New Video Whitepaper
 David G. Thomson, author of the best-selling book Blueprint to a
 Billion shares his insights and actions

Re: [Stripes-users] [JIRA] Created: (STS-779) Release 1.5.4 (also to Maven Repo)]

2010-11-09 Thread Samuel Santos
Currently Stripes is not working with JBoss 6.
This is a very serious issue to me.

Shouldn't we try to fix it before releasing version 1.5.4?
How much will we have to wait until version 1.5.5 or 1.6? Will they be out
in time for JBoss 6 GA?

We have 3 open issues related to this - STS-773, STS-775 and STS-776.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Wed, Nov 10, 2010 at 12:20 AM, Nikolaos Giannopoulos 
nikol...@brightminds.org wrote:

  Remi,

 Man... why couldn't you have just said:  I agree that 1.5.4 should be
 released as I have no issues with it or just OK.  It would have had the
 effect of what you and I and a number of other people are asking for... a
 timely release of 1.5.4... all things considered.

 While nothing you say is overtly wrong, you need to understand the tone and
 candor of your comments are alarming to some who have not had issues with
 nested layouts OR have not had time to test BUT who have come to expect
 solid releases for Stripes.  I know you didn't intend any mis-direction with
 your comment but unfortunately not everyone will read or get every nuance of
 every e-mail.

 And yes - releases can be re-released - and we have you to thank for the
 Maven release piece but honestly lets not go there... agreed ;-)

 Anyone else have any issues with nested layouts in 1.5.4 or 1.5.4 please
 speak up now.

 Cheers,

 --Nikolaos





 VANKEISBELCK Remi wrote:

 Hi,

 The question is about the nested layouts feature that Ben included weeks
 ago. Remember ? He even asked for testing at that time... Not sure I
 remember you whining people sending anything concrete, like test cases. At
 least no such thing got commited in our webtests... anyway.

 I have been talking with Ben about it and he said that according to him the
 nested layouts feature is ready unless someone has a problem with it. Since
 no one has a problem, and since it was the feature we waited for in order to
 release, I suggested to go for it. We're not gonna spend months with this
 stuff.
 Many people is waiting for 1.5.4 to be officially released. If you're not,
 well, just stick to 1.5.3. Also, many people have tried out the
 1.5.4-SNAPSHOT version. So I don't think there's any reason to panic here...

 Now for the if it has a problem we'll release again : that's what every
 software does, isn't it ? I mean, there are bugs, we fix them, we release...
 Moreover, now that releasing into maven central is a one-command operation
 or almost, I don't see the problem. Even a critical issue (which doesn't
 seem to be the case for now) would not really serious : just rollback and
 keep 1.5.3 in the meantime we fix the bug.
 Don't make me wrong : I don't say it's classy to release with a blocker.
 But it ain't classy to wait forever either, and again, 1.5.4 has already
 been out for a while as a SNAPSHOT so it should be tested the best we can...

 Sometimes, you just need balls :P

 Anyway, unless you guys have a problem with the layouts thing, I don't see
 why you complain. No layout problem found ? Well, let's go. That was my
 point.

 Cheers

 Remi

 2010/11/9 gshegosh g...@karko.net

  W dniu 09.11.2010 22:29, Nikolaos Giannopoulos pisze:

 What is the issue you have with the 1.5.4 release going live?


  Personally I have no issue with 1.5.4 release going live since it works
 splendidly for me on Glassfish 3 even with my quirky CMS stuff based on
 layouts.

 What I have disagree with is the approach that Remi seems to be
 supporting:


 And if this layout thing actually turns out to be a disaster, well, we'll
 fix and re-release.

  In my opinion, either the feature is working, or it's out of the release.
 I'm not current with the state of layout tags modifications, if they are
 confirmed to be working, let 1.5.4 be released; I based my previous post on
 that single sentence which could suggest they are NOT fully confirmed to be
 working.



 --
 The Next 800 Companies to Lead America's Growth: New Video Whitepaper
 David G. Thomson, author of the best-selling book Blueprint to a
 Billion shares his insights and actions to help propel your
 business during the next growth cycle. Listen Now!
 http://p.sf.net/sfu/SAP-dev2dev
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users




 --
 Nikolaos Giannopoulos
 Director of Information Technology
 BrightMinds Software Inc.
 e. nikol...@brightminds.org
 w. www.brightminds.org
 t. 1.613.822.1700
 c. 1.613.797.0036
 f. 1.613.822.1915



 --
 The Next 800 Companies to Lead America's Growth: New Video Whitepaper
 David G. Thomson, author of the best-selling book Blueprint to a
 Billion shares his insights and actions to help propel your
 business during the next growth cycle. Listen Now!
 http://p.sf.net

Re: [Stripes-users] Maven convention

2010-11-07 Thread Samuel Santos
Hi Nikolaos,

Please don't get me wrong, I agree with both of you.
I'm all in favor of Maven ...but only after the release of 1.5.4.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Mon, Nov 8, 2010 at 2:09 AM, Nikolaos Giannopoulos 
nikol...@brightminds.org wrote:

  Samuel,

 I am very much in favour of Maven on any project to the point that I have
 been very vocal about Stripes and Maven support.

 However, I would agree with Ben that for 1.5.4 that we just keep things as
 they are.  In fact, I think 1.5.4 has stewed long enough and should be
 officially released as we are approaching a year since the release of
 1.5.3.  As I have mentioned a number of times perception is key in
 software IMHO and a release of 1.5.4 trumps internal project changes - at
 least for me.

 Speaking of which:

 Ben:  Any idea when 1.5.4 will be released?  It contains a lot of key fixes
 and it has baked long enough?  No???

 --Nikolaos





 Samuel Santos wrote:

 Ben,

 Consider this as an excuse to optimize our code structure ;)

 Cheers,

 --
 Samuel Santos
 http://www.samaxes.com/


 On Fri, Nov 5, 2010 at 2:04 PM, Ben Gunter gunter...@gmail.com wrote:

 This is something we can consider after the release of 1.5.4. I didn't
 feel the need to add a Maven build in the first place, and I surely don't
 like the idea of having to move stuff all around to accommodate it so there
 will be resistance.

 -Ben


 On Sun, Oct 31, 2010 at 11:17 AM, VANKEISBELCK Remi r...@rvkb.comwrote:

 Hi Nathan,

 In order to keep the current tooling (ant, ide settings, scripts, etc)
 working, and to get the first maven build working smoothly without being
 intrusive, it has been agreed that nothing had to be changed.

 Now that it works, I already talked about some refactoring of the folders
 to allow less config in poms, and more importantly, to allow tests to be in
 the same module than the core code.

 For the moment, due to the folder layout that was imposed, I had to
 create a specific module for the unit tests. This means that the core module
 is built (and deployed if you do mvn deploy) even when tests fail. It only
 has to compile to get installed/deployed into maven repos. That sucks (not
 that word again...) a lot, and IMHO is the main reason to so some small
 refactorings.

 Ben ? Have you thought about it a little ? Would you mind if I do some
 small surgery in 1.5.x and trunk so that we have the tests in the core
 module ?

 Cheers

 Remi


 2010/10/31 Nathan Maves nathan.ma...@gmail.com

 Just curious if anyone has thought to migrate the current layout of the
 stripes code to use more Maven conventions?

  Nathan




 --
 The Next 800 Companies to Lead America's Growth: New Video Whitepaper
 David G. Thomson, author of the best-selling book Blueprint to a
 Billion shares his insights and actions to help propel your
 business during the next growth cycle. Listen Now!
 http://p.sf.net/sfu/SAP-dev2dev
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users




 --
 The Next 800 Companies to Lead America's Growth: New Video Whitepaper
 David G. Thomson, author of the best-selling book Blueprint to a
 Billion shares his insights and actions to help propel your
 business during the next growth cycle. Listen Now!
 http://p.sf.net/sfu/SAP-dev2dev
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book Blueprint to a 
Billion shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Odd Clean URL Binding??? (1.5.4 Snapshot)

2010-10-28 Thread Samuel Santos
+1 for {_eventName}

--
Samuel Santos
http://www.samaxes.com/


On Fri, Oct 29, 2010 at 1:14 AM, Joaquin Valdez joaquinfval...@gmail.comwrote:

 I have always been partial to the ~

 Joaquin


 On Oct 28, 2010, at 5:11 PM, Freddy Daoud wrote:

  You are both correct.  Indeed perhaps something like  {#event}  would
  have been better.  Hindsight is always 20-20.
 
  I realize I'm probably the only one who would like this, but I would
  have used {_eventName} because that special request parameter is
  already being used for the event name. So, one less magical thing
  to learn.
 
  Freddy
 
 
 --
  Nokia and ATT present the 2010 Calling All Innovators-North America
 contest
  Create new apps  games for the Nokia N8 for consumers in  U.S. and
 Canada
  $10 million total in prizes - $4M cash, 500 devices, nearly $6M in
 marketing
  Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
  http://p.sf.net/sfu/nokia-dev2dev
  ___
  Stripes-users mailing list
  Stripes-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/stripes-users

 Joaquin Valdez
 joaquinfval...@gmail.com





 --
 Nokia and ATT present the 2010 Calling All Innovators-North America
 contest
 Create new apps  games for the Nokia N8 for consumers in  U.S. and Canada
 $10 million total in prizes - $4M cash, 500 devices, nearly $6M in
 marketing
 Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
 http://p.sf.net/sfu/nokia-dev2dev
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
Nokia and ATT present the 2010 Calling All Innovators-North America contest
Create new apps  games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] HTML5 support?

2010-10-13 Thread Samuel Santos
Just a note.

HTML4 can really led to disastrous results on mobile web applications.
We find it to be really important to always use the content-type
application/xhtml+xml, which is supported by HTML5 but not HTML4, to
minimize possible issues.

--
Samuel Santos
http://www.samaxes.com/


On Wed, Oct 13, 2010 at 3:10 PM, Stone, Timothy tst...@barclaycardus.comwrote:

  Ben, et. al,

 The good news is I’ve been buried in a “Powered by Stripes 1.5.3” project.

 The bad news is, besides being a champion for a more flexible configuration
 of the HTML output of Stripes, I haven’t been able to complete what I
 started.

 My patch doesn’t throw a NPE, but it doesn’t work in nested Layout
 Definitions and Renderers.

 I recently proposed a Stripes configuration setting that would be much
 wider in scope than page, request, or session (session is not the right
 place anyway). Application level seem more apropos. A context-param has
 started making more sense in recent weeks. Follow my logic:

 An application is going to have HTML 4, 5, or XHTML output across the
 application as a whole. Developers should not be developing an application
 intentionally, or unintentionally, with varied response types... Well,
 mobile being an exception, but we (meaning myself and my employer) are
 finding that HTML 4 and 5 are the expected standards on advanced, even 3
 years recent, mobile platforms (WAP transforms are another matter
 altogether).

 Having a page level s:options ...  or other Layout attribute requires
 pages/views to be aware of its response to the client, or puts encumbrance
 on the page developer to remember the output is of variety x for view y.

 Setting the response output in the deployment descriptor make it a much
 simpler branching in the FormTag and HtmlTagSupport classes: just check
 the ServletContext for the response type.

 I really need to visit this again, but yours truly is in the push to
 release... Maybe in our next iteration I’ll press the matter internally
 more.

 Regards,
 Tim





 On 10/12/10 9:14 PM, Ben Gunter gunter...@gmail.com wrote:

  Thanks for the answer. I've seen recent posts to the group about Stripes'
 future. Well, this is one direction. The library is very well matured at
 this point, there's no immediate need to do anything (except for streaming
 layout - works on our platform btw). Maybe one direction to go is introduce
 HTML5 and some XHTML configuration for picky governments and etc...


 --
 Timothy Stone   |   Director, Application Developer Technical Lead
 Barclaycard   |Business Technology Group, Solutions Delivery
 125 S. West Street   |   Wilmington, DE|   19801
 USA   |   www.barclaycardus.com
 +1 302 255 8044 direct |   +1 410 441 9450 cell

 COMPANY CONFIDENTIAL

 P Before printing this e-mail, or any other document, ask yourself whether
 you need a hard copy



 ___

 Barclays
 www.barclaycardus.com
 ___

 This e-mail and any files transmitted with it may contain confidential
 and/or proprietary information. It is intended solely for the use of the
 individual or entity who is the intended recipient. Unauthorized use of this
 information is prohibited. If you have received this in error, please
 contact the sender by replying to this message and delete this material from
 any system it may be on.


 --
 Beautiful is writing same markup. Internet Explorer 9 supports
 standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
 Spend less time writing and  rewriting code and more time creating great
 experiences on the web. Be a part of the beta today.
 http://p.sf.net/sfu/beautyoftheweb
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] HTML5 support?

2010-10-13 Thread Samuel Santos
Hi Tim,

Comments inline...

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Wed, Oct 13, 2010 at 6:16 PM, Stone, Timothy tst...@barclaycardus.comwrote:

  Samuel,

 In regards to Stripes, the discussion is about the syntax used in the HTML
 response by the Tag Library. STS-751 is an attempt to allow developers to
 determine the syntax and not be tied to Stripes Tag Library default (a
 default which would allowed by HTML5 BTW).


Thanks for pointing it out, I'll look into it.



 In regards to “HTML4 can really led to disastrous results on mobile web
 applications,” please provide details about the mobile platform. This does
 not mesh with testing we have performed internally. We are delivering HTML4
 (Loose, Trans, and Strict) across a broad range of advanced mobile
 platforms, Apple, Android, etc. with a low rate of issues, certainly not
 debilitating issues. The mime type text/html in all cases.


I presume that you live in the US, so that may me true for you.
But if you look at the market share in Europe and Worldwide you'll see that
market is still dominated by Nokia and specially by dumbphones.
Then you have mobile operators (e.g. Vodafone) that have WAP proxies which
adapt content for dumbphones.
We have find out that the DOCTYPEs that deliver the best results and are
globally best supported are XHTML Basic and XHTML MP (both should be
delivered with content type application/xhtml+xml).



 As an aside, delivering HTML 4 with a content-type of application/xhtml+xml
 could very well lead to disastrous results. HTML4 is pretty clear about the
 content-type: text/html (See § 4.3 of the HTML 4.01 recommendation).


The Mobile Web Best Practices (http://www.w3.org/TR/mobile-bp/) seems more
appropriate for this than the HTML 4 specification.


 Regards,
 Tim




 On 10/13/10 10:41 AM, Samuel Santos sama...@gmail.com wrote:

 We find it to be really important to always use the content-type
 application/xhtml+xml, which is supported by HTML5 but not HTML4, to
 minimize possible issues.


 --
 Timothy Stone   |   Director, Application Developer Technical Lead
 Barclaycard   |Business Technology Group, Solutions Delivery
 125 S. West Street   |   Wilmington, DE|   19801
 USA   |   www.barclaycardus.com
 +1 302 255 8044 direct |   +1 410 441 9450 cell

 COMPANY CONFIDENTIAL

 P Before printing this e-mail, or any other document, ask yourself whether
 you need a hard copy



 ___

 Barclays
 www.barclaycardus.com
 ___

 This e-mail and any files transmitted with it may contain confidential
 and/or proprietary information. It is intended solely for the use of the
 individual or entity who is the intended recipient. Unauthorized use of this
 information is prohibited. If you have received this in error, please
 contact the sender by replying to this message and delete this material from
 any system it may be on.


 --
 Beautiful is writing same markup. Internet Explorer 9 supports
 standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
 Spend less time writing and  rewriting code and more time creating great
 experiences on the web. Be a part of the beta today.
 http://p.sf.net/sfu/beautyoftheweb
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Jboss 6.0 M5 Stripes 1.5.2

2010-10-12 Thread Samuel Santos
Can you start a Stripes application on it?

It's even worse for me - http://www.stripesframework.org/jira/browse/STS-773
*.

*JBoss 6.0M5 is probably full of fail!

--
Samuel Santos
http://www.samaxes.com/


On Tue, Oct 12, 2010 at 8:47 PM, Aparna Rallabandi
aparna_ra...@yahoo.comwrote:

 Hi,

 Our project UI using stripes 1.5.2 was working fine on Jboss 6.0 M2 Metro
 stack.
 There is web services communications which used Metro stack and then there
 is the UI part using stripes.

 Now we are trying to migrate to Jboss 6.0 M5 which has a CXF stack.
 Essential changes have been made to the code so that the code compiles,
 deploys and web services stack communicates with the desired entities when
 deployed on M5.
 When I bring up the UI with the M5 version (using 
 http://localhost:8080/appContextRoot,
 I get the following exception stack on entering my login password. The UI is
 a war (containing stripes jars) packaged inside the final ear which is
 deployed in Jboss.

 Any help or pointers are appreciated.

 HTTP Status 500 -

 type Exception report

 message

 description The server encountered an internal error () that prevented it
 from fulfilling this request.

 exception

 net.sourceforge.stripes.exception.StripesServletException: No default
 handler could be found for ActionBean of type: com.a.b.c.web.stripes.AbcBean

  
 net.sourceforge.stripes.controller.AnnotatedClassActionResolver.getDefaultHandler(AnnotatedClassActionResolver.java:639)

  
 net.sourceforge.stripes.controller.DispatcherHelper$2.intercept(DispatcherHelper.java:171)

  
 net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:158)

  
 com.a.b.c.web.stripes.extensions.XXXInterceptor.intercept(XXXInterceptor.java:27)

  
 net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)

  
 net.sourceforge.stripes.controller.BeforeAfterMethodInterceptor.intercept(BeforeAfterMethodInterceptor.java:113)

  
 net.sourceforge.stripes.controller.ExecutionContext.proceed(ExecutionContext.java:155)

  
 net.sourceforge.stripes.controller.ExecutionContext.wrap(ExecutionContext.java:74)

  
 net.sourceforge.stripes.controller.DispatcherHelper.resolveHandler(DispatcherHelper.java:156)

  
 net.sourceforge.stripes.controller.DispatcherServlet.resolveHandler(DispatcherServlet.java:246)

  
 net.sourceforge.stripes.controller.DispatcherServlet.service(DispatcherServlet.java:144)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:847)

  
 net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:247)

  
 org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:63)

 note The full stack trace of the root cause is available in the JBoss
 Web/3.0.0-beta-6 logs.

 Regards,
 alka08






 --
 Beautiful is writing same markup. Internet Explorer 9 supports
 standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
 Spend less time writing and  rewriting code and more time creating great
 experiences on the web. Be a part of the beta today.
 http://p.sf.net/sfu/beautyoftheweb
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Using language specific displaytag.properties files

2010-10-11 Thread Samuel Santos
Hi Rick,

You don't need to force an application locale, you just need to make sure
that your default resources property file has the same locale as your
machine.
You may also force the machine default locale with Locale.setDefault() but
that will probably break some applications running on the same JVM.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Mon, Oct 11, 2010 at 5:31 AM, Rick Accountius accountiusric...@qwest.net
 wrote:

  Samuel, Thanks for the input.  So I'm clear, I need to have my
 application set the locale before displaytag knows which file to pull my
 language specific text?  The language specified in the request won't
 suffice?

 Freddy, I re-read chapter 11 and scanned the book again, and I can't
 seem to find a reference to displaytag_fr.properties.

 Thank you both for helping me work through this.  Rick





 --
 Beautiful is writing same markup. Internet Explorer 9 supports
 standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
 Spend less time writing and  rewriting code and more time creating great
 experiences on the web. Be a part of the beta today.
 http://p.sf.net/sfu/beautyoftheweb
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] How to get JSP output as a HTML stream for AJAX?

2010-10-11 Thread Samuel Santos
Session timeouts can be easily handled with custom HTTP response headers.

I've an old post about this on my blog:
http://www.samaxes.com/2008/10/stripes-and-jquery-ajax-forms-and-http-session-validation/
.

Cheers,

--
Samuel Santos
http://www.samaxes.com/


On Mon, Oct 11, 2010 at 7:17 PM, Mike McNally emmecin...@gmail.com wrote:

 Actually what I do in such eventualities (example: a form with a file
 input that has to post to an iframe) is drop the Stripes errors tag in a div
 with a particular id value (or class; whatever), and then check in some
 Javascript code for the that element and transfer its contents to wherever I
 need it.

 (Of course that's not an XMLHttpRequest example, but the same trick works.)


 On Mon, Oct 11, 2010 at 12:54 PM, Newman, John W 
 john.new...@viaoncology.com wrote:

  Sure, I guess I should have said it depends.



 If your stripes-errors tag and all potentially errored form fields are
 within the updating div, it works great.  But if your stripes-errors tag is
 outside of the updating div, it won’t be updated with the new error
 messages.  *You have to catch that and issue a separate html update.  And if
 any fields are now in error outside of the div, you have to add the error
 css yourself.  In the applications I’ve written this is a common headache.



 And yes, if you get a 400 or 500 error you’ll need to handle that within
 the javascript as well.  Have fun with session timeouts.  =)  That’s all
 expected, I just think stripes could do more with regards to ajax requests
 and validation errors (that don’t already get rendered through the forward
 resolution itself).



 *From:* Mike McNally [mailto:emmecin...@gmail.com]
 *Sent:* Monday, October 11, 2010 1:34 PM

 *To:* Stripes Users List
 *Subject:* Re: [Stripes-users] How to get JSP output as a HTML stream for
 AJAX?



 If the handler returns validation errors, the JSP can just include them
 into the response just like it would with an ordinary form post response.



 Now, if there's an exception of some sort, then yes the client-side code
 would have to detect that.

 On Mon, Oct 11, 2010 at 12:30 PM, Newman, John W 
 john.new...@viaoncology.com wrote:

 Yes this is actually one thing that is very easy to do.  Just have an ajax
 updater function make a request to one of your event handler methods, and
 return a forward resolution to your jsp.  The jsp will surprisingly just get
 processed and inserted into your div. =)



 Now if your event handler returns validation errors, that does not work at
 all, and you have to write a bunch of code to make it work.  Stripes really
 should do much better at that.



 *From:* Mike McNally [mailto:emmecin...@gmail.com]
 *Sent:* Monday, October 11, 2010 1:19 PM
 *To:* Stripes Users List
 *Subject:* Re: [Stripes-users] How to get JSP output as a HTML stream for
 AJAX?



 That's quite possible, and extremely common. The server-side (Stripes)
 code really doesn't need to know that it's responding to an AJAX request; it
 just forwards to the JSP as usual. The client-side code just does exactly
 what you describe with the new content.



 Using a client-side framework (Dojo, Prototype, jQuery, whatever) makes
 this considerably easier.



 On Mon, Oct 11, 2010 at 12:12 PM, derrickaw a...@derrickwilliams.com
 wrote:



 I hope I'm not asking a dumb question or one that's been answered a
 hundred
 times, I probably don't know the right search terms, but if anyone has any
 pointers to answer my question it is gratefully accepted! I've been
 happily
 using Stripes for the past few months, but I'm not sure if this is
 strictly
 a Stripes question.

 I am wondering if it's possible to render a JSP from within Javascript,
 such
 as sending a request to the server and getting the rendered HTML stream
 back, which I can dynamically display.

 Here's how my current web page is set up:

 div id=customerjsp:include page=/customer_info.jsp //div
 div id=specsjsp:include page=/widget_specifications.jsp //div
 div id=disclaim jsp:include page=/boring_legal_disclaimer.jsp
 //div
 div id=orderjsp:include page=/complicated_order_form.jsp //div


 Changing one of these JSP files sometimes makes it necessary to change the
 information on another JSP. I am doing an Ajax submit of the Stripes form,
 which updates the database with no problem. However, the user display
 isn't
 up to date.

 I could do this easily with a servlet, getting all the HTML myself, but
 bleh, all the JSPs are already written and they all work great. The JSPs
 are
 fairly complex so it's not really feasible to write some Javascript to do
 the updates without pretty much duplicating the entire JSP code in
 Javascript.

 So can I do this:

 1) User updates their personal information in customer_info.jsp,
 database
 updates (this step works A+)
 2) Ajax Call: request complicated_order_form.jsp rendered into HTML,
 with
 new db values
 3) Dynamically put the received HTML into the innerHTML() of the order
 div

 Again, apologies

Re: [Stripes-users] Using language specific displaytag.properties files

2010-10-08 Thread Samuel Santos
Hi Rick,

Which is the default locale on your machine (Locale.getDefault())?

The default displaytag.properties should always be the one with the same
language as your default locale.
If your default locale is FR, you should have displaytag.properties for FR
and displaytag_en.properties for EN.

You may also need to change your StripesResources files accordingly.

--
Samuel Santos
http://www.samaxes.com/


On Fri, Oct 8, 2010 at 10:26 PM, Rick Accountius accountiusric...@qwest.net
 wrote:

  Freddy,

 Thanks for the quick reply.  I really appreciate that.  By the way, love
 your book. I highly recommend it for anyone wanting to learn Stripes. You
 and Tim did a great job!

 Prior to my original post, I had tried both upper and lowercase language
 codes in the file names, placing all into WEB-INF/classes..with no
 love.

 I'm also keeping it simple at this point.  In the default *
 displaytag.properties* file there is one line:

 basic.empty.showtable=true

 In the *displaytag_fr.properties* file, I also have one line:

 basic.msg.empty_list_row=tr class=emptytd colspan={0}Rien pour
 afficher./td/tr

 There is also a *displaytag_en.properties* file which has the following
 line:

 basic.msg.empty_list_row=tr class=emptytd colspan={0}Nothing to
 display./td/tr

 It is the english line (Nothing to display.) that is being displayed on my
 page instead of french (Rien pour afficher.) in spite of the fact I have
 my browser's locale set to fr.  All text from StripesResource_fr.properties
 is displayed perfectly.

 Its almost like displaytag is not recognizing the fact that I have other
 language specific properties files and is defaulting to english.

 Do you have a recommendation as to what version of displaytags should be
 used?  I'm using 1.0.  If it mattes, I'm using Tomcat 6.0.18 and Java
 1.6.0_18.  Maybe the down level version of displaytag is having issues.

 Thanks again, Rick



 On 10/8/2010 2:14 PM, Freddy Daoud wrote:

 Hi Rick,


  straightforward (and works great), however, I want to provide language
 support for my displaytag tables too. It appears the default
 displaytag.properties file is being found, but I can't seem to find the
 language specific displaytag properties file, such as,
 displaytag_FR.properties.  Is there something I need to configure in
 web.xml to find these locale specific displaytag properties files, or is
 there some other methodology?

  I just have displaytag_fr.properties (lowercase fr) end up in the
 WEB-INF/classes folder, and it works. Note that you have to create
 the file yourself (it does not come with display tag distribution)
 and translate only text, that is, you do not need to translate
 html tags and configuration settings.

 Cheers,
 Freddy

 --
 Beautiful is writing same markup. Internet Explorer 9 supports
 standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
 Spend less time writing and  rewriting code and more time creating great
 experiences on the web. Be a part of the beta 
 today.http://p.sf.net/sfu/beautyoftheweb
 ___
 Stripes-users mailing 
 liststripes-us...@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/stripes-users



 --
 Beautiful is writing same markup. Internet Explorer 9 supports
 standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
 Spend less time writing and  rewriting code and more time creating great
 experiences on the web. Be a part of the beta today.
 http://p.sf.net/sfu/beautyoftheweb
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2  L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Validation settings changed at runtime

2010-09-07 Thread Samuel Santos
I definitivly like the @ValidationMethod better, but you can do something
like this:

protected final int MAX_VALUE = ;

@Validate(required = true, minvalue = 1900, maxvalue = MAX_VALUE)
private int birthyear;

{
MAX_VALUE = Calendar.getInstance().get(Calendar.YEAR);
}

or

protected final int MAX_VALUE = ;

@Validate(required = true, minvalue = 1900, maxvalue = MAX_VALUE)
private int birthyear;

public BaseActionBean() {
MAX_VALUE = Calendar.getInstance().get(Calendar.YEAR);
}

Cheers,

--
Samuel Santos
http://www.samaxes.com/


2010/9/7 Grzegorz Krugły g...@karko.net

  Don't know if it can be done with @Validate, but it can be done with
 @ValidationMethod, just takes a bit more work.


 http://www.stripesframework.org/display/stripes/Validation+Reference#ValidationReference-CustomValidation

 HTH,
 Grzegorz



 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Validation settings changed at runtime

2010-09-07 Thread Samuel Santos
True, it does not work.

Sorry, I should have tested in advance.

--
Samuel Santos
http://www.samaxes.com/


On Tue, Sep 7, 2010 at 3:47 PM, Gerardo Corro rob_gar_...@hotmail.comwrote:

  Hi,

 No, it does not work, you cannot change a final value.

 BR

 --
 Date: Tue, 7 Sep 2010 16:42:51 +0200
 From: g...@karko.net
 To: stripes-users@lists.sourceforge.net
 Subject: Re: [Stripes-users] Validation settings changed at runtime


 Will it will be possible to change final variable's value?


 W dniu 07.09.2010 16:38, Samuel Santos pisze:

 I definitivly like the @ValidationMethod better, but you can do something
 like this:

 protected final int MAX_VALUE = ;

 @Validate(required = true, minvalue = 1900, maxvalue = MAX_VALUE)
 private int birthyear;

 {
 MAX_VALUE = Calendar.getInstance().get(Calendar.YEAR);
 }

 or

 protected final int MAX_VALUE = ;

 @Validate(required = true, minvalue = 1900, maxvalue = MAX_VALUE)
 private int birthyear;

 public BaseActionBean() {
 MAX_VALUE = Calendar.getInstance().get(Calendar.YEAR);
 }



 --
 This SF.net Dev2Dev email is sponsored by: Show off your parallel
 programming skills. Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd

 ___ Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Stripes Cage Rattling

2010-09-04 Thread Samuel Santos
Despite DynAttr Tag Library being the obvious choice, neither does it have
it have runtime errors nor code completion.

autocomplete attribute is more often than not a requirement in banking web
applications for security reasons, and is supported by browsers for a really
long time (it was introduced by Microsoft with Internet Explorer 5 in 1999).
For that reason it has been included in the HTML5 spec (
http://dev.w3.org/html5/spec/common-input-element-attributes.html#the-autocomplete-attribute)
and should be included in our Standard Tag Library.

--
Samuel Santos
http://www.samaxes.com/


2010/9/4 Grzegorz Krugły g...@karko.net



  autocomplete is not in HTML spec, so it's not in the taglib. There's a
 second version of tag lib that allows dynattrs, which will pass down to
 the HTML any attribute; I tend to have them both added in different
 namespaces so I can use autocomplete=off when necessary.

 W dniu 04.09.2010 05:00, Samuel Santos pisze:
  I would like to add that our taglib should really be updated.
 
  It's missing some very useful HTML attributes (e.g. autocomplete=off
  on form elements, supported by most browsers), and we should as
  well, begin to add some of the new stuff coming from the HTML5 spec.



 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Stripes on Glassfish 3 - continued

2010-09-03 Thread Samuel Santos
Strange, I never had a problem with the Stripes EJB3 Interceptor, but I
solely use JBoss.

Which version are you using?

--
Samuel Santos
http://www.samaxes.com/


2010/9/3 Grzegorz Krugły g...@karko.net

  Mystery solved - or at least bypassed for now. I've been using Samaxes
 EJB3 Interceptor (http://www.samaxes.com/2008/01/stripes-and-ejb3/) and
 after dumping it (I now lookup the EJB using netbeans-generated code)
 everything works.
 I'm not sure if the problem was caused by Samaxes interceptor itself or
 just by having interceptor at all (I don't use any now) - perhaps the
 bug is still there in Stripes using Interceptor on Glassfish 3, not sure
 for now.


 W dniu 03.09.2010 13:01, Grzegorz Krugły pisze:
   Since my original thread has been hijacked (which is fine, because I'd
  love to see Stripes get more publicity as it's sometimes hard to
  convince people to use it over well known Struts 2 which is inferior),
  let me start a new one.
 
  Followin Nikolaos advice, I have backported DynamicMappingFilter code
  from 1.5.x branch to the code I've checked out from 1.5.3 tag and it
  seems to properly initialize StripesFilter. But it turns out that my
  quick hacks I tried before also worked, since I now get the same strange
  exception, I got before:
 
  java.lang.NoClassDefFoundError:
  net/sourceforge/stripes/controller/Interceptor
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
  at
 
 com.sun.enterprise.loader.ASURLClassLoader.findClass(ASURLClassLoader.java:686)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
  at
 
 org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1415)
  at
  net.sourceforge.stripes.util.ReflectUtil.findClass(ReflectUtil.java:158)
  at
 
 net.sourceforge.stripes.config.BootstrapPropertyResolver.getClassPropertyList(BootstrapPropertyResolver.java:180)
  at
 
 net.sourceforge.stripes.config.BootstrapPropertyResolver.getClassPropertyList(BootstrapPropertyResolver.java:225)
  at
 
 net.sourceforge.stripes.config.RuntimeConfiguration.initInterceptors(RuntimeConfiguration.java:205)
  at
 
 net.sourceforge.stripes.config.DefaultConfiguration.init(DefaultConfiguration.java:195)
  at
 
 net.sourceforge.stripes.config.RuntimeConfiguration.init(RuntimeConfiguration.java:272)
  at
 
 net.sourceforge.stripes.controller.StripesFilter.init(StripesFilter.java:125)
  at
 
 net.sourceforge.stripes.controller.DynamicMappingFilter.createStripesFilter(DynamicMappingFilter.java:659)
  at
 
 net.sourceforge.stripes.controller.DynamicMappingFilter.initStripesFilter(DynamicMappingFilter.java:520)
  at
 
 net.sourceforge.stripes.controller.DynamicMappingFilter.doFilter(DynamicMappingFilter.java:414)
 
 
  The stripes.jar is packed inside my war and the Interceptor.class is
 there.
 
  Would anyone have any idea what might be causing this? I myself am
  trying to fight it, but no luck so far. If I manage to solve this, I'll
  be sure to post here.
 
  Best regards,
  Grzegorz
 
 
 
 --
  This SF.net Dev2Dev email is sponsored by:
 
  Show off your parallel programming skills.
  Enter the Intel(R) Threading Challenge 2010.
  http://p.sf.net/sfu/intel-thread-sfd
  ___
  Stripes-users mailing list
  Stripes-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/stripes-users
 



 --
 This SF.net Dev2Dev email is sponsored by:

 Show off your parallel programming skills.
 Enter the Intel(R) Threading Challenge 2010.
 http://p.sf.net/sfu/intel-thread-sfd
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
This SF.net Dev2Dev email is sponsored by:

Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] stripesframework.org domain parked?

2009-11-18 Thread Samuel Santos
Hi Brandon, use http://www.stripesframework.com/ for now.

Ben, haven't you already renew the stripesframework.org domain?

--
Samuel Santos
http://www.samaxes.com/


On Wed, Nov 18, 2009 at 8:52 PM, Brandon Atkinson 
brandon.n.atkin...@gmail.com wrote:

 Anyone know what's going on with the stripesframework.org domain?

 http://www.stripesframework.org/


 --
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
 trial. Simplify your report design, integration and deployment - and focus
 on
 what you do best, core application coding. Discover what's new with
 Crystal Reports now.  http://p.sf.net/sfu/bobj-july
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


[Stripes-users] Stripes presentation for the Portuguese JUG

2009-11-12 Thread Samuel Santos
Hi guys,

Just sharing with you a talk I gave for the Portuguese Java User Group at
the JavaPT09 event:
http://www.samaxes.com/2009/09/java-web-development-with-stripes/

I'm also sharing it at DZone vote it up if you'd like :):
http://www.dzone.com/links/java_web_development_with_stripes_3.html

Cheers,

--
Samuel Santos
http://www.samaxes.com/
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] 1.5.2

2009-10-14 Thread Samuel Santos
Hi Ben,

Have you roll back this change for 1.5.2?
http://www.nabble.com/Re%3A-Confused-about-_sourcePage-p22859465.html

--
Samuel Santos
http://www.samaxes.com/


On Wed, Oct 14, 2009 at 1:27 PM, Ben Gunter gunter...@gmail.com wrote:

 That issue is a duplicate of STS-632, which was a bug fix for 1.5.1 that
 went awry and has been reverted for 1.5.2. We don't have a date planned for
 1.5.2, but it probably is about time to push that out. We'll discuss further
 on IRC and let everyone know when it's done. For what it's worth, when 1.5.2
 is released it won't differ much, if any, from the 1.5.x branch as it is
 now. It might benefit you to build from svn and make sure everything works
 for you before we tag it.

 -Ben


 On Wed, Oct 14, 2009 at 3:21 AM, Marcus Kraßmann m...@syn-online.dewrote:

 Hi Tony,

 Tony Nelson wrote:
  Is there any planned or projected release date for 1.5.2?
 
  I am experiencing the problem described here
 
  http://www.stripesframework.org/jira/browse/STS-672
 
  I know that I can simply build stripes from svn, but my boss would
  really like a labeled release.
 

 the ticket is neither fixed nor assigned to any developer. Additionaly I
 am not really sure if it is a bug or just some lack of understanding how
 to use stripes layouts correctly. Maybe someone else can tell?!

 Kind regards,
 Marcus



 --
 Come build with us! The BlackBerry(R) Developer Conference in SF, CA
 is the only developer event you need to attend this year. Jumpstart your
 developing skills, take BlackBerry mobile applications to market and stay
 ahead of the curve. Join us from November 9 - 12, 2009. Register now!
 http://p.sf.net/sfu/devconference
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


[Stripes-users] Stripes logos site down

2009-08-27 Thread Samuel Santos
It seems that the site containing Stripes logos [1] is down.
Does anyone have a backup of those logos?


[1] http://www.stripesframework.org/display/stripes/Website+Furniture

--
Samuel Santos
http://www.samaxes.com/
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Whether there is another way to vaildate field via ajax.

2009-04-14 Thread Samuel Santos
You can find an example at my blog:
http://www.samaxes.com/2008/10/23/stripes-and-jquery-ajax-forms-and-http-session-validation/

--
Samuel Santos
http://www.samaxes.com/


On Wed, Apr 15, 2009 at 1:58 AM, ziscloud ziscl...@gmail.com wrote:


 Hi all,

 In normal way, we can use the annotation to validate the form field, like
 this:

 @ValidateNestedProperties({
@Validate(field=line1, required=true, minlength=5, maxlength=50),
@Validate(field=line2, minlength=5, maxlength=50),
@Validate(field=zip, required=true, mask=\\d{5}(-\\d{4})?)
 })

 but this way is not suitable when I validate the form field via ajax, in
 this situation we can define an method like this:

 @ValidationMethod public void validateSomething(ValidationErrors errors) {
 ... }

 for every field we need to validate, but this way is not comfortable :-(.

 whether there is another way to validate form field via ajax other than
 define one method for every field.

 anybody can help?

 Best regards!
 --
 View this message in context:
 http://www.nabble.com/Whether-there-is-another-way-to-vaildate-field-via-ajax.-tp23050703p23050703.html
 Sent from the stripes-users mailing list archive at Nabble.com.



 --
 This SF.net email is sponsored by:
 High Quality Requirements in a Collaborative Environment.
 Download a free trial of Rational Requirements Composer Now!
 http://p.sf.net/sfu/www-ibm-com
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Confused about _sourcePage

2009-04-02 Thread Samuel Santos
Hello Ben,

If I got it right this is something that was already possible with version
1.5. Take a look here:
http://www.samaxes.com/2008/10/23/stripes-and-jquery-ajax-forms-and-http-session-validation/
.

This is not the best ajax example since it loads nearly the whole page at
each request, but it shows that's possible to only return the submitted form
and its validation messages.

--
Samuel Santos
http://www.samaxes.com/


On Thu, Apr 2, 2009 at 11:20 PM, Ben Gunter gunter...@gmail.com wrote:

 Please take a look at this thread from a few weeks ago and let us know if
 it helps or if you have any additional thoughts on the matter.


 http://www.nabble.com/with-Stripes-1.5.1-jar-we-get-a-nested-JSP-rendered-and-returned-as-view-when-validation-errors-are-present-td22466933.html#a22467782

 -Ben


 On Thu, Apr 2, 2009 at 5:18 PM, Klaus stri...@friedelprivat.de wrote:

 Hello,

 I'm quite confused about how to interpret the _sourcePage content with v
 1.5.1.

 If I define a Layout 'L.jsp' which in includes 'a.jsp' and then define a
 page
 'home.jsp' based on Layout 'L.jsp'. Shouldn't _sourcePage contain
 '/home.jsp' ?
 Instead it contains 'a.jsp' 

 This leads to the funny effect that a page with validation errors shows
 the
 partial page 'a.jsp' instead of '/home.jsp'.

 The same example works flawlessly in v1.5.
 Am I missing something ?




 --

 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Plus in Links

2009-04-01 Thread Samuel Santos
Just use URLDecoder if you need to decode parameters.

--
Samuel Santos
http://www.samaxes.com/


On Tue, Mar 31, 2009 at 3:17 PM, samyem sam...@gmail.com wrote:


 AK ama-l...@... writes:

 
  Héctor López hector.lo...@... writes:
   Link tag uses a java.net.URLEncoder, to encode the resulting URL.
 That's the
   class to blame for the plus signs. Whether that encoding should be used
 or
   not falls out of my scope, but I'm actually against using spaces in
 URLs...
 
  I think there's something in the RFC about special characters that can be
 used
  in URLs, and I don't think space is one of them.  Let me look...
 
  ...here it is:
 
  URL Encoding
  (or: 'What are those %20 codes in URLs?')
  http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
 
 
 --
  ___
  Stripes-users mailing list
  Stripes-users at lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/stripes-users
 

 I think I was not clear in my first email. The param's value is a user
 supplied
 data - I do not expect the spaces to go into URL too. But I want it escaped
 properly. Is there any way to override the default behavior of using the
 URLEncoder and inject custom encoding if that's what it takes?

 Thank,
 Samyem




 --
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Problems with commons-fileupload

2009-04-01 Thread Samuel Santos
HTML forms with file submission should always have the MIME media type
defined as enctype=multipart/form-data.

See http://www.faqs.org/rfcs/rfc1867.html.

--
Samuel Santos
http://www.samaxes.com/


On Wed, Apr 1, 2009 at 1:55 AM, CN Yee yeec...@gmail.com wrote:

 I discovered that I can get around this problem by adding the attribute
 enctype=multipart/form-data in the outer form in the layout.

 Is there any side effects to this work around?

 Regards,
 Yee


 --

 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


--
___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Reading a properties file

2009-04-01 Thread Samuel Santos
ResourceBundle rb = ResourceBundle.getBundle(myApp.properties, new
Locale(en, EN));

Of course, you should use the same locale as your request.

--
Samuel Santos
http://www.samaxes.com/


On Wed, Apr 1, 2009 at 2:24 AM, Philip Constantinou 
pconstanti...@evernote.com wrote:

 Apache Commons configurations:

 http://commons.apache.org/configuration/howto_properties.html

 Is a really nice set of libraries that is a bit better than just using
 java.util.Properties. It's abstraction also makes it easier to change
 your mind about where you're putting your properties.

 If I remember correctly the reason for the URL is a legacy from the
 old applet days.

 It's no better than using the InputStream.


 On Mar 31, 2009, at 6:09 PM, AK wrote:

  On IRC I got the following suggestion for reading a properties file:
 
  URL aURL = getClass().getClassLoader().getResource(myApp.properties)
 
  The other suggestion I found online was:
 
  InputStream inStream =
  this.getClass().getClassLoader().getResourceAsStream
  (myApp.properties);
 
  Is there a preference or advantage of one way over the other?
 
 
 
 --
  ___
  Stripes-users mailing list
  Stripes-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/stripes-users



 --
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

--
___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] stripes.tld has problem with WebLogic 9.2 (bug?)

2008-11-11 Thread Samuel Santos
I also had problems with the stripes.tld when I place the stripes.jar in my
EAR root instead of the WEB-INF/lib of my WARs.

On Tue, Nov 11, 2008 at 4:53 AM, Lawrenz Rolf [EMAIL PROTECTED]wrote:

 I also had the same problem with WebLogic 10 and Stripes. I found the
 following worked for me:
 - Extract the stripes.tld file out of the stripes.jar and place in
 your project
 - Edit the stripes.tld file and remove the 2 function tags at the
 bottom of the file
 - in your jsps, reference your stripes.tld from your project, eg:
 [EMAIL PROTECTED] prefix=stripes uri=/tld/stripes.tld %



 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users




-- 
Samuel Santos
http://www.samaxes.com/
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


[Stripes-users] stripes:errors/

2008-11-05 Thread Samuel Santos
In my current application I need to show validation errors and global errors
in different places of my page.

The problem is that the tag stripes:errors/ has an attribute
globalErrorsOnly but not a validationErrorsOnly that I need.
I also would like to have different error messages (stripes.errors.*
properties) for the different type of errors (global vs validation).

Can this be included in the next 1.5.1 release?
Have I another way of doing this?

Cheers,

--
Samuel Santos
http://www.samaxes.com/
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Error pages

2008-10-30 Thread Samuel Santos
I will.Thanks Ben!

--
Samuel Santos
http://www.samaxes.com/


On Thu, Oct 30, 2008 at 5:37 PM, Ben Gunter [EMAIL PROTECTED] wrote:

 I think we got all those problems worked out with release 1.5. Let us know
 if you encounter any other issues like that.

 -Ben


 On Thu, Oct 30, 2008 at 1:25 PM, Samuel Santos [EMAIL PROTECTED] wrote:

 Thanks Ben,
 My configuration was:
 filter-mapping
 filter-nameStripesSecurityFilter/filter-name
 url-pattern*.jsp/url-pattern
 dispatcherREQUEST/dispatcher
 dispatcherINCLUDE/dispatcher
 /filter-mapping

 filter-mapping
 filter-nameStripesSecurityFilter/filter-name
 servlet-nameStripesDispatcher/servlet-name
 dispatcherREQUEST/dispatcher
 dispatcherFORWARD/dispatcher
 /filter-mapping

 adding dispatcherERROR/dispatcher fixes it!

 I remember that adding dispatcherINCLUDE/dispatcher to the
 StripesDispatcher was giving me some errors in a previous project, but I
 don't remember why anymore, maybe due to Sitemesh...

 --
 Samuel Santos
 http://www.samaxes.com/


 On Thu, Oct 30, 2008 at 4:55 PM, Ben Gunter [EMAIL PROTECTED] wrote:

 Do you have StripesFilter set up like this in web.xml?

 filter-mapping
  servlet-nameStripesDispatcher/servlet-name
  dispatcherREQUEST/dispatcher
  dispatcherFORWARD/dispatcher
  dispatcherINCLUDE/dispatcher
  dispatcherERROR/dispatcher
 /filter-mapping

 -Ben


 On Thu, Oct 30, 2008 at 11:58 AM, Samuel Santos [EMAIL PROTECTED]wrote:

 Hey,
 Usually I send HTTP errors to a .jsp page with no problem, example:
 error-page
 error-code400/error-code
 location/WEB-INF/error.jsp?httpError=400/location
 /error-page

 Now I'm trying to send the errors to an action, like:
 error-page
 error-code400/error-code
 location/Error.action?httpError=400/location
 /error-page

 But I get this error:
 15:50:31,297 ERROR [[localhost]] Exception Processing
 ErrorPage[errorCode=404, location=/Error.action?httpError=404]
 java.lang.IllegalStateException: A request made it through to some part
 of Stripes without being wrapped in a StripesRequestWrapper. The
 StripesFilter is responsible for wrapping the request, so it is likely that
 either the StripesFilter is not deployed, or that its mappings do not
 include the DispatcherServlet _and_ *.jsp. Stripes does not require that 
 the
 Stripes wrapper is the only request wrapper, or the outermost; only that it
 is present.

 My handler just forwards the user to the error page:
 @DefaultHandler
 public Resolution main() {
 return new ForwardResolution(/WEB-INF/error.jsp);
 }

 How can I fix it?
 Thanks

 --
 Samuel Santos
 http://www.samaxes.com/


 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the
 world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users



 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the
 world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users




 --
 Ben Gunter

 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users


-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Ajax Form Submit and validation

2008-10-28 Thread Samuel Santos
Yes Gregg you are right, this is not the best example to show. But this was
based on another example I had to give Stripes presentations which was using
Sitemesh to decorate the page.I think I'm too lazy to start a new one :)
But you can adapt it to whatever you want.

Regarding the width of the site, I'm again too lazy to change the Wordpress
theme I use :p

--
Samuel Santos
http://www.samaxes.com/


On Tue, Oct 28, 2008 at 11:17 PM, Gregg Bolinger [EMAIL PROTECTED]
 wrote:

 Samuel. Thanks for the link.  You aren't really doing the same thing I am
 doing though.  Your entire page is the form, table and all.  So when you
 display error messages, re-displaying the table is ok for you.  My form is
 separate from the table but on the same page.  If I am misunderstanding your
 code please let me know.

 On a side note, if you can you might consider changing the width of your
 article contents.  Having to scroll horizontally to see all the code isn't
 pleasant and you've got plenty of white space in your margins.  Maybe too
 much in the right margin?

 Gregg

 On Tue, Oct 28, 2008 at 6:04 PM, Samuel Santos [EMAIL PROTECTED] wrote:

 Hey Gregg,
 I'm doing exactly what you want in this example:
 http://www.samaxes.com/2008/10/23/stripes-and-jquery-ajax-forms-and-http-session-validation/
 .

 It maintains Stripes error messages as well as success messages.

 --
 Samuel Santos
 http://www.samaxes.com/



 On Tue, Oct 28, 2008 at 8:24 PM, Gregg Bolinger 
 [EMAIL PROTECTED] wrote:

 That's not a bad suggestion.  What I have currently works and it was easy
 so I'm probably not going to change it unless it starts giving me problems.
 But I'll keep this in mind just in case.


 On Tue, Oct 28, 2008 at 2:49 PM, Kai Grabfelder [EMAIL PROTECTED]wrote:

 Hi Gregg,

 why don't you override the sourcePageResolution in your ActionBean and
 set it to the jsp (fragment) you want
 to return by the ajax call?

 Regards

 Kai

 --- Original Nachricht ---
 Absender: Gregg Bolinger
 Datum: 28.10.2008 07:42
  Alright, so what I ended up doing is getting the form via ajax using
 load()
  rather than putting it on the page to begin with.  So problem solved.
  Thanks.
 
  Gregg
 
  On Tue, Oct 28, 2008 at 1:37 AM, Gregg Bolinger
  [EMAIL PROTECTED]wrote:
 
  Alright, so I moved the form into its own JSP and have included it on
 the
  page.  The form is submitted via ajax but when validation fails, it
 is
  returning the parent page as the sourcePageResolution, vs the JSP
 fragment
  (partial page).  I've tried jsp:include %@ include and c:import all
 with
  the same results.
 
  Any thoughts?
 
  Gregg
 
 
  On Tue, Oct 28, 2008 at 1:22 AM, Oscar Westra van Holthe - Kind 
  [EMAIL PROTECTED] wrote:
 
  On 28-10-2008 at 01:13, Gregg Bolinger wrote:
   Thanks Oscar.  It took me a bit of rereading to get what you were
 saying
  but
   it is really late here in the midwest. :)  I think the partial
 page
  thing
   will work.
 
  It could also be that it's kinda early here in europe. I wasn't
 fully
  awake
  yet. ;)
 
 
  Oscar
 
  --
,-_
   /() )  If it works, it must be obsolete
   (__ (-- Otto Date
  =/  ()
 
 
 -
  This SF.Net email is sponsored by the Moblin Your Move Developer's
  challenge
  Build the coolest Linux based applications with Moblin SDK  win
 great
  prizes
  Grand prize is a trip for two to an Open Source event anywhere in
 the
  world
  http://moblin-contest.org/redirect.php?banner_id=100url=/
  ___
  Stripes-users mailing list
  Stripes-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/stripes-users
 
 
 
 
 
 
 
 
 
 -
  This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
  Build the coolest Linux based applications with Moblin SDK  win great
 prizes
  Grand prize is a trip for two to an Open Source event anywhere in the
 world
  http://moblin-contest.org/redirect.php?banner_id=100url=/
 
 
 
 
 
  ___
  Stripes-users mailing list
  Stripes-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/stripes-users



 -
 This SF.Net email is sponsored by the Moblin Your Move Developer's
 challenge
 Build the coolest Linux based applications with Moblin SDK  win great
 prizes
 Grand prize is a trip for two to an Open Source event anywhere in the
 world
 http://moblin-contest.org/redirect.php?banner_id=100url=/
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users

[Stripes-users] Stripes and jQuery: AJAX forms and HTTP Session Validation

2008-10-23 Thread Samuel Santos
Hey all,
I've added an example inspired by the Stripes and jQuery AJAX
Formshttp://www.stripesbook.com/blog/index.php?/archives/3-Stripes-and-jQuery-AJAX-Forms.html
article from Freddy Daoud to my blog. You can find it
herehttp://www.samaxes.com/2008/10/23/stripes-and-jquery-ajax-forms-and-http-session-validation/
.
It has some nice improvements including a look upon a recurring question:
how to validate the user's HTTP session when using AJAX requests.

I've added it to
Digghttp://digg.com/programming/Stripes_and_jQuery_AJAX_forms_and_HTTP_Session_Validationand
DZonehttp://www.dzone.com/links/stripes_and_jquery_ajax_forms_and_http_session_va.html
.
I hope you can find it useful.

--
Samuel Santos
http://www.samaxes.com/
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Minor typo in website docs

2008-07-04 Thread Samuel Santos
Fixed. Thanks Alan

On Fri, Jul 4, 2008 at 11:15 AM, Alan Burlison [EMAIL PROTECTED]
wrote:

 http://www.stripesframework.org/display/stripes/Intercept+Execution

 SecurityInterceptor.java

 Resolution resolution = context.proceed();

 should be:

 Resolution resolution = ctx.proceed();

 --
 Alan Burlison
 --

 -
 Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
 Studies have shown that voting for your favorite open source project,
 along with a healthy diet, reduces your potential for chronic lameness
 and boredom. Vote Now at http://www.sourceforge.net/community/cca08
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users




-- 
Samuel Santos
http://www.samaxes.com/
-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] FileUploadLimitExceededException and Flashscope

2008-05-30 Thread Samuel Santos
Ben,

I know this is stupid but it wasn't working because it was being handled by
this AutoExceptionHandler:

public Resolution handle(Exception exception, HttpServletRequest
request, HttpServletResponse response) {
LOGGER.error(exception.getMessage(), exception);

return new ForwardResolution(/WEB-INF/error.jsp);
}

I use this method to catch any exception that doesn't need any special
treatment.

Commenting this handler and my FULEE AutoExceptionHandler it is indeed
handled by your FULEE handler.
The problem is that my pages aren't decorated (I'm using Sitemesh) when
forwarded by your FULEE handler.

For now I will stick with my AutoExceptionHandlers since my strategy needs a
default handler like the one above, but I think it's important to check this
issue with Sitemesh.

Regards,
Samuel


On Wed, May 28, 2008 at 2:41 PM, Ben Gunter [EMAIL PROTECTED] wrote:

 Samuel, I don't think we're on the same page. I added a FULEE handler to
 DefaultExceptionHandler, which is the superclass of
 DelegatingExceptionHandler. If you do not override the FULEE handler method
 in a subclass of DefaultExceptionHandler and you do not provide an
 AutoExceptionHandler that handles FULEE, then it will be handled by my code.
 If you do either of those things, then your exception handler will be
 responsible for FULEE.

 -Ben


 On Fri, May 23, 2008 at 11:29 PM, Samuel Santos [EMAIL PROTECTED] wrote:

 Hi Ben,

 Do you need more info on this? It still doesn't work for me with the
 latest revision.

 --
 Samuel


 On Thu, May 22, 2008 at 8:49 PM, Samuel Santos [EMAIL PROTECTED] wrote:

 Hi Ben, I haven't any other handler for FULEE.

 I use an alternative exception handler (which implements
 AutoExceptionHandler), so using my own exception handler does the Stripes
 DefaultExceptionHandler still handle FULEE? Don't I need to handle it in any
 way?

 The flow is as simple as it can be. The form that contains the file
 upload field is submitted to an action that validates the request and either
 insert it in the database and redirects to a listing page, or shows back the
 form with the validation error messages on it.

 --
 Samuel

 On Thu, May 22, 2008 at 2:46 PM, Ben Gunter [EMAIL PROTECTED] wrote:

  I'm a little baffled as to how this error is happening. Please make
 sure you have no other handlers registered for FULEE that might interfere
 with it. If it still doesn't work, please send me some code and an
 explanation of the flow so that I can try to reproduce it. Thanks!

 -Ben


 Samuel Santos wrote:

 Unfortunately it does not work:

 2008-05-22 02:13:40,259 ERROR [MyDefaultExceptionHandler] File post
 limit exceeded. Limit: 10485760 bytes. Posted: 16014419 bytes.
 net.sourceforge.stripes.controller.FileUploadLimitExceededException:
 File post limit exceeded. Limit: 10485760 bytes. Posted: 16014419 bytes.
 at
 net.sourceforge.stripes.controller.multipart.CommonsMultipartWrapper.build(CommonsMultipartWrapper.java:107)
 at
 net.sourceforge.stripes.controller.multipart.DefaultMultipartWrapperFactory.wrap(DefaultMultipartWrapperFactory.java:143)
 at
 net.sourceforge.stripes.controller.StripesRequestWrapper.constructMultipartWrapper(StripesRequestWrapper.java:119)
 at
 net.sourceforge.stripes.controller.StripesRequestWrapper.init(StripesRequestWrapper.java:105)
 at
 net.sourceforge.stripes.controller.StripesFilter.wrapRequest(StripesFilter.java:281)
 at
 net.sourceforge.stripes.controller.StripesFilter.doFilter(StripesFilter.java:230)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
 at
 com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
 at
 org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
 at
 org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at
 org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
 at
 org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
 at
 org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
 at
 org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
 at
 org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
 at
 org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127

Re: [Stripes-users] FileUploadLimitExceededException and Flashscope

2008-05-20 Thread Samuel Santos
/vse012070mrt/direct/01/
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users




-- 
Samuel Santos
http://www.samaxes.com/
-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] FileUploadLimitExceededException and Flashscope

2008-05-19 Thread Samuel Santos
Any on this issue?

I'm working with revision 910.


On Sun, May 18, 2008 at 3:17 AM, Samuel Santos [EMAIL PROTECTED] wrote:

 I use Stripes 1.5beta and the bug
 http://stripesframework.org/jira/browse/STS-402 still happens.

 Using Ben hack to handle the FileUploadLimitExceededException:
 public Resolution handle(FileUploadLimitExceededException exception,
 HttpServletRequest request,
 HttpServletResponse response) throws ServletException, IOException
 {
 /*
  * This is a hack from Ben Gunter received in the Stripes forum. It is
 related to Jira issue:
  * http://stripes.mc4j.org/jira/browse/STS-402. The problem is that
 when the exception handler is called, it
  * always receives the original request passed to the StripesFilter and
 not the wrapped request. That prevents
  * construction of the FlashScope in which we need to store the error
 message.
  */

 // start of hack
 // wrap the request without handling multipart data
 StripesRequestWrapper wrapper = new StripesRequestWrapper(request) {
 /**
  * Ignore multipart content and set the locale at the same time.
  *
  * @param request the HTTP request to wrap.
  */
 @Override
 protected void constructMultipartWrapper(HttpServletRequest
 request) throws StripesServletException {
 Locale locale =
 StripesFilter.getConfiguration().getLocalePicker().pickLocale(request);
 setLocale(locale);
 }
 };
 // end of hack

 // get referer URL
 URL referer = null;
 try {
 referer = new URL(request.getHeader(referer));
 } catch (Exception e) {
 throw exception;
 }

 // convert referer path to context-relative path
 String path = referer.getFile();
 String contextPath = request.getContextPath();
 if (contextPath.length()  0) {
 if (!path.startsWith(contextPath + /))
 throw exception;
 path = path.replace(contextPath, );
 }

 // create action bean and context
 Configuration config = StripesFilter.getConfiguration();
 PVoucherActionBeanContext context = (MyActionBeanContext)
 config.getActionBeanContextFactory()
 .getContextInstance(request, response);
 ActionBean actionBean =
 config.getActionResolver().getActionBean(context);

 // try to guess the field name
 String fieldName = ValidationErrors.GLOBAL_ERROR;
 try {
 BeanInfo beanInfo =
 Introspector.getBeanInfo(actionBean.getClass());
 for (PropertyDescriptor pd : beanInfo.getPropertyDescriptors()) {
 if (pd.getPropertyType().equals(FileBean.class)) {
 fieldName = pd.getName();
 break;
 }
 }
 } catch (Throwable t) {
 }

 // add validation error
 DecimalFormat format = new DecimalFormat(0.00);
 double max = (double) exception.getMaximum() / 1024;
 double posted = (double) exception.getPosted() / 1024;
 context.getValidationErrors().add(fieldName,
 new LocalizableError(error.file.too.large,
 format.format(max), format.format(posted)));

 // redirect back to referer
 return new RedirectResolution(path).flash(actionBean);
 }
 still crashes when flashing the action bean!

 Isn't there a better way to handle this exception with Stripes 1.5?

 Cheers,
 Samuel

 --
 Samuel Santos
 http://www.samaxes.com/




-- 
Samuel Santos
http://www.samaxes.com/
-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


[Stripes-users] FileUploadLimitExceededException and Flashscope

2008-05-17 Thread Samuel Santos
I use Stripes 1.5beta and the bug
http://stripesframework.org/jira/browse/STS-402 still happens.

Using Ben hack to handle the FileUploadLimitExceededException:
public Resolution handle(FileUploadLimitExceededException exception,
HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
/*
 * This is a hack from Ben Gunter received in the Stripes forum. It is
related to Jira issue:
 * http://stripes.mc4j.org/jira/browse/STS-402. The problem is that when
the exception handler is called, it
 * always receives the original request passed to the StripesFilter and
not the wrapped request. That prevents
 * construction of the FlashScope in which we need to store the error
message.
 */

// start of hack
// wrap the request without handling multipart data
StripesRequestWrapper wrapper = new StripesRequestWrapper(request) {
/**
 * Ignore multipart content and set the locale at the same time.
 *
 * @param request the HTTP request to wrap.
 */
@Override
protected void constructMultipartWrapper(HttpServletRequest request)
throws StripesServletException {
Locale locale =
StripesFilter.getConfiguration().getLocalePicker().pickLocale(request);
setLocale(locale);
}
};
// end of hack

// get referer URL
URL referer = null;
try {
referer = new URL(request.getHeader(referer));
} catch (Exception e) {
throw exception;
}

// convert referer path to context-relative path
String path = referer.getFile();
String contextPath = request.getContextPath();
if (contextPath.length()  0) {
if (!path.startsWith(contextPath + /))
throw exception;
path = path.replace(contextPath, );
}

// create action bean and context
Configuration config = StripesFilter.getConfiguration();
PVoucherActionBeanContext context = (MyActionBeanContext)
config.getActionBeanContextFactory()
.getContextInstance(request, response);
ActionBean actionBean =
config.getActionResolver().getActionBean(context);

// try to guess the field name
String fieldName = ValidationErrors.GLOBAL_ERROR;
try {
BeanInfo beanInfo = Introspector.getBeanInfo(actionBean.getClass());
for (PropertyDescriptor pd : beanInfo.getPropertyDescriptors()) {
if (pd.getPropertyType().equals(FileBean.class)) {
fieldName = pd.getName();
break;
}
}
} catch (Throwable t) {
}

// add validation error
DecimalFormat format = new DecimalFormat(0.00);
double max = (double) exception.getMaximum() / 1024;
double posted = (double) exception.getPosted() / 1024;
context.getValidationErrors().add(fieldName,
new LocalizableError(error.file.too.large, format.format(max),
format.format(posted)));

// redirect back to referer
return new RedirectResolution(path).flash(actionBean);
}
still crashes when flashing the action bean!

Isn't there a better way to handle this exception with Stripes 1.5?

Cheers,
Samuel

-- 
Samuel Santos
http://www.samaxes.com/
-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


[Stripes-users] JAAS forward problem

2008-05-13 Thread Samuel Santos
My application uses pt_PT as the default locale and en_US as an alternative.

Lets say the application's logged user has choose en_US in his profile and
the user machine has pt_PT as the default locale (that means that the VM
default locale is pt_PT).

Now the problem, imagine the following scenario:
I stay long enough in a page of my application so my session expires.
I press F5 to reload the page, this redirects me to the login page (JAAS).
When forwarded to the page I'd requested the locale has changed to the
default locale (pt_PT).
So I reload my page on more time (F5), and magic, the application returns to
en_US.

It seems that the forward caused by the authentication is not routed through
the Stripes filter (not passing through my LocalePicker).
How can this annoying behavior be fixed?

I am using JBoss 4.2.2 and Java 6.

My Stripes filter mapping:

filter-mapping
filter-nameStripesSecurityFilter/filter-name
url-pattern*.jsp/url-pattern
dispatcherREQUEST/dispatcher
dispatcherINCLUDE/dispatcher
/filter-mapping

filter-mapping
filter-nameStripesSecurityFilter/filter-name
servlet-nameStripesDispatcher/servlet-name
dispatcherREQUEST/dispatcher
dispatcherFORWARD/dispatcher
/filter-mapping


-- 
Samuel Santos
http://www.samaxes.com/
-
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Localization in JavaScripts

2008-04-05 Thread Samuel Santos
Hi Roland,

JSTL tags inside Stripes tags aren't evaluated, try this:

c:set var=myKey scope=pagefmt:message key=MY_KEY //c:set
s:submit onclick=return checkDelete('${pageScope.myKey}'); /

Cheers,
Samuel

On Sat, Apr 5, 2008 at 12:53 PM, Roland Bali [EMAIL PROTECTED] wrote:

 Hi,

 When a button is clicked I would like to call a JS method that takes a
 message
 parameter that is to be localized.

s:submit onclick=return checkDelete('Hello World!'); /

 What I would like to do is something like this, but this doesn't work:

s:submit onclick=return checkDelete('fmt:message key=MY_KEY/');
 /

 What is best practice for doing things like this?

 /Roland


 -
 This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
 Register now and save $200. Hurry, offer ends at 11:59 p.m.,
 Monday, April 7! Use priority code J8TLD2.

 http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
 ___
 Stripes-users mailing list
 Stripes-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/stripes-users




-- 
Samuel Santos
http://samaxes.com/
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Stripes and Sitemesh... again

2008-04-04 Thread Samuel Santos
Hello Iwao,

Thanks for answering.

In my web.xml I have error-page / elements to nearly all HTTP errors, this
doesn't change anything.

For issue #2 I've already tried the ERROR dispatcher but without success.

It seems that there isn't an elegant solution for this problem :(

Cheers,
Samuel

On Fri, Apr 4, 2008 at 7:02 AM, Iwao AVE! [EMAIL PROTECTED] wrote:

 Hi Samuel,

 Stripes does not throw 404 error automatically.
 The second url (/Home.action123) is not filtered by Stripes as you
 guessed.

 For the first url (/Home123.action), Stripes' DefaultExceptionHandler
 throws ServletException (status 500 IIRC).
 So you should add another error-page / element for error-code 500 to
 your web.xml.

 --
 For the issue #2, have you tried adding ERROR dispatcher to your JSP
 filter mapping?

 filter-mapping
 filter-nameStripesSecurityFilter/filter-name
 url-pattern*.jsp/url-pattern
 dispatcherREQUEST/dispatcher
 dispatcherINCLUDE/dispatcher
  dispatcherERROR/dispatcher
 /filter-mapping

 Regards,
 Iwao

 Samuel Santos wrote on 08.3.28 9:56 AM:
  I detected that some issues still persist in the last Stripes version
  (trunk) when working with Sitemesh.
 
  The best way to describe the issues is with some examples, which are
  hereinafter.
 
  In Sitemesh's /decorators.xml/ file I exclude my error page:
  excludes
  pattern/WEB-INF/error.jsp*/pattern
  [...]
  /excludes
 
  I've configured Sitemesh and Stripes filters like:
  [...]
  context-param
 
 param-namejavax.servlet.jsp.jstl.fmt.localizationContext/param-name
  param-valueStripesResources/param-value
  /context-param
 
  [...]
 
  filter
  filter-nameSitemesh/filter-name
 
 
 filter-classcom.opensymphony.module.sitemesh.filter.PageFilter/filter-class
  /filter
 
  filter
  description
  Provides essential configuration and request processing services
  for the Stripes framework.
  /description
  display-nameStripes Security Filter/display-name
  filter-nameStripesSecurityFilter/filter-name
 
 
 filter-classnet.sourceforge.stripes.security.controller.StripesSecurityFilter/filter-class
  [...]
  /filter
 
  filter-mapping
  filter-nameSitemesh/filter-name
  url-pattern*.action/url-pattern
  /filter-mapping
 
  filter-mapping
  filter-nameStripesSecurityFilter/filter-name
  url-pattern*.jsp/url-pattern
  dispatcherREQUEST/dispatcher
  dispatcherINCLUDE/dispatcher
  /filter-mapping
 
  filter-mapping
  filter-nameStripesSecurityFilter/filter-name
  servlet-nameStripesDispatcher/servlet-name
  dispatcherREQUEST/dispatcher
  dispatcherFORWARD/dispatcher
  /filter-mapping
 
  servlet
  servlet-nameStripesDispatcher/servlet-name
 
 
 servlet-classnet.sourceforge.stripes.controller.DispatcherServlet/servlet-class
  load-on-startup1/load-on-startup
  /servlet
 
  servlet-mapping
  servlet-nameStripesDispatcher/servlet-name
  url-pattern*.action/url-pattern
  /servlet-mapping
 
  [...]
 
  error-page
  error-code404/error-code
  location/WEB-INF/error.jsp?httpError=404/location
  /error-page
  [...]
  (I'm not mapping *.jsp files in Sitemesh but the result is exactly the
  same.)
 
  Now, issue #1.
  When some exceptions are throw, the error page is decorated by Sitemesh
  despite the fact that I've excluded it in the /decorators.xml/ file.
 
  Example:
  If I try to call an action that doesn't exist, let's say /Home123.action
  I get the following error:
  ERROR [DefaultExceptionHandler] Could not locate an ActionBean that is
  bound to the URL [/Home123.action]. Commons reasons for this include
  mis-matched URLs and forgetting to implement ActionBean in your class.
  Registered ActionBeans are: [...]
  and the page is decorator by Sitemesh, but if I call /Home.action123 I'm
  forwarded to the error page with a 404 error and the page isn't
  (correctly) decorated by Sitemesh.
 
  A solution for this but a very ugly workaround is to do:
  c:choose
  c:when test=${empty requestScope.__sitemesh__filterapplied}
  [...]
  /c:when
  c:otherwise
  [...]
  /c:otherwise
  /c:choose
  Any suggestion?
 
  Ok, now issue #2.
  Taking the example of the 404 error. The error description showed in the
  error page is in the wrong Locale, probably because the request isn't
  being filtered by Stripes filter.
  Another very ugly solution for this is to make the error description
  external and include it with c:import, note the
  dispatcherINCLUDE/dispatcher in the *.jsp mapping.
 
  Any clean solutions for this?
 
  Cheers
 
  --
  Samuel Santos
  http://samaxes.com/


 -
 Check out the new SourceForge.net Marketplace.
 It's the best place to buy or sell services for
 just about anything Open Source.

 http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
 ___
 Stripes-users mailing list