Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 24 Jul 2008 14:49:54 -0000 Issue 8157

user-digest-help

2008-07-24


Author LoginPost Reply

user Digest 24 Jul 2008 14:49:54 -0000 Issue 8157

Topics (messages 189252 through 189275):

Re: S2 REST plugin
 189252 by: Jeromy Evans
 189256 by: Mike Watson
 189257 by: Jeromy Evans
 189264 by: Mike Watson

how to fix Validation isses in a wizard application + Train
 189253 by: ravi_eze

website link info
 189254 by: Fini Decima
 189258 by: Jeromy Evans

Re: [S2] i18n messages, Tiles2 l10n, "default" locale, and browser preferences.
 189255 by: Antonio Petrelli

Configuration in the loading of the application
 189259 by: OTA_DZ
 189260 by: Antonio Petrelli

sorting problem with display tag: please help
 189261 by: Varun Deep
 189263 by: Al Sutton

Re : Configuration in the loading of the application
 189262 by: OTA_DZ

Re: Unit testing Struts2 + Spring application?
 189265 by: Jukka Välimaa
 189269 by: Norris Shelton

Re: [s2] Formatting input textfields
 189266 by: John Koutros
 189267 by: Milan Milanovic

Re: What is the best way to handle cancel, Update, Back Buttons in Struts2
 189268 by: Jishnu Viswanath

[s2] Making textfield input optional
 189270 by: Milan Milanovic
 189272 by: Gabriel Belingueres
 189273 by: Jim Kiley
 189274 by: Milan Milanovic
 189275 by: Milan Milanovic

[s2] How to force validation to combobox field
 189271 by: Milan Milanovic

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)

----------------------------------------------------------------------

Attachment: user_189252.ezm (zipped)
Mike Watson wrote:
> Hi folks,
>
> As mentioned in previous posts I'm using the REST plugin to serve
> images and everything seems to work fine when the content exists.
>
> However if I return an empty inputstream to StreamResult with a 404
> response code I get the exception below.
> Stepping through the code the getBufferSize() method on my controller
> is definitely called and returns a legitimate value...
>  

Does this only occur when you return a null or 0 buffer size?

My guess is that it's a bug in the StreamResult or the result handler.
It probably evaluates "${bufferSize}" and deduces that the property
doesn't exist (because it's null/0) and uses it as a literal string
value instead. That's just a guess.

Is it really valid to return a zero length stream result? I would
instead return a http status result with 404 / NullResult for the error
case (ie. just headers, no content).



Attachment: user_189256.ezm (zipped)
What I actually return is a DefaultHttpHeaders with a 404 set.
getImage() returns an empty (not null) inputstream since there's no
content for the body.

I'll do some debugging when I get time and see where it's failing. It
certainly seems to be StreamResult that has the issue.

Thanks

Mike

2008/7/24 Jeromy Evans <jeromy.evans@(protected)>:
> Mike Watson wrote:
>>
>> Hi folks,
>>
>> As mentioned in previous posts I'm using the REST plugin to serve
>> images and everything seems to work fine when the content exists.
>>
>> However if I return an empty inputstream to StreamResult with a 404
>> response code I get the exception below.
>> Stepping through the code the getBufferSize() method on my controller
>> is definitely called and returns a legitimate value...
>>
>
> Does this only occur when you return a null or 0 buffer size?
>
> My guess is that it's a bug in the StreamResult or the result handler. It
> probably evaluates "${bufferSize}" and deduces that the property doesn't
> exist (because it's null/0) and uses it as a literal string value instead.
> That's just a guess.
>
> Is it really valid to return a zero length stream result? I would instead
> return a http status result with 404 / NullResult for the error case (ie.
> just headers, no content).
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_189257.ezm (zipped)
Mike Watson wrote:
> What I actually return is a DefaultHttpHeaders with a 404 set.
> getImage() returns an empty (not null) inputstream since there's no
> content for the body.
>
>  

You may need to return a different result type for the error case
(HttpHeaderResult or NullResult) so it only attempts to set the headers
though.


Attachment: user_189264.ezm (zipped)
Thanks mate. I'll give that a try tomorrow.

2008/7/24 Jeromy Evans <jeromy.evans@(protected)>:
> Mike Watson wrote:
>>
>> What I actually return is a DefaultHttpHeaders with a 404 set.
>> getImage() returns an empty (not null) inputstream since there's no
>> content for the body.
>>
>>
>
> You may need to return a different result type for the error case
> (HttpHeaderResult or NullResult) so it only attempts to set the headers
> though.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_189253.ezm (zipped)

hi,

The issue:

1. We have implemented a wizard application (with 4 Steps) with action
variables maintained in session.
2. The pages also have train in the top, i.e. from any step he can jump to
any of the other steps.
3. The Step1, 2,3,4 (mentioned above ) are interdependent i.e. based on
selection in step 1 step 2 is influenced; based on selection in step 2 step
3 is influenced and so on

4. Now: In step 1 user entered wrong value (10000 say) for integer field
which is not allowed by validations. He clicks on save and page throws
validation exceptions (Expected)
5. He then clicks on train 2 i.e. he is jumping to page 2
6. The page is being displayed based on the incorrect value (100000) which
was rejected by validation of first page. If i use the train again and go
back to the 1st step i still see 10000 there

7. Question: When validation error happens aren't the action variable values
restored to the previous once?(say the prev once is 10 or 0 i think they
should be reset to 10 or 0 when system throws error at 10000). Is there any
way in which this can happen?

is there any way to call an interceptor/ execute a method after the JSP is
rendered? so that i can restore variables back incase of validation errors.

Please help.

cheers,
ravi



--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_189254.ezm (zipped)
I'm posting here because I could not find a Web Master contact info:

I'll like to know when the "Reporting Security Issues" link was added to
the Struts home page.The link is under "Support". Is it a recent
addition or has it been there for some time?

Thanks,


Attachment: user_189258.ezm (zipped)
Fini Decima wrote:
> I'm posting here because I could not find a Web Master contact info:
>
> I'll like to know when the "Reporting Security Issues" link was added
> to the Struts home page.The link is under "Support". Is it a recent
> addition or has it been there for some time?

Subversion shows the link and page were added on 27 August 2007.


Attachment: user_189255.ezm (zipped)
Pierre,
about the Tiles part, I suggest to ask this question at Tiles Users
mailing list:
http://tiles.apache.org/mail.html
For the rest, see comments inline.

2008/7/23 Pierre Thibaudeau <pierre.thibaudeau@(protected)>:
> Using Struts 2.1.2
> My browser (Firefox 3) has a prefered locale (and only one): fr_CA
> Struts2 constant: struts.locale=en_US
>
> I use i18n throughout the software.
> There is a "default" resource (whose content happens to be in
> English): ApplicationResource.properties.
> There are also resource bundles in 4 languages:
>  ApplicationResources_fr.properties,
>  ApplicationResources_it.properties,
>  ApplicationResources_de.properties,
>  ApplicationResources_es.properties.
>
> Until last week, there was no English resource file (since the default
> one was taking care of it).
> That strategy worked perfectly in Struts1, but it seems that in
> Struts2, the system has a mind of its own:
> given my browser's preference, the default bundle (on my system) seems
> to be ApplicationResources_fr.properties insteand of
> ApplicationResources.properties...

This is a bug:
https://issues.apache.org/struts/browse/WW-2345

Antonio

Attachment: user_189259.ezm (zipped)

Hi,
I’m new in Struts 2 and I want to do some configuration (log4j, DataBase,…)
in the loading of my application. In Struts 1 I use an implementation of
PlugIn and do these configurations in init() method. Could you please help
me?
Best Regards,

OTA_DZ.

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_189260.ezm (zipped)
2008/7/24 OTA_DZ <kouicin@(protected)>:
>
> Hi,
> I'm new in Struts 2 and I want to do some configuration (log4j, DataBase,…)
> in the loading of my application. In Struts 1 I use an implementation of
> PlugIn and do these configurations in init() method. Could you please help
> me?

You can use a ServletContextListener:
http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContextListener.html
Obviously you have to configure it in web.xml:
http://www.java-tips.org/java-ee-tips/java-servlet/how-to-work-with-servletcontextlistener.html

HTH
Antonio

Attachment: user_189261.ezm (zipped)
Hi

I am using the display tag for displaying the employee names . I want to
short the names of the employee.

Following is the code that is in .jsp file.

<%@(protected)"%>

<display:table id="displaycolumn" name="listOfEmployee"
   pagesize="6" requestURI="searchEmployeeByDep.action"
   decorator="com.unclejis.action.restaurant.DisplayDecorator"
    align="left" sort="external" defaultsort="1" >

   <display:column property="name" title="Name" sortable="true" />
</display:table>



when I use the above code nothing is display. Can anyone please help me
to solve this problem. I will be vary thankful.

Thanks in advance
varun

Attachment: user_189263.ezm (zipped)
As there are no struts tags you should post this to the displaytag list
for a better response;

http://displaytag.sourceforge.net/11/mail-lists.html


Varun Deep wrote:
> Hi
>
> I am using the display tag for displaying the employee names . I want to
> short the names of the employee.
>
> Following is the code that is in .jsp file.
>
> <%@(protected)"%>
>
> <display:table id="displaycolumn" name="listOfEmployee"
>     pagesize="6" requestURI="searchEmployeeByDep.action"
>     decorator="com.unclejis.action.restaurant.DisplayDecorator"
>      align="left" sort="external" defaultsort="1" >
>
>     <display:column property="name" title="Name" sortable="true" />
> </display:table>
>
>
>
> when I use the above code nothing is display. Can anyone please help me
> to solve this problem. I will be vary thankful.
>
> Thanks in advance
> varun
>
>  


Attachment: user_189262.ezm (zipped)
Thank your. It works now :)
Best Regards,



----- Message d'origine ----
De : Antonio Petrelli <antonio.petrelli@(protected)>
À : Struts Users Mailing List <user@(protected)>
Envoyé le : Jeudi, 24 Juillet 2008, 9h20mn 54s
Objet : Re: Configuration in the loading of the application

2008/7/24 OTA_DZ <kouicin@(protected)>:
>
> Hi,
> I'm new in Struts 2 and I want to do some configuration (log4j, DataBase,…)
> in the loading of my application. In Struts 1 I use an implementation of
> PlugIn and do these configurations in init() method. Could you please help
> me?

You can use a ServletContextListener:
http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContextListener.html
Obviously you have to configure it in web.xml:
http://www.java-tips.org/java-ee-tips/java-servlet/how-to-work-with-servletcontextlistener.html

HTH
Antonio

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)


   _____________________________________________________________________________
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr

Attachment: user_189265.ezm (zipped)
Check out Appfuse <http://appfuse.org/display/APF/AppFuse+QuickStart>,
Struts 2 Modular version. It has this kind of setup

2008/7/23 Paweł Wielgus <poulwiel@(protected)>:

> Hi Joachim,
> isn't StrutsTestCase for Struts 1.x ?
>
> Best regards,
> Paweł Wielgus.
>
> On 23/07/2008, Joachim Ansorg <jansorg@(protected):
> > Hi,
> > I'm working on a Struts2 application which uses Spring as factory.
> > I'm using Struts 2.1 and Spring 2.5.
> >
> > The problem is for me that
> >   - I don't know how to use StrutsTestCase so the created action are
> > spring-wired
> >   - How to make the tests use my /WEB-INF/struts.xml file as Struts
> > configuration
> >
> > Does anybody have this kind of setup working? If yes, are there any
> tricks
> > to do that?
> >
> > Thanks a lot,
> > Joachim
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>

Attachment: user_189269.ezm (zipped)
Take a look at this. This is set-up for Maven. I had to copy my /WEB-INF/applicationResources.xml to test/resources/



package mil.army.usarec.ars.techdemo;

import static org.junit.Assert.*;
import org.junit.*;
import org.junit.runner.*;
import org.springframework.beans.factory.annotation.*;
import org.springframework.test.context.*;
import org.springframework.test.context.junit4.*;

/**
* DemoAction Tester.
* @author SheltonN
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"/applicationContext-test.xml"})
public class DemoActionTest {

  @Autowired
  private SomeService someService = null;


  /**
  * Tester for Method: demoForm().
  */
  @Test
  public void testDemoForm() throws Exception {
    assertNotNull("SomeService was not injected by Spring", someService);
    assertEquals("some other value", someService.getSomethingElse());
  }
}





----- Original Message ----
From: Jukka Välimaa <valimaa.jukka@(protected)>
To: Struts Users Mailing List <user@(protected)>
Sent: Thursday, July 24, 2008 7:23:59 AM
Subject: Re: Unit testing Struts2 + Spring application?

Check out Appfuse <http://appfuse.org/display/APF/AppFuse+QuickStart>,
Struts 2 Modular version. It has this kind of setup

2008/7/23 Paweł Wielgus <poulwiel@(protected)>:

> Hi Joachim,
> isn't StrutsTestCase for Struts 1.x ?
>
> Best regards,
> Paweł Wielgus.
>
> On 23/07/2008, Joachim Ansorg <jansorg@(protected):
> > Hi,
> > I'm working on a Struts2 application which uses Spring as factory.
> > I'm using Struts 2.1 and Spring 2.5.
> >
> > The problem is for me that
> >   - I don't know how to use StrutsTestCase so the created action are
> > spring-wired
> >   - How to make the tests use my /WEB-INF/struts.xml file as Struts
> > configuration
> >
> > Does anybody have this kind of setup working? If yes, are there any
> tricks
> > to do that?
> >
> > Thanks a lot,
> > Joachim
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>




Attachment: user_189266.ezm (zipped)
package util;

import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.ParseException;
import java.util.Map;

import org.apache.struts2.util.StrutsTypeConverter;

import com.opensymphony.xwork2.util.TypeConversionException;


public class CurrencyBigDecimalConverter extends StrutsTypeConverter {

 @SuppressWarnings("unchecked")
 @Override
 public Object convertFromString(Map contextMap, String[] values, Class toClass) {
   BigDecimal result = null;
   if (values != null) {
     if (values.length != 1) {
       super.performFallbackConversion(context, values, toClass);
     }
     
     if (values.length > 0) {
       NumberFormat formater = new DecimalFormat("#,##0.00");
       try{
         Number tmpResult = formater.parse(values[0]);
         result = new BigDecimal(tmpResult.doubleValue());
       } catch (ParseException e) {   }
       
       if (result == null) {
            throw new TypeConversionException("Invalid number format: "+values[0]);
         }
     }
     
     
   }
   
   return result;
 }

 @SuppressWarnings("unchecked")
 @Override
 public String convertToString(Map contextMap, Object objectValue) {
   if(objectValue instanceof BigDecimal){
     NumberFormat formater = new DecimalFormat("#,##0.00");
     
     BigDecimal value = (BigDecimal) objectValue;
     return formater.format(value);
   }
   else{
     return null;
   }

 }

}

-----Original Message-----
From: Milan Milanovic [mailto:milanmilanovich@(protected)]
Sent: Wednesday, July 23, 2008 1:02 PM
To: user@(protected)
Subject: Re: [s2] Formatting input textfields


Hi,

could you give here your source code for that converter ?

--
Thx, Milan


aretobios wrote:
>
> I had the same problem. I solved it by creating a custom type conversion
> for bigdecimal fields.
>
> Take a look
> http://struts.apache.org/2.0.11.2/docs/type-conversion.html#TypeConversion-ApplyingaTypeConverterforanapplication
> here
>
> By creating your own converter you can have fields were the user write
> number with the #.###,## format and the bigdecimals are displayed with the
> same format
>
>>
>> Hi,
>>
>> I need to format input in textfields that user can enter value like this:
>> 204,05, but now it is like this 204.05.
>> I have defined this formatting for output already. How can I change this
>> ?
>>
>> --
>> Thx, Milan
>> --
>> View this message in context:
>> http://www.nabble.com/-s2--Formatting-input-textfields-tp18593985p18593985.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> John Koutros
> Technology
>
> PROTONBANK
> 20 Amaliados & Eslin Str., 115 23 Athens, Greece
> Tel.: +30 210 6970677, +30 211 1081677
> Mob.: +30 693 6104677 FAX: +30 210 90025299
> eMail: j.koutros@(protected)
>
> --------------------------------------------------------
>
>
> This message may contain confidential information and is intended only for
> the individual named. If you are not the named addressee you should not
> disseminate, distribute, alter or copy this e-mail. Please notify the
> sender immediately by e-mail if you have received this e-mail by mistake
> and then delete this e-mail from your system. E-mail transmissions cannot
> be guaranteed to be secure, or error-free or virus-free. Any liability for
> all the above is excluded to the fullest extent permitted by law.
>
> Αυτό το μήνυμα πιθανόν να περιέχει εμπιστευτικές πληροφορίες και
> προορίζεται μόνο για το άτομο που κατονομάζεται. Εάν δεν είστε ο
> κατονομαζόμενος παραλήπτης, δεν πρέπει να διαδώσετε, να διανείμετε, να
> αλλάξετε ή να αντιγράψετε αυτό το ηλεκτρονικό μήνυμα. Παρακαλώ ειδοποιήστε
> τον αποστολέα αμέσως με ηλεκτρονικό ταχυδρομείο εάν έχετε λάβει αυτό το
> ηλεκτρονικό μήνυμα από λάθος και εν συνεχεία διαγράψτε το από το σύστημά
> σας. Η μετάδοση μέσω ηλεκτρονικού ταχυδρομείου δεν παρέχει εγγυήσεις ως
> προς την ασφάλεια, την έλλειψη λαθών ή τη μετάδοση ιών. Οποιαδήποτε ευθύνη
> σχετικά με τα ανωτέρω αποκλείεται κατά το μέγιστο δυνατό μέτρο που
> επιτρέπει ο νόμος.
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)



Attachment: user_189267.ezm (zipped)

Hi John,

Great, thank you VERY much!

--
Regards, Milan


John Koutros wrote:
>
> package util;
>
> import java.math.BigDecimal;
> import java.text.DecimalFormat;
> import java.text.NumberFormat;
> import java.text.ParseException;
> import java.util.Map;
>
> import org.apache.struts2.util.StrutsTypeConverter;
>
> import com.opensymphony.xwork2.util.TypeConversionException;
>
>
> public class CurrencyBigDecimalConverter extends StrutsTypeConverter {
>
>  @SuppressWarnings("unchecked")
>  @Override
>  public Object convertFromString(Map contextMap, String[] values, Class
> toClass) {
>    BigDecimal result = null;
>    if (values != null) {
>      if (values.length != 1) {
>        super.performFallbackConversion(context, values, toClass);
>      }
>      
>      if (values.length > 0) {
>        NumberFormat formater = new DecimalFormat("#,##0.00");
>        try{
>          Number tmpResult = formater.parse(values[0]);
>          result = new BigDecimal(tmpResult.doubleValue());
>        } catch (ParseException e) {   }
>        
>        if (result == null) {
>             throw new TypeConversionException("Invalid number format:
> "+values[0]);
>          }
>      }
>      
>      
>    }
>    
>    return result;
>  }
>
>  @SuppressWarnings("unchecked")
>  @Override
>  public String convertToString(Map contextMap, Object objectValue) {
>    if(objectValue instanceof BigDecimal){
>      NumberFormat formater = new DecimalFormat("#,##0.00");
>      
>      BigDecimal value = (BigDecimal) objectValue;
>      return formater.format(value);
>    }
>    else{
>      return null;
>    }
>
>  }
>
> }
>
> -----Original Message-----
> From: Milan Milanovic [mailto:milanmilanovich@(protected)]
> Sent: Wednesday, July 23, 2008 1:02 PM
> To: user@(protected)
> Subject: Re: [s2] Formatting input textfields
>
>
> Hi,
>
> could you give here your source code for that converter ?
>
> --
> Thx, Milan
>
>
> aretobios wrote:
>>
>> I had the same problem. I solved it by creating a custom type conversion
>> for bigdecimal fields.
>>
>> Take a look
>> http://struts.apache.org/2.0.11.2/docs/type-conversion.html#TypeConversion-ApplyingaTypeConverterforanapplication
>> here
>>
>> By creating your own converter you can have fields were the user write
>> number with the #.###,## format and the bigdecimals are displayed with
>> the
>> same format
>>
>>>
>>> Hi,
>>>
>>> I need to format input in textfields that user can enter value like
>>> this:
>>> 204,05, but now it is like this 204.05.
>>> I have defined this formatting for output already. How can I change this
>>> ?
>>>
>>> --
>>> Thx, Milan
>>> --
>>> View this message in context:
>>> http://www.nabble.com/-s2--Formatting-input-textfields-tp18593985p18593985.html
>>> Sent from the Struts - User mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>>> For additional commands, e-mail: user-help@(protected)
>>>
>>>
>>
>>
>> John Koutros
>> Technology
>>
>> PROTONBANK
>> 20 Amaliados & Eslin Str., 115 23 Athens, Greece
>> Tel.: +30 210 6970677, +30 211 1081677
>> Mob.: +30 693 6104677 FAX: +30 210 90025299
>> eMail: j.koutros@(protected)
>>
>> --------------------------------------------------------
>>
>>
>> This message may contain confidential information and is intended only
>> for
>> the individual named. If you are not the named addressee you should not
>> disseminate, distribute, alter or copy this e-mail. Please notify the
>> sender immediately by e-mail if you have received this e-mail by mistake
>> and then delete this e-mail from your system. E-mail transmissions cannot
>> be guaranteed to be secure, or error-free or virus-free. Any liability
>> for
>> all the above is excluded to the fullest extent permitted by law.
>>
>> Αυτό το μήνυμα πιθανόν να περιέχει εμπιστευτικές πληροφορίες και
>> προορίζεται μόνο για το άτομο που κατονομάζεται. Εάν δεν είστε ο
>> κατονομαζόμενος παραλήπτης, δεν πρέπει να διαδώσετε, να διανείμετε, να
>> αλλάξετε ή να αντιγράψετε αυτό το ηλεκτρονικό μήνυμα. Παρακαλώ
>> ειδοποιήστε
>> τον αποστολέα αμέσως με ηλεκτρονικό ταχυδρομείο εάν έχετε λάβει αυτό το
>> ηλεκτρονικό μήνυμα από λάθος και εν συνεχεία διαγράψτε το από το σύστημά
>> σας. Η μετάδοση μέσω ηλεκτρονικού ταχυδρομείου δεν παρέχει εγγυήσεις ως
>> προς την ασφάλεια, την έλλειψη λαθών ή τη μετάδοση ιών. Οποιαδήποτε
>> ευθύνη
>> σχετικά με τα ανωτέρω αποκλείεται κατά το μέγιστο δυνατό μέτρο που
>> επιτρέπει ο νόμος.
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/-s2--Formatting-input-textfields-tp18593985p18607495.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_189268.ezm (zipped)
Did you try <s:submit ?

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-----Original Message-----
From: hisameer [mailto:cool_sameer_for_u@(protected)]
Sent: Thursday, July 24, 2008 3:54 AM
To: user@(protected)
Subject: What is the best way to handle cancel, Update, Back Buttons in
Struts2


Hello Everyone

I know this might be very easy for you guys but it is being difficult
for
me.:working:

I am developing an updateUser.jsp page and it has three buttons those
are:
Update, Cancel, Back
Now if I press update it should invoke the updateUser action mapping
also I
need to do the validation first before I do something else. If Cancel is
pressed the previous values which was already there in the field should
be
displayed and when I press Back button it should not do anything just go
to
my userList page.

So I am not able to understand how should I handle the struts.xml and
the
jsp code. I know I can use built in validator framework and by defining
the
validation.xml file for those fields but whenever I cancel or go Back
the
error message appears in the page so I don't know how should I handle
this
thing.

Please tell me the best way from your experience how should I handle
this
kind of situation.

Thanks for the help in advance!
--
http://www.nabble.com/What-is-the-best-way-to-handle-cancel%2C-Update%2C
-Back-Buttons-in-Struts2-tp18621308p18621308.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

Any comments or statements made in this email are not necessarily those of Tavant Technologies.
The information transmitted is intended only for the person or entity to which it is addressed and may
contain confidential and/or privileged material. If you have received this in error, please contact the
sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies
may be subject to our monitoring procedures.


Attachment: user_189270.ezm (zipped)

Hi,

I have one form with multiple textfields, and I want to one of that
textfield be optional for user, i.e., he doesn't need to enter information
in that particular field. Now, when user don't enter I get this in my log:

ERROR com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 -
ParametersInterceptor - [setParameters]: Unexpected Exception caught setting
'inValue' on 'class com.myProject.action.ViewAction: Error setting
expression 'inValue' with value '[Ljava.lang.String;@(protected)'

How can I enable this but without getting this error ?

--
Thx, Milan
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_189272.ezm (zipped)
Which is the data type of inValue?

2008/7/24 Milan Milanovic <milanmilanovich@(protected)>:
>
> Hi,
>
> I have one form with multiple textfields, and I want to one of that
> textfield be optional for user, i.e., he doesn't need to enter information
> in that particular field. Now, when user don't enter I get this in my log:
>
> ERROR com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 -
> ParametersInterceptor - [setParameters]: Unexpected Exception caught setting
> 'inValue' on 'class com.myProject.action.ViewAction: Error setting
> expression 'inValue' with value '[Ljava.lang.String;@(protected)'
>
> How can I enable this but without getting this error ?
>
> --
> Thx, Milan
> --
> View this message in context: http://www.nabble.com/-s2--Making-textfield-input-optional-tp18632806p18632806.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_189273.ezm (zipped)
Doesn't that exception usually get thrown when, in this case, ViewAction
doesn't have a setInValue() method?

jk

On Thu, Jul 24, 2008 at 10:31 AM, Gabriel Belingueres <belingueres@(protected)>
wrote:

> Which is the data type of inValue?
>
> 2008/7/24 Milan Milanovic <milanmilanovich@(protected)>:
> >
> > Hi,
> >
> > I have one form with multiple textfields, and I want to one of that
> > textfield be optional for user, i.e., he doesn't need to enter
> information
> > in that particular field. Now, when user don't enter I get this in my
> log:
> >
> > ERROR com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 -
> > ParametersInterceptor - [setParameters]: Unexpected Exception caught
> setting
> > 'inValue' on 'class com.myProject.action.ViewAction: Error setting
> > expression 'inValue' with value '[Ljava.lang.String;@(protected)'
> >
> > How can I enable this but without getting this error ?
> >
> > --
> > Thx, Milan
> > --
> > View this message in context:
> http://www.nabble.com/-s2--Making-textfield-input-optional-tp18632806p18632806.html
> > Sent from the Struts - User mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--
Jim Kiley
Technical Consultant | Summa
[p] 412.258.3346 [m] 412.445.1729
http://www.summa-tech.com

Attachment: user_189274.ezm (zipped)

Hi Gabriel,

it is a BigDecimal.

--
Thx, Milan


Gabriel Belingueres-2 wrote:
>
> Which is the data type of inValue?
>
> 2008/7/24 Milan Milanovic <milanmilanovich@(protected)>:
>>
>> Hi,
>>
>> I have one form with multiple textfields, and I want to one of that
>> textfield be optional for user, i.e., he doesn't need to enter
>> information
>> in that particular field. Now, when user don't enter I get this in my
>> log:
>>
>> ERROR com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 -
>> ParametersInterceptor - [setParameters]: Unexpected Exception caught
>> setting
>> 'inValue' on 'class com.myProject.action.ViewAction: Error setting
>> expression 'inValue' with value '[Ljava.lang.String;@(protected)'
>>
>> How can I enable this but without getting this error ?
>>
>> --
>> Thx, Milan
>> --
>> View this message in context:
>> http://www.nabble.com/-s2--Making-textfield-input-optional-tp18632806p18632806.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_189275.ezm (zipped)

Hi Jim,

no, I have that method.

--
Thx, Milan


Jim Kiley wrote:
>
> Doesn't that exception usually get thrown when, in this case, ViewAction
> doesn't have a setInValue() method?
>
> jk
>
> On Thu, Jul 24, 2008 at 10:31 AM, Gabriel Belingueres
> <belingueres@(protected)>
> wrote:
>
>> Which is the data type of inValue?
>>
>> 2008/7/24 Milan Milanovic <milanmilanovich@(protected)>:
>> >
>> > Hi,
>> >
>> > I have one form with multiple textfields, and I want to one of that
>> > textfield be optional for user, i.e., he doesn't need to enter
>> information
>> > in that particular field. Now, when user don't enter I get this in my
>> log:
>> >
>> > ERROR com.opensymphony.xwork2.interceptor.ParametersInterceptor:204 -
>> > ParametersInterceptor - [setParameters]: Unexpected Exception caught
>> setting
>> > 'inValue' on 'class com.myProject.action.ViewAction: Error setting
>> > expression 'inValue' with value '[Ljava.lang.String;@(protected)'
>> >
>> > How can I enable this but without getting this error ?
>> >
>> > --
>> > Thx, Milan
>> > --
>> > View this message in context:
>> http://www.nabble.com/-s2--Making-textfield-input-optional-tp18632806p18632806.html
>> > Sent from the Struts - User mailing list archive at Nabble.com.
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@(protected)
>> > For additional commands, e-mail: user-help@(protected)
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>>
>
>
> --
> Jim Kiley
> Technical Consultant | Summa
> [p] 412.258.3346 [m] 412.445.1729
> http://www.summa-tech.com
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_189271.ezm (zipped)

Hi,

does anyone know how I can force user to choose value from a combo box by
using S2 validation ?
Now, when he submit the form combobox is empty and the next time when he
submit error my occur if he don't choose anything from combox box.

--
Thx, Milan
--
Sent from the Struts - User mailing list archive at Nabble.com.

©2008 gg3721.com - Jax Systems, LLC, U.S.A.