Re: Validation Framework

2007-03-14 Thread Balazs Michnay
Thanks guys, now it perfectly works. As a conclusion, most of the online articles on how to use the validation framework work just fine, but they all missed the validate=true attribute. Besides this, I had a wrong value of my action's input attribute. Thanks again, you are very helpful.

Re: Validation on java.util.List

2007-03-14 Thread Alex Wibowo
Hi Dave, I came up with my own solution. Basically I wrote a method that I called manually (i.e. I didnt use expressionvalidator annotation).. in that method, i perform the check myself. If there was any error, I did addFieldError(customers[index], getText(some.text.from.properties.file ));

Re: Global messages.jsp file included in a SiteMesh decorator

2007-03-14 Thread Guillaume Carré
2007/3/14, mraible [EMAIL PROTECTED]: I have a messages.jsp[1] that's included (using %@ include file=/common/messages.jsp %) in my default decorator. This file has a couple of calls to the valueStack - namely hasActionErrors() and hasFieldErrors(). This worked fine in WebWork 2.1.x and Struts

[s2] Datetimepicker not working on non-English?

2007-03-14 Thread Petr Blahos
Hi all, I have got the impression that datetimepicker, when picking the date, does not work in non-English localization. You can easily reproduce this one when opening showcase and adding ?request_locale=de to the location bar. Then browse to CRUD--List available employees-- choose an employee,

Re: [s2] Datetimepicker not working on non-English?

2007-03-14 Thread Dariusz Wojtas
I am using it with PL locale, but I needed to add another property: displayFormat=-MM-dd regards Dariusz Wojtas On 3/14/07, Petr Blahos [EMAIL PROTECTED] wrote: Hi all, I have got the impression that datetimepicker, when picking the date, does not work in non-English localization. You

Re: OGNL - invalid syntax. JSP EL?

2007-03-14 Thread James Mitchell
There must be a way (or we should build a way) that Struts could allow customization of the el that gets substituted before passing it off to OGNL. I would ask on the dev list and possibly even file a JIRA ticket on this. Thanks -- James Mitchell The Ruby Roundup

{S2] Newbie: Sharing a POJO between two or more actions

2007-03-14 Thread Roger Varley
Hi I need to share an object between two actions. As I'm familiar with servlet programming I reached for the SessionAware interface and share the object that way. And it works. However. the Javadoc for SessionAware discourages the use of this interface as it ties the actions to a servlet

Re: {S2] Newbie: Sharing a POJO between two or more actions

2007-03-14 Thread Dave Newton
--- Roger Varley wrote: What is the recommended Struts 2 way of doing this? If you really need to share an object between actions I'm not how else you'd do it. It has also been noted that technically you aren't being tied to servlet by implementing that interface, although at one point you may

Re: Validation on java.util.List

2007-03-14 Thread Dave Newton
--- Alex Wibowo [EMAIL PROTECTED] wrote: It is not the best solution.. so if you found a better way to do it, please let me know. I don't know if this is a better way or not and it does not use annotations (at least not yet), but... (1) Create a validation config file for the *object* (in my

Re: DispachAction - does not contain specified method

2007-03-14 Thread Nitin Ahuja
Thanks Mark ! , it worked. On 3/13/07, Mark Shifman [EMAIL PROTECTED] wrote: You should look at the source http://svn.apache.org/viewvc/struts/struts1/trunk/extras/src/main/java/org/apache/struts/actions/DispatchAction.java?view=markup and the javadoc Method which is dispatched to when there

ResourceBundle in Javascript?

2007-03-14 Thread Nitin Ahuja
Hi, Does anyone know how can I acces Message ResourceBundle key/values in Javascript? Thanks, -Nitin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Validation on java.util.List

2007-03-14 Thread Dave Newton
Just a quick followup regarding annotations: --- Dave Newton [EMAIL PROTECTED] wrote: I don't know if this is a better way or not and it does not use annotations (at least not yet), but... If you annotate the class contained in the collection the @VisitorFieldValidator still works. This won't

Re: ResourceBundle in Javascript?

2007-03-14 Thread Dave Newton
--- Nitin Ahuja [EMAIL PROTECTED] wrote: Does anyone know how can I acces Message ResourceBundle key/values in Javascript? ?! You'd have to pass in something that [had] rendered a JavaScript representation of the bundle. I haven't given it any thought, but you *might* be able to use DWR to do

Html:Cancel and html:submit works only on new page

2007-03-14 Thread Amit_Wadhwa
Hi, I have a navigation page which takes me to pageA.jsp throw an html:link PageA.jsp has a textbox, a submit button and a cancel button. If I navigate through the index.jsp navigation menu to goto PageA.jsp, the cancel and submit requests don't work - they both return a blank page - no cancel is

How to submit multiple selection?

2007-03-14 Thread xushaoxun
For example, i want to get the ids of the selected messages in the forum and delete the selected messages. (Suppose i am the admin). how to achieve this? seems won't work. -- View this message in context: http://www.nabble.com/How-to-submit-multiple-selection--tf3401936.html#a9473724 Sent from

Re: ResourceBundle in Javascript?

2007-03-14 Thread Musachy Barroso
I think you are confusing client side and server side code. musachy On 3/14/07, Dave Newton [EMAIL PROTECTED] wrote: --- Nitin Ahuja [EMAIL PROTECTED] wrote: Does anyone know how can I acces Message ResourceBundle key/values in Javascript? ?! You'd have to pass in something that [had]

Re: [s2] Datetimepicker not working on non-English?

2007-03-14 Thread Musachy Barroso
If the field used by the datetimepicker is of type Date, there shouldn't be a problem, if it is an string, the displayFormat will be used to try to parse the date. By the way if you have some feedback on a better way to do this, now it is a good time (for 2.1.x) regards musachy On 3/14/07,

Re: ResourceBundle in Javascript?

2007-03-14 Thread Nitin Ahuja
Hi Dave, What is DWR ? I found a simple wayout, but there is dependency i.e I have to assign the the value of message resource key to an html object in jsp. Here is what i did.. in jsp html:button onclick=javascript:display(this); property=xyz bean:message key=form.select //html:button

Re: ResourceBundle in Javascript?

2007-03-14 Thread Musachy Barroso
script var myMessage = 'bean:message key=form.select /'; function sayit() { alert(myMessage); } /script On 3/14/07, Nitin Ahuja [EMAIL PROTECTED] wrote: Hi Dave, What is DWR ? I found a simple wayout, but there is dependency i.e I have to assign the the value of message resource

Re: ResourceBundle in Javascript?

2007-03-14 Thread Dave Newton
--- Nitin Ahuja [EMAIL PROTECTED] wrote: What is DWR ? http://getahead.org/dwr I have to assign the the value of message resource key to an html object in jsp. Message bundles are server-side. You want to access it on the client. So you need to build a representation of the message bundle

Re: ResourceBundle in Javascript?

2007-03-14 Thread Dave Newton
--- Musachy Barroso wrote: script var myMessage = 'bean:message key=form.select /'; function sayit() { alert(myMessage); } /script Or that ;) d. 8:00? 8:25? 8:40? Find a flick in no

Bean access from several pages in request scope

2007-03-14 Thread Balazs Michnay
Dear Struts users, I have a form bean with request scope. When submitting the form, the bean can be accessed from the next page as expected. On the next page I'd like to show a Modify button that goes back to the previous page with all the values entered, so the bean must accessed again. If I

[S2] Result Type Dispatcher problem

2007-03-14 Thread Inamdar, Anil
Hello, I have a problem with the result type dispatcher when I try to dispatch the success or error to another action. I get 404 error. This works fine with result type chain. Here is my configuration. action name=TaskInsert class=com.isone.struts.action.InsertDataAction

Re: ResourceBundle in Javascript?

2007-03-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nitin, Dave Newton wrote: Message bundles are server-side. You want to access it on the client. [snip] If you just need to access a single message out of a bundle, maybe this is okay, although I'd probably just put the message into scope via

Re: [S2] Result Type Dispatcher problem

2007-03-14 Thread Dave Newton
--- Inamdar, Anil [EMAIL PROTECTED] wrote: result name=errorTaskInsert.action/result !--THIS DOES NOT WORK. I Tried everything. Did you try: result name=error type=redirect-action TaskInsert /result d.

Re: Bean access from several pages in request scope

2007-03-14 Thread Dave Newton
--- Balazs Michnay [EMAIL PROTECTED] wrote: Is there a way to access all the data from the form page when someon pushes the Modify button without setting the bean scope to session? Sure; use the id to retrieve the bean (just like you would for a normal 'edit' CRUD-type action) and pre-populate

Re: Validation on java.util.List

2007-03-14 Thread Alex Wibowo
Hi Dave, Thanks for that.. I will have a look at the VisitorValidator tomorrow (its 1 AM here :P ) I am sort of in the same position as you (using Hibernate objects at the web layer)... I have given that a thought before (annotating the hibernate objects with validation annotation). But that

RE: [S2] Result Type Dispatcher problem

2007-03-14 Thread Inamdar, Anil
Yes I tried with redirect-action and it works. But I don't want a redirect as I lose my messages and other data from the previous action Thanks Anil -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 14, 2007 09:56 AM To: Struts Users Mailing List

Re: Bean access from several pages in request scope

2007-03-14 Thread Balazs Michnay
Sure; use the id to retrieve the bean (just like you would for a normal 'edit' CRUD-type action) and pre-populate the form. Could you please provide a concrete example? I don't really understand what an 'edit' CRUD-type action is. use the id to retrieve the bean How do I retrieve it? Should I

Re: How to submit multiple selection?

2007-03-14 Thread Alex Wibowo
are you using struts 1 ? if so, have a look at html:multibox. basically you will need a collection in your action form (something like ListString selectedIds = new ArrayListString()). for struts 2, i havent had time to check it yet.. just migrated to Struts 2 a couple days ago :P On 3/14/07,

Re: Validation on java.util.List

2007-03-14 Thread Dave Newton
--- Alex Wibowo [EMAIL PROTECTED] wrote: But that will tie up the hibernate objects to Struts, wouldnt it? XWork, technically, but yes. The other issue (I think; haven't explored it yet) is that you'd lose the ability to validate differently based on the Action method (which I need). So I'm

Re: {S2] Newbie: Sharing a POJO between two or more actions

2007-03-14 Thread Alex Wibowo
with SessionAware, you have to implement: void *setSessionhttp://struts.apache.org/2.0.6/struts2-core/apidocs/org/apache/struts2/interceptor/SessionAware.html#setSession%28java.util.Map%29 *(Map http://java.sun.com/j2se/1.5.0/docs/api/java/util/Map.html session) so during testing you can

RE: [S2] Result Type Dispatcher problem

2007-03-14 Thread Dave Newton
--- Inamdar, Anil [EMAIL PROTECTED] wrote: Yes I tried with redirect-action and it works. But I don't want a redirect as I lose my messages and other data from the previous action Oh, I didn't notice that you said that in your original post. The default result type is redirect. I don't know

Re: Bean access from several pages in request scope

2007-03-14 Thread Dave Newton
--- Balazs Michnay [EMAIL PROTECTED] wrote: Could you please provide a concrete example? I don't really understand what an 'edit' CRUD-type action is. Your modify button is basically a link to the form that allows you to edit an instance of the bean. As a URL it might look like:

[s1] Struts / Netbeans Hands On Lab

2007-03-14 Thread Niall Pemberton
Theres a Hands on Lab for Struts (1.2.9) / Netbeans by Sang Shin availbale here: http://www.javapassion.com/handsonlabs/strutsbasics/ Niall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: Global messages.jsp file included in a SiteMesh decorator

2007-03-14 Thread mraible
Guillaume Carré wrote: 2007/3/14, mraible [EMAIL PROTECTED]: I have a messages.jsp[1] that's included (using %@ include file=/common/messages.jsp %) in my default decorator. This file has a couple of calls to the valueStack - namely hasActionErrors() and hasFieldErrors(). This worked

Revising user input

2007-03-14 Thread Christopher Becker
Hi; I am using Struts 1.2.7, and am developing a user form that employs the validator framework. Once validation is successful, I display the results back to the user on a JSP page, before final submission to the business layer for database update. At this point I would like to give the user

[s2] How to pass param to actions from Struts.xml

2007-03-14 Thread Harring Figueiredo
Folks, Is there a way to pass parameter to an Action using the struts.xml config file. 1 ) I see that the action .. has a param attribute. How can I access its value from within the action? My action already implements the ParameterAwre interface. However, I am unable to see the value on the

Re: Global messages.jsp file included in a SiteMesh decorator

2007-03-14 Thread Guillaume Carré
2007/3/14, mraible [EMAIL PROTECTED]: That's the problem, I *do* have the ActionContextCleanUp filter in my web.xml: It's working here for me, I've included a test.jsp in my sitemesh decorator with a ww:property value=test/ in it, and it's able to access the test object from the value stack.

Re: Global messages.jsp file included in a SiteMesh decorator

2007-03-14 Thread mraible
Guillaume Carré wrote: 2007/3/14, mraible [EMAIL PROTECTED]: That's the problem, I *do* have the ActionContextCleanUp filter in my web.xml: It's working here for me, I've included a test.jsp in my sitemesh decorator with a ww:property value=test/ in it, and it's able to access the

fmt:setLocale little OT

2007-03-14 Thread Vinicius Carvalho
Hello there! I'm struggling with this for the last couple of hours, I'm pretty sure is a dumb thing I forgot. I'm setting the locale for my JSPs (not using struts yet, this is for a presentation) and fmt:setLocale refuses to override the default locale. I'm using jakarta standards 1.1.2 apache

Re: Revising user input

2007-03-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris, Christopher Becker wrote: A simple javascript:back() approach is not feasible (nor desirable) [...] [snip] Could someone provide insight on the best approach to allow for re-display (and re-validation) of form content? Any guidance would

Re: Global messages.jsp file included in a SiteMesh decorator

2007-03-14 Thread Guillaume Carré
2007/3/14, mraible [EMAIL PROTECTED]: What if you use s:if test=hasActionErrors() foo /s:if - does that work for you as well? yes it does work as well, as advertized. And if I remove the ActionContextCleanUp filter, it doesn't work anymore, I have the following exception:

DataSources

2007-03-14 Thread Daniel Blumenthal
I'm looking into upgrading from 1.2.9 to 1.3.8, and I'm having a hard time figuring out how to get DataSources for my application. In the old version, I did the configuration in the struts-config.xml file, and could say the following in the action: DataSource ds =

Re: [s2] How to pass param to actions from Struts.xml

2007-03-14 Thread cilquirm
Create a setter with the same name as your param. ex : for : action name=blah class=MyAction param name=myValueThis value/param /action in MyAction : public class MyAction implements Action { private String myValue; public void setMyValue( String value) { this.myValue = value; } }

Re: Global messages.jsp file included in a SiteMesh decorator

2007-03-14 Thread mraible
Guillaume Carré wrote: 2007/3/14, mraible [EMAIL PROTECTED]: What if you use s:if test=hasActionErrors() foo /s:if - does that work for you as well? yes it does work as well, as advertized. And if I remove the ActionContextCleanUp filter, it doesn't work anymore, I have the

Struts 2.0.6 and Validation

2007-03-14 Thread Hardy Ferentschik
Hi there, I am trying to get validation going for my application and so far nothing works. I would like to use annotations. Here is what I try to do: package ... import ... @Results({ @Result(name = success, value = /jsp/hitlist.jsp), // value = hitlist.action, type =

Re: DataSources

2007-03-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel, Daniel Blumenthal wrote: I'm looking into upgrading from 1.2.9 to 1.3.8, and I'm having a hard time figuring out how to get DataSources for my application. I understand that this was removed in 1.3, but it's unclear how to make the

Re: {S2] Newbie: Sharing a POJO between two or more actions

2007-03-14 Thread cilquirm
If your actions occur in sequence, ( i.e. submit to an action - display action ), it's possible to use action chaining to share objects. http://struts.apache.org/2.x/docs/action-chaining.html Roger Varley wrote: Hi I need to share an object between two actions. As I'm familiar

Re: Struts 2.0.6 and Validation

2007-03-14 Thread Dave Newton
--- Hardy Ferentschik wrote: Currently I get the following error: No result defined for action SearchAction and result input If validation fails the framework will try to bring you back to the input result. You don't appear to have one; this will cause a problem. validation on 'complex'

Re: Validation on java.util.List

2007-03-14 Thread cilquirm
I don't know if this helps, but when I validate a list or array , i use OGNL's selection/projection facility : i.e. : customers.{ ? #this.age gt 0 and #this.username neq null }.size() eq customers.size creates a list of all customers whose age is greater than zero and who have a username

Re: Global messages.jsp file included in a SiteMesh decorator

2007-03-14 Thread Guillaume Carré
2007/3/14, mraible [EMAIL PROTECTED]: What if you remove the filter-mapping for Struts' filter in your web.xml? ?? If I remove the Struts' filter nothing works anymore :-) I have a staticFilter in my application that forwards to static resources and doesn't hit the Struts FilterDispatcher

Re: Struts 2.0.6 and Validation

2007-03-14 Thread Dave Newton
--- Hardy Ferentschik wrote: @Validations( expressions = { @ExpressionValidator( expression = searchParam.keywords ne null and searchParam.location ne null message = Wrong search parameters) } Btw, I haven't tested this yet, but I suspect you wouldn't want

Missing Message Key

2007-03-14 Thread Syed Ibrahim
Hi I am new to this forum and started using Struts 1.3.5. Am getting below exception while running my program. Missing message for key userRegistration.firstName in bundle (default bundle) Thanks in Advance. -- Original Message --- From: Guillaume Carré [EMAIL PROTECTED]

RE: DataSources

2007-03-14 Thread Daniel Blumenthal
Chris, Thanks for the reply - this sounds like just what I need. For instance, Apache Tomcat makes this pretty darned easy. You can define a JNDI datasource at the server level, or per webapp. The configuration is (roughly) the same; it just goes in a different place in your config files.

[S2] Going nuts with s:set

2007-03-14 Thread Roger Varley
Hi I have this fragment of .jsp code s:iterator value=order.details status=status s:set name=indexValue value=#status.index scope=request/ s:text name=index/ s:property value=#status.index/ s:text name=variable/

Re: [s1] Filters: distinguishing between user-requests and redirects

2007-03-14 Thread Pierre Thibaudeau
2007/3/13, Michael Jouravlev [EMAIL PROTECTED]: On 3/13/07, Christopher Schultz [EMAIL PROTECTED] wrote: I am trying to implement a flood control mechanism to prevent robots requesting pages after pages at an inhuman rate. I know you've gotten lots of feedback already, but there's a

RE: [S2] Result Type Dispatcher problem

2007-03-14 Thread Inamdar, Anil
This is how 1. One action class and multiple methods in it (insert, Doinsert, update, DoUpdate, list, search etc) 2. All the action mappings use this class and call the different methods based on what is required. 3. The action mappings have additional parameters defined such as DAO, Bean class

Re: DataSources

2007-03-14 Thread Martin Gainty
I think this is where Spring really shines e.g. ApplicationContext.xml ?xml version=1.0 encoding=UTF-8? beans xmlns=http://www.springframework.org/schema/beans; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;

Re: DataSources

2007-03-14 Thread Martin Gainty
Hi Dansorry..forgot the codepublic class JdbcCorporateEventDao implements CorporateEventDao { private JdbcTemplate jdbcTemplate; public void setDataSource(DataSource dataSource) { this.jdbcTemplate = new JdbcTemplate(dataSource); } // JDBC-backed implementations of the

Re: LazyLists

2007-03-14 Thread maestro
Apologies for taking so long to post. I was side tracked with other stuff. It does mention in the Wiki: http://wiki.apache.org/struts/StrutsCatalogLazyList In a small line: If you define the following types of getter/setter methods for your indexed property, in JDK 1.3 you shouldn't have any

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread stanlick
I'm using 2.0.6. Hopefully results aren't radically different between dot releases! On 3/12/07, Dave Newton [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote: As you can see, this DIV is not well-formed, and naturally does not rended correctly. Any help would be appreciated. What

Re: Parsing error processing resource path

2007-03-14 Thread stevo_ugs
The issue is parsing. In my experience, this is due to using backslashes (\) where you should use two backslashes (\\) or a forward slash (/). To debug: It is not necessarily true that the file that defines the servlet action is the culprit. What you need to do is go through that file and

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: I'm using 2.0.6. Hopefully results aren't radically different between dot releases! At some point things switched to FreeMarker; I don't recall when. It's a new project--things will change, although it seems to settle down. I'm not convinced you really want help;

Cross site scripting issue

2007-03-14 Thread rapsy
Hi All, I am trying to find a best solution to prevent Cross site scripting attacks. I wrote a method to filter out all the bad characters. But my questions is where should I call this method? AT the form level, in setters method r action level or use a filter. I think filter is a good option

Re: DataSources

2007-03-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel, Daniel Blumenthal wrote: I'm using Tomcat 5.5.x. The documentation for this looks pretty good, now that I know where to look for it. Thanks! Feel free to cruise on over to the Tomcat list if you have any questions about configuration.

Passing a bean (out of an iteration) to an action

2007-03-14 Thread Balsi
hi all, Wonder if you can help me on that one: I have an iteration over a collection of beans in my jsp site. I itererate on the list and generate a table with a row for each bean. The first attribute of the table is an index (its the primary key of the record in a database) now id like to do

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Adam Ruggles
Hi Stanlick, I think I know whats going on here. Whatever %{zipUrl} in the DIV's href property is pointing to is generating the bad HTML. This part: LABEL class=label for=user_zip_cityCity:/LABEL/TD TDINPUT id=user_zip_city size=40 value=Edwardsville name=user.zip.city /TD/TRTRTD

Need Help -Urgent

2007-03-14 Thread Sachin
Hi , i am using below snippet and i am getting the following error : TR TH class=tRightCP Description/TH TDhtml:textarea readonly=${isReadOnly} property=cpDesc *maxlength=** 2* //TD /TR Error: [3/14/07 14:57:52:094 EST] 715b61a9 WebGroup E SRVE0026E: [Servlet

RE: Cross site scripting issue

2007-03-14 Thread Asthana, Rahul
Check for a predefined pattern of characters in a filter,as you have suggested, (probably read from xml) and forward to an error page if you find any. -Original Message- From: rapsy [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 14, 2007 3:50 PM To: user@struts.apache.org Subject:

Re: Need Help -Urgent

2007-03-14 Thread Dave Newton
--- Sachin [EMAIL PROTECTED] wrote: html:textarea readonly=${isReadOnly} property=cpDesc *maxlength=** 2* //TD Textareas don't have a maxlength attribute. d. Expecting? Get great news right away with

Re: Need Help -Urgent

2007-03-14 Thread Ed Griebel
Textarea doesn't support the maxlength attribute: http://www.w3.org/TR/html4/interact/forms.html#h-17.7 On 3/14/07, Sachin [EMAIL PROTECTED] wrote: Hi , i am using below snippet and i am getting the following error : TR TH class=tRightCP Description/TH TDhtml:textarea

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Dave Newton
--- Adam Ruggles [EMAIL PROTECTED] wrote: I think I know whats going on here. Whatever %{zipUrl} in the DIV's href property is pointing to is generating the bad HTML. Possibly, but whether I use %{zipUrl} or %{#zipUrl} I still get correct HTML; my s:div... renders as: div

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Dave Newton
Just as a followup, I am still not convinced that it's legal HTML to embed a div inside a table, between table rows. Which browser you're using to retrieve the generated source would also be useful information. d. --- Dave Newton [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote: This

Re: Need Help -Urgent

2007-03-14 Thread Sachin
Thanks guys. But i need to limit text area content. Do i need to use rows ? On 3/14/07, Dave Newton [EMAIL PROTECTED] wrote: --- Sachin [EMAIL PROTECTED] wrote: html:textarea readonly=${isReadOnly} property=cpDesc *maxlength=** 2* //TD Textareas don't have a maxlength attribute. d.

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread stanlick
d. Can you show me what your action mapping looks like for */stan1.action?* As far as the missing quotes go, the only way I can view generated source *and* have the content dynamically added to the DOM included, is to use the IE plug in that builds the HTML directly from the DOM tree. This is

Re: Need Help -Urgent

2007-03-14 Thread Dave Newton
--- Sachin [EMAIL PROTECTED] wrote: But i need to limit text area content. Do i need to use rows ? You'll probably need to use JavaScript; I don't know of a way to limit the number of characters in a textarea without it. d.

Re: Cross site scripting issue

2007-03-14 Thread Leon Rosenberg
Jason Britain (author of Tomcat, the definitive guide) has a ready-to-run filter/valve solution for that. You could talk to him on the #tomcat channel on irc. Besides, best XSS prevention is imo not filtering the input, but the output. if you write everything out with bean:write ... filter=true

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread stanlick
Hey Adam! You might be onto something here! When a zip code is entered, the ajax portion %{zipUrl} is fetching the zip info from a database and populating the fields that the DIV is supposed to include in the form. I have programmed a bunch of JSP's using this technique with XmlHttpObject! Do

Re: Need Help -Urgent

2007-03-14 Thread Sachin
Currently i am using Tag Library 1.1 Will latest version of *struts-html.tld* help ? On 3/14/07, Dave Newton [EMAIL PROTECTED] wrote: --- Sachin [EMAIL PROTECTED] wrote: But i need to limit text area content. Do i need to use rows ? You'll probably need to use JavaScript; I don't know of a

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: This issue is obviously not a good match for your skills. The *issue* is a great match for my skills. *You* are not. Verbatim, although I added the surrounding HTML and taglib directive: s:url id=zipUrl value=http://localhost:8080/dsms/ZipCode.action; /

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread stanlick
!-- %%% -- !-- AJAX Mappings -- !-- %%% -- action name=ZipCode class=zipAjaxAction result/pages/ajaxGoods.jsp/result /action === /pages/ajaxGoods.jsp source code s:textfield name=user.zip.city

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: d. Can you show me what your action mapping looks like for */stan1.action?* package name=stan namespace=/stan extends=struts-default action name=stan1 class=stan.Stan1Action result/WEB-INF/jsp/stan/stan1.jsp/result /action

Re: Need Help -Urgent

2007-03-14 Thread Dave Newton
--- Sachin [EMAIL PROTECTED] wrote: Currently i am using Tag Library 1.1 Will latest version of *struts-html.tld* help ? No. Text areas don't have a maxlength, no matter what TLD you use. d. Be a PS3 game

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Adam Ruggles
I don't think there is anything about the XmlHttpObject that is not allowed by s2, however what you are expecting to happen might change. Based on your code snippet as soon as you load the page, the s2 div tag is going to request whatever %{zipUrl} is pointing to. It will render the complete

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread stanlick
IE 6.0! It's my work laptop don't ask. Let me port this to my home desktop running the new FireFox and I'll let you know how it turns out! This is really going to suck if this has been the problem all along!!! Maybe Bruce Eckel is right? Scott On 3/14/07, Dave Newton [EMAIL PROTECTED]

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread stanlick
I have requested %{zipUrl} directly: http://localhost:8080/dsms/ZipCode.action and the resulting response is EXACTLY what I'd like included in that DIV!!! On 3/14/07, Adam Ruggles [EMAIL PROTECTED] wrote: I don't think there is anything about the XmlHttpObject that is not allowed by s2,

Re: Need Help -Urgent

2007-03-14 Thread Sachin
Guys, Here is my problem description . I have a text area field in my application which has to allow only 2 chars.User may copy paste some content in to textarea field. I used the below code to construct the textfield html:textarea readonly=${isReadOnly} property=ab2Desc / I am able to

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Dave Newton
Wait, now I've totally forgotten what the original problem was. If below is the generated HTML then what is rendering incorrectly? DIV id=zipDiv showError=true listenTopics=zipEnteredTopic href=http://localhost:8080/dsms/ZipCode.action; formId=registerForm

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread stanlick
This is what should be rendering *but* is not! Dave, you about had it when you said to wrap the DIV in trtd tags. When I do this, the ajax'd bits *do* show up, but not lined up with all the other columns! At least now I can see the blasted fields This generated HTML is whacky with a DIV

initialize java form bean

2007-03-14 Thread Lim Hock-Chai
is there a way to set a property of a java form bean from struts-config.xml? I try to use set-property and it is not working.

Lazy loading actions in Struts 2

2007-03-14 Thread Marco from Balboa
Hi, Is there a way to prevent Struts 2 from instatiating all the actions defined in the action configuration file whe loading the application? I am using Spring for object factory. Thanks Marco -- View this message in context:

Re: initialize java form bean

2007-03-14 Thread Harring Figueiredo
Try action name=SomeAction class=com.some.path.to.youAction param name=nameOfAttributeValue you want/param Make sure your action has the method that match accessors for the attribute. In the case above, you need public String setNameOfAttribute(String va){ } Hope this helps.

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: the ajax'd bits *do* show up, but not lined up with all the other columns! At least now I can see the blasted fields You may be able to tweak the JSP you are returning to make it do the right thing, say with theme=simple etc. Heck, making the s:div.../

Re: Lazy loading actions in Struts 2

2007-03-14 Thread Dave Newton
--- Marco from Balboa [EMAIL PROTECTED] wrote: Is there a way to prevent Struts 2 from instatiating all the actions defined in the action configuration file whe loading the application? I didn't know it did; I thought they were instantiated per-request. d.

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread stanlick
Thanks d! I hope I didn't come off as too much of a jerk. I really do appreciate your help. Scott On 3/14/07, Dave Newton [EMAIL PROTECTED] wrote: --- [EMAIL PROTECTED] wrote: the ajax'd bits *do* show up, but not lined up with all the other columns! At least now I can see the blasted

Re: initialize java form bean

2007-03-14 Thread Dave Newton
--- Lim Hock-Chai [EMAIL PROTECTED] wrote: is there a way to set a property of a java form bean from struts-config.xml? I try to use set-property and it is not working. Which version of Struts (I'm assuming Struts 1, but which version?) What did you try already? d.

Re: Need Help -Urgent

2007-03-14 Thread Sachin
Hi, Sorry if i am disturbing you guys. Still i am facing the issue.i removed all extra characters using javscript, Now its allowing me to add/edit the information and stored in database as expected and forwarded to listing view jsp with entered value. But when i try to click the edit link for

Re: Need Help -Urgent

2007-03-14 Thread Dave Newton
--- Sachin [EMAIL PROTECTED] wrote: But when i try to click the edit link for the particular record which is having 2 chars as a data, the edit link is getting disabled automatically. If that data length is less than 250 chars the edit link is working fine in the form. is there any

Re: Struts 2.0.6 portlets

2007-03-14 Thread tom tom
Thank you, Any documentation around on this topic, Struts 2.0.6 portlets development.? (best practices etc). And things to be aware of? I would like to know things like for e.g? If I want a session variable should I put it to the HttpSession or Portlet session. What we really want is forget the

  1   2   >