any struts 2 unit testers out there?

2007-10-26 Thread Session A Mwamufiya
Hi All, Would someone let me know whether it's possible to tweak something so that JUnit test code can run on an action method that calls the ActionSupport method getText() to fetch string resources from a package.properties file. As it stands, I keep getting a null exception when getText() is

unit testsing struts 2 code that contains resource calls like getText()

2007-10-25 Thread Session A Mwamufiya
Hi, Junit is unable to run getText() and retrieve text resources from a package.xml file, because it appears to be a functionality that is provided by the ActionSupport super class. Is there a way to setup my Junit test case to be able to run that code? I've setup my test case to use a mock h

setting the s:select label font-style

2007-09-23 Thread Session A Mwamufiya
Hi, I'm trying to change the font of the s:select label to no longer be italic. I modified the styles.css file in template/xhtml, and also the one in template/css_html to: .label {font-family: arial, sans-serif; font-weight:bold;} but the s:select label stays the same (italic). Any pointers a

Re: images not being displayed with struts 2

2007-09-23 Thread Session A Mwamufiya
Fixed it, the page in which the image was supposed to be in was called by another page that prefaced the action call with a location. Once I removed it, it worked. Thanks. > Session A Mwamufiya wrote: >> I ran a simple jsp page with the tag to add an image, and it ran >> fine.

images not being displayed with struts 2

2007-09-23 Thread Session A Mwamufiya
Hi, I ran a simple jsp page with the tag to add an image, and it ran fine. However, if I do the same in my struts 2 project, I don't get anything showingup. My image file is within the same folder as the jsp file and is referenced the same way in both cases. Any ideas what needs to be done

Re: [OT] Re: setting the background with the s:head template

2007-09-21 Thread Session A Mwamufiya
I tried it without the "." as well, just: body {background-color: #00FF00; } but nothing changes. I circumvented this issue by simply adding a

setting the background with the s:head template

2007-09-21 Thread Session A Mwamufiya
Hi, I'm trying to control all of my css styles through the s:head tag, so that I change things in only one place. I copied the template folder to my project's webcontent folder, and edited the styles.css file in template/xhtml/ with the following: .body {background-color: #00FF00;} however, t

setting a file filter in file upload

2007-09-17 Thread Session A Mwamufiya
Hi, I create my own files with extension ".smt" and would like to have the tag filter the selection and only allow those files. I tried to set the accept attribute to the following: - *.smt - text/smt but neither worked. Any ideas? Thanks, Session -

Re: struts 2.0.9 with the dynamic tree

2007-09-17 Thread Session A Mwamufiya
Please, has anyone figured out how to make the tree selection work with struts 2.0.9? The showcase example, the way it stands doesn't work for 2.0.9 (it didn't work for 2.0.6 either, but I found a hack that involved changing the struts-core jar file). I thought it was supposed to be fixed in 2

Re: Struts 2 Unit test for Session.

2007-09-17 Thread Session A Mwamufiya
I believe you can write a mock implementation of the Person bean and have a copy of applicationcontext.xml for your unit test that points to that mock implementation. What you'd need to do is provide an application context variable to the constructor of your action; in your production code, tha

struts 2.0.9 with the dynamic tree

2007-09-17 Thread Session A Mwamufiya
Hi, I recently upgraded to struts 2.0.9, and now my tree viewer doesn't respond to node selections any more. Here's my jsp script: function treeNodeSelected(nodeId) { dojo.io.bind({ url: "?nodeId="+nodeId, load: fu

Re: file upload exception

2007-09-15 Thread Session A Mwamufiya
Eureka!!! That's it, it works finally. Thanks so much!!! > You copy the file to a new location in the action. It removes the file > after the action method is executed. > > Session A Mwamufiya wrote: >> How do I stop the FileUploadInterceptor from firing and deleting

RE: file upload exception

2007-09-15 Thread Session A Mwamufiya
How do I stop the FileUploadInterceptor from firing and deleting the files? Is there a setting to put in struts.xml or web.xml? I copied verbatim what there is in the showcase, and it's still not working. > --- Session A Mwamufiya wrote: >> Yes the file is the right size; I

RE: file upload exception

2007-09-15 Thread Session A Mwamufiya
gt; --- Session Mwamufiya <[EMAIL PROTECTED]> wrote: > >> Hi Dave, >> >> I don't copy the file at all. The FileUploadInterceptor gets called >> before I can do anything with the file. >> >> Session A. Mwamufiya Carnegie Mellon University MBA | Tepp

Re: file upload exception

2007-09-14 Thread Session A Mwamufiya
The action context cleaner is the first filter in my web.xml. Yes, I get the temp file name. I had code to read in the data from the file, but I commented it out for now, all I want to do is be able to have the file appear on my server. I check whether the uploaded file exists (also it's name

Upgrade issue with getting the Http Request from an action

2007-09-14 Thread Session A Mwamufiya
Hi, I recently upgraded from struts 2.0.6 to 2.0.9. I'm now getting a null exception when attempting to retried the session object from the request object associate with an action. In the following code, the second line throws the exception, meaning that the first line returned null: 1 reques

Re: file upload exception

2007-09-14 Thread Session A Mwamufiya
We don't get a FormFile in struts 2, it's an actual File. But mine is junk. Can someone send me the jsp, struts.xml, and action java code for a working example of file upload. I put up everything I had in this thread, and nobody found anything wrong with it; at this point, I'll have to use som

Re: Cannot find tag library descriptor for /struts-tags

2007-09-14 Thread Session A Mwamufiya
Please disregard this, it's not a problem; just that eclipse refused to refresh properly for some weird reason. Sorry > Hi, > > I tried upgrading to struts 2.0.9 from 2.0.6, and replaced my > struts2-core.jar and xwork.jar files with those in the 2.0.9 > distribution. Now I get the following

Cannot find tag library descriptor for /struts-tags

2007-09-14 Thread Session A Mwamufiya
Hi, I tried upgrading to struts 2.0.9 from 2.0.6, and replaced my struts2-core.jar and xwork.jar files with those in the 2.0.9 distribution. Now I get the following error in all of my jsp pages at the first line: Cannot find tag library descriptor for /struts-tags The first lines are: <%@ tag

RE: file upload exception

2007-09-14 Thread Session A Mwamufiya
ng the code. >> Is the button label "Import"? That makes me suspicious if that's also >> what's being copied into the temp file (if it is "Import" you can do a >> quick sanity check by making it something else like "Fluffernutter" and >&

Re: [struts] file upload exception

2007-09-14 Thread Session A Mwamufiya
e file, the file is still there until I shutdown JBoss. > Session A Mwamufiya wrote: >> You're right about the button, that's what gets put in the file. > > Could it be that you've named the upload the same as the button, so there > are two paramete

Re: file upload exception

2007-09-14 Thread Session A Mwamufiya
;s also > what's being copied into the temp file (if it is "Import" you can do a > quick sanity check by making it something else like "Fluffernutter" and > seeing if that ends up being the file's contents). > > d. > > --- Session A Mwamufiya <[

Re: file upload exception

2007-09-14 Thread Session A Mwamufiya
le I uploaded from the browser. Anything I may be missing? Thanks, Session > --- Session A Mwamufiya wrote: >> Do people need more information in order to answer this thread? Please >> let me know. I've been stuck for 2 days now, trying to upload a file on >> my serve

Re: file upload exception

2007-09-14 Thread Session A Mwamufiya
k\jboss.web\localhost\zen.serve >>>> r directory (which is the pathname returned by the file object), but >>>> it only has the word import in it (not the content of the file that >>>> was uploaded). >>>> >>>> has anyone come across th

Re: creating a dummy session object for unit testing

2007-09-13 Thread Session A Mwamufiya
possible since things like unit testing will become more difficult." > > In my experience, however, that's not the case at all. Using SessionAware, > from a unit testing perspective, makes your Action less dependent on the > servlet API, and makes unit testing easier. > &

Re: file upload exception

2007-09-13 Thread Session A Mwamufiya
pathname returned by the file object), but it >>> only has the word import in it (not the content of the file that was >>> uploaded). >>> >>> has anyone come across this problem before? how do I gain access to >>> the uploaded file? >>>

creating a dummy session object for unit testing

2007-09-13 Thread Session A Mwamufiya
Hi, How do I go about creating a dummy HttpSession object for unit testing a struts 2 app? I have created a dummy HttpServletRequest object, but I can't instanciate an HttpSession in teh Request.getSession() method, because HttpSession is an abstract interface and I can't create an instance of

Re: file upload exception

2007-09-13 Thread Session A Mwamufiya
the file object), but it >> only has the word import in it (not the content of the file that was >> uploaded). >> >> has anyone come across this problem before? how do I gain access to >> the uploaded file? >> >> >>> Make sure you have com

Using JFace with Struts 2

2007-09-12 Thread Session A Mwamufiya
Hi, Is it at all possible to integrate the JFace treeviewer with struts 2? Are there examples out there? Thanks, Session - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: file upload exception

2007-09-12 Thread Session A Mwamufiya
t; has anyone come across this problem before? how do I gain access to the > uploaded file? > > >> Make sure you have commons-io, commons-fileupload, and >> commons-collections jar files in your WEB-INF/lib directory. At least >> this worked for me. >> &

Re: file upload exception

2007-09-12 Thread Session A Mwamufiya
access to the uploaded file? > Make sure you have commons-io, commons-fileupload, and commons-collections > jar files in your WEB-INF/lib directory. At least this worked for me. > > Thanks, > > > On Wed, 2007-09-12 at 19:07 -0400, Session A Mwamufiya wrote: >> Hi,

file upload exception

2007-09-12 Thread Session A Mwamufiya
Hi, I'm using struts 2.0.6, and I keep getting the following exception when I try to replicate the fileupload example in the showcase: Unable to load bean org.apache.struts2.dispatcher.multipart.MultiPartRequest (jakarta) - [unknown location] org.apache.struts2.config.BeanSelectionProvider$Obje

Any idea how the tree viewer in this link is created? Or how I could get it

2007-09-12 Thread Session A Mwamufiya
Hi, Yet another tree question, but one more interested. I found the type of tree viewer I wanted, it's like the one on this IBM link: http://publib.boulder.ibm.com/infocenter/wasinfo/v5r0/index.jsp?topic=/com.ibm.websphere.exp.doc/info/exp/ae/rxml_propscript.html If you have any ideas how that

setting the content disposition variable in a struts 2 action

2007-09-11 Thread Session A Mwamufiya
Hi, I'm following the filedownload example from the showcase, but would like to be able to set the content disposition filename in my code, rather than have it hardcoded in the struts.xml file. I have tried the following: My struts.xml: /pages/smigimportexport/SMIGExport.js

Re: calling a javascript function from my java class

2007-09-06 Thread Session A Mwamufiya
same underlying flow. > > Frank > > -- Frank W. Zammetti Founder and Chief Software Architect Omnytex > Technologies http://www.omnytex.com AIM/Yahoo: fzammetti MSN: > [EMAIL PROTECTED] Author of "Practical Ajax Projects With Java > Technology" (2006, Apress, ISB

Re: calling a javascript function from my java class

2007-09-06 Thread Session A Mwamufiya
st and the new page can be built > without the removed node. > > (*Chris*) > > On 9/6/07, Session A Mwamufiya <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Does anyone have an example of how to call a javascript function from a >> java class? I want

Re: calling a javascript function from my java class

2007-09-06 Thread Session A Mwamufiya
ake an AJAX request and the server can return the >> new DOM tree without the removed node >> >> 2. Have the browser resubmit the request and the new page can be built >> without the removed node. >> >> (*Chris*) >> >> On 9/6/07, Session A Mwamu

calling a javascript function from my java class

2007-09-06 Thread Session A Mwamufiya
Hi, Does anyone have an example of how to call a javascript function from a java class? I want to call a javascript function that removes a node from a tree after a java class removed it from the database. Thanks, Session -

Re: lazy-loading s:tree

2007-09-05 Thread Session A Mwamufiya
I'm sorry to be clogging your mailboxes with this, but I still have not received any responses. Probably those who worked on/with s:tree are not yet online, but if you are, please respond with an example of how to perform lazy loading on an s:tree treeViewer, or if you know of any technology ou

Re: lazy-loading s:tree

2007-09-05 Thread Session A Mwamufiya
Please, can someone refer me to the struts developers who've worked on s:tree. I've been trying to get some answers all day about this matter and have not received a single reply. > TreeViewer people, and Dojo fans, please chime in your comments. I > wanted to switch from struts with s:tree to

Re: Dynamic Tree Example

2007-09-05 Thread Session A Mwamufiya
Hi Manu, You seem to have had lots of experience with s:tree; would you please help me answer the following questions (with example code if you have them): - how do you go about expanding the tree to the node level it was at before a refresh? - can you add icons (not changing the plus/minus ones

Re: reloading a tree at a certain level of expension

2007-09-05 Thread Session A Mwamufiya
Anyone knows whether this feature has been added in yet? > Session A Mwamufiya wrote: >> I'm relaunching this thread in case an s:tree expert may have missed it >> the first time around :). >> >>> Is there a way that when a s:tree is reloaded, it expends to

Re: lazy-loading s:tree

2007-09-05 Thread Session A Mwamufiya
TreeViewer people, and Dojo fans, please chime in your comments. I wanted to switch from struts with s:tree to Dojo, but I can't find any online examples where Dojo obtains the tree data from a java class. Do you have any examples I could look at? Thanks, Session > Hi, > > Has anyone been

adding icons to s:tree nodes

2007-09-05 Thread Session A Mwamufiya
Hi, I haven't kept up with progress made in struts 2.0.9, so I was wondering whether there have been changes made to the s:tree tag that would now allow nodes to have icons. If so, please refer me to an example. Thanks, Session

lazy-loading s:tree

2007-09-05 Thread Session A Mwamufiya
Hi, Has anyone been able to find a way to lazy-load the s:tree tag. I'm having some performance issues with a really big tree. Please send me an example. Thanks, Session - To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

Re: Running Dojo on a struts project

2007-09-03 Thread Session A Mwamufiya
-1) and "JavaScript, DOM > Scripting and Ajax Projects" (2007, Apress, ISBN 1-59059-816-4) Java Web > Parts - http://javawebparts.sourceforge.net Supplying the wheel, so you > don't have to reinvent it! > > Session A Mwamufiya wrote: >> Who has experience using D

RE: Running Dojo on a struts project

2007-09-03 Thread Session A Mwamufiya
> There seems to be an error in the dojo.js file. I'm using version 0.4.3 > with ajax. Can someone send me the link to a working version of the > file? > > Thanks, > > Session A. Mwamufiya Carnegie Mellon University MBA | Tepper School of > Business MSE (software

Running Dojo on a struts project

2007-09-03 Thread Session A Mwamufiya
Hi, I'm attempting to follow a Dojo tree widget tutorial, http://willcode4beer.com/ware.jsp?set=dojoTreeWidget, where Dojo is used to define a tree. Unfortunately nothing comes up on the page, even though the page source shows the tree definition. The tree page is set as the result page for a

Re: Insane problems with s:select

2007-08-27 Thread Session A Mwamufiya
That happened to me once, and it ended up that the s:select tag was improperly written. Make sure that you are returning an appropriate map from the function that is associated to the list attribute in s:select. It expects a map that maps IDs to strings that get displayed. Hope it helps, Sess

Re: displaying items in different colors in a tag

2007-08-14 Thread Session A Mwamufiya
Ok, thanks. I'll look into creating custom templates and see how far I get. Thanks, Session > Session A Mwamufiya wrote: >> Hi, >> >> Is there a way, with the current version of struts 2, to use a >> conditional statement to color code elements that are dis

Re: capturing the value of a tag in an action

2007-08-14 Thread Session A Mwamufiya
I had actually modified the name of the checkbox and its property name in the action (for conformity reasons), but I had forgotten to change the names of the get/set methods; silly me. Now it works. Sorry for the confusion, and thanks for the eager assistance. Best, Session > Sessio

capturing the value of a tag in an action

2007-08-14 Thread Session A Mwamufiya
Hi, I started a thread on this topic a while back, but the example I was guided to was hard to understand and implement. The question is straight forward: How do you get the value of a checkbox from within an action? - I have named my in the jsp, and have a private String element with the sa

Re: Dynamic Tree Example

2007-08-14 Thread Session A Mwamufiya
Thanks Manu. I'm new with the tree, and am attempting to implement one for a project I'm working on. I'm having a number of difficulties: - I can't manage to reload at the node level I want, it always reloads with root showing - it takes a long time to load and I have a couple of feature quest

Re: Preventing validation when form is first displayed

2007-08-13 Thread Session A Mwamufiya
;d like to. Session > I use to have a loadAction for each page and the real action to post > to... Maybe I didn't catch the problem, do you use that scheme? > > > On 8/13/07, Session A Mwamufiya <[EMAIL PROTECTED]> wrote: >> >> Hi, I have an action that is

displaying items in different colors in a tag

2007-08-13 Thread Session A Mwamufiya
Hi, Is there a way, with the current version of struts 2, to use a conditional statement to color code elements that are displayed in a tag. By this, I mean that if I have items in my list that are >4, then they're red, and if they are <= 4, then they are blue. Obviously, this is not the con

Re: getting user selection from a object

2007-08-13 Thread Session A Mwamufiya
, Session > Give it an id (or name? I forget) and supply set/get methods in the > action? > > Isn't it just two select boxes (for all intents and purposes, at least > regarding what you're doing)? > > --- Session A Mwamufiya <[EMAIL PROTECTED]> wrote: > >

Re: getting user selection from a object

2007-08-13 Thread Session A Mwamufiya
Expert struts programmers, please take a look at this thread. I believe it should be a straight forward answer, but I haven't received any replies since I launched the thread. I don't mean to pester you, but I'm really trying to get over this hurdle. Thanks, > Anyone familiar with the way th

Re: getting user selection from a object

2007-08-13 Thread Session A Mwamufiya
Anyone familiar with the way the tag works? I'm looking to retrieve the content of the entire right-hand list (not just a selected item in it). I would assume that there's a way to do that, but I'm not sure how. Any ideas? Thanks, > Hi, > > I've been stuck trying to capture, in my action

Evaluating a javascript expression in order to set the readonly attribute

2007-08-13 Thread Session A Mwamufiya
Hi, I would like to set a textbox to readonly when a flag is set in my action. I have the following jsp call: but the textfield is not readonly, and the page source reflects it. BTW, editingFlag is set in the prepare() method of my action. Any idea on how to write the evaluation? Thanks, S

getting user selection from a object

2007-08-13 Thread Session A Mwamufiya
Hi, I've been stuck trying to capture, in my action, the set of elements placed in one of the lists of an tag. I can refer to the selected element in the list by using the name of the list, but how do I access all of the elements in the list? (they were obtained by shifting items from the o

Re: RE Preventing validation when form is first displayed

2007-08-13 Thread Session A Mwamufiya
il, delete, > goAdd, goModif, view > > So add the name of your first method in the excludeMethods, and the > validation will not occures. > > > > > > > "Session A Mwamufiya" <[EMAIL PROTECTED]> 13/08/2007 08:58 Veuillez > répondre à "Strut

Preventing validation when form is first displayed

2007-08-12 Thread Session A Mwamufiya
Hi, I have an action that is validateable and uses the validate method to ensure that an element isn't added to the database if it already exists in there. Unfortunately, the validation occurs as soon as my form is launched. I tried to follow the approach from the helloworld example to not hav

taking control of the struts 2 layout in a jsp

2007-08-12 Thread Session A Mwamufiya
Hi, Struts displays the jsp objects the way it likes, for example, aligning buttons on the right even if I put them inside a tag. Is there a way to take control of how the layout is displayed without using the simple theme (that doesn't have a nice UI by the way)? Thanks, Session -

Re: getting the value of a s:checkbox

2007-08-08 Thread Session A Mwamufiya
I appreciate the explanation on how it's all supposed to work, but given my limited experience with struts 2 and this type of framework as a whole, I am not yet proficient enough to figure out where things are being generated. I use log4j to log a number of events in my code, but I don't even k

Re: getting the value of a s:checkbox

2007-08-08 Thread Session A Mwamufiya
both, and neither worked. Thanks, Session > Session A Mwamufiya wrote: >> > Isn't key a shorthand for name, value, and label? If so, I'm not sure > which of name and key will win. Look in the generated html--is the name > attribute of the corresponding in

getting the value of a s:checkbox

2007-08-08 Thread Session A Mwamufiya
Hi, I have the following checkbox in my jsp: In my action, I have defined overwriteFlag as a String variable, and have a getter and a setter for it. Nevertheless, when I submit the form, I always get null when I try to check the value. Any ideas what I could be doing wrong? Thanks, Session

Disabling struts UI objects

2007-08-08 Thread Session A Mwamufiya
Hi, I tried to set some UI elements (button, select, ...) to be disabled, but they are still clickable. I would like to disable certain UI objects from an action code, where some logical verification will occur as the form is prepared. Any ideas about how this can be done? Thanks, Session

How to check an action variable with s:if

2007-08-07 Thread Session A Mwamufiya
Hi, I've been trying for some time to get the following logic to work: where "freshSmigFlag" is a variable in my action, and there is a getter and setter defined for it. I also tried to surround the variable with the property tag as such: But that didn't work either. Any ideas how we'r

Re: using xml validation for a jsp at the same time as action validateable

2007-08-07 Thread Session A Mwamufiya
Any ideas about how to stop a form from validating the data when it first gets launch? Thanks > A bit more info on this. My struts.xml (actually, a different config > file that's called from struts.xml) contains the following: > > class="edu.cmu.sei.smart.zen.server.smigmaintenance.SMIGSelec

Re: using xml validation for a jsp at the same time as action validateable

2007-08-07 Thread Session A Mwamufiya
A bit more info on this. My struts.xml (actually, a different config file that's called from struts.xml) contains the following: /pages/smigmaintenance/SMIGSelection.jsp /pages/smigmaintenance/EmptyReloadNavigationTree.jsp SMIGCreation_input /pages/smigmaintenance/SMIGCreation.jsp

using xml validation for a jsp at the same time as action validateable

2007-08-07 Thread Session A Mwamufiya
Hi, I've been trying to not have my validation fire when I navigate to a form and populate it with data to be edited. Unfortunately, it still fires. To clarify, I'm using both xml validation and my action is validateable with a validate() method. I used the approach from the HelloWorld examp

using different icons for different types of elements in a tree

2007-08-07 Thread Session A Mwamufiya
Hi, I have an s:tree with category, question, and answer elements, and I'd like to differentiate them a bit by having a different icon for each type of element. Is there a way to specify which icon to use for an element of the tree? I know which function gets called to obtain the root element

Re: reloading a tree at a certain level of expension

2007-08-07 Thread Session A Mwamufiya
I'm relaunching this thread in case an s:tree expert may have missed it the first time around :). Thanks for any help, Session > Hi, > > Is there a way that when a s:tree is reloaded, it expends to a particular > level of expansion? I presume that I will save that expansion level in > my sess

reloading a tree at a certain level of expension

2007-08-07 Thread Session A Mwamufiya
Hi, Is there a way that when a s:tree is reloaded, it expends to a particular level of expansion? I presume that I will save that expansion level in my session object, but I'm not sure how to get it or set the tree to it, or if it's even possible. Thanks, Session ---

Re: Access control with roles

2007-08-06 Thread Session A Mwamufiya
Thanks for the replies guys, but is there an example that I can follow? It seems to me that a user's roles are defined in a request object, but I'm not sure how. I'm continuing to search online for examples. Thanks, Session > Session A Mwamufiya wrote: >> Is there a

Access control with roles

2007-08-06 Thread Session A Mwamufiya
Hi, Is there a way to implement access control in struts 2? I presume that we can use an interceptor, but I'm not sure how to map actions to specific roles. Any ideas? Thanks, Session - To unsubscribe, e-mail: [EMAIL PRO

Re: specifying a struts 2 action in the url field of a dojo function

2007-08-06 Thread Session A Mwamufiya
ot; property in the > object that is passed to the function. > > musachy > > > On 8/6/07, Session A Mwamufiya <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Thanks so much for the breakthrough. I implemented the change, and now >> the action gets called.

Re: specifying a struts 2 action in the url field of a dojo function

2007-08-06 Thread Session A Mwamufiya
eId) { dojo.io.bind({ url: "> value='dynamicTreeSelectAction.action' />?nodeId="+nodeId, load: >> function(type, data, evt) { var displayDiv = dojo.byId("displayId"); >> displayDiv.innerHTML = data; }, mimeType: "text/html" }); } ); >> >

specifying a struts 2 action in the url field of a dojo function

2007-08-06 Thread Session A Mwamufiya
Hello, I've been trying to get the tree view code from the showcase to work for many days now, and I'm literally stuck. I use logging to determine whether action methods are called or not, and the following script never gets to the dynamicTreeSelectAction action: function treeNodeSelecte

Re: Gettin the selected item in a s:tree

2007-08-06 Thread Session A Mwamufiya
leased yet, I > just decided to implement the tree using YUI and writing all the > javascript parts manually (it isn't very hard anyway). > > On 8/6/07, Session A Mwamufiya <[EMAIL PROTECTED]> wrote: >> >> Hi again, >> >> Anyone has a clue about

Re: Defining a validate() method

2007-08-06 Thread Session A Mwamufiya
: >> addFieldError("fieldName","message"); will add a specific field error. >> If you are using the XHTML theme, the error will appear above the field. >> >> >> This should set and clear the validation message for you. If you are >> using

Defining a validate() method

2007-08-06 Thread Session A Mwamufiya
Hi, I want to set up my own validate method to validate fields in my own way, but I'm not sure how to set up the method. I don't know how to set or clear the validation error message. Is it ok just to use the action's error stack, like this: public void validate() { if (listOfExistingEleme

Re: populating input fields on page load

2007-08-06 Thread Session A Mwamufiya
you are right, it now works. Thanks a lot for your help and patience Best, Session > I believe the correct spelling is redirect-action > > http://cwiki.apache.org/WW/action-configuration.html > > On 8/6/07, Session A Mwamufiya <[EMAIL PROTECTED]> wrote: >> >&g

Re: populating input fields on page load

2007-08-06 Thread Session A Mwamufiya
xml:21:52 I'm using struts 2.0.6, is redirectAction not defined for it? > --- Session A Mwamufiya wrote: >> I tried to follow this approach, but my server fails in struts.xml, >> stating that there's an error in building results for my first action. > > Does it

Re: populating input fields on page load

2007-08-06 Thread Session A Mwamufiya
quot;second" type="redirectAction"> goSecondname="goSecond" class="com.myorg.MySecondAction"> > /jsp/mySecondAction.jsp > > > Session A Mwamufiya wrote: >> >> Hi, >> >> I have a page with input fields, and would

Re: populating input fields on page load

2007-08-06 Thread Session A Mwamufiya
hen the form is displayed. Is there something else that needs to be setup in the jsp? Thanks, Session > Hi, > > Implement the prepare method in your action class and add the code in that > method. > > Thanks, > > Nuwan > > > Session A Mwamufiya wrote: &g

populating input fields on page load

2007-08-06 Thread Session A Mwamufiya
Hi, I have a page with input fields, and would like my action to populate those fields before they get displayed. This page is handled by a certain action, but it is the result page from a different action (I click on a button in the previous action form, and this one gets called up). I put s

Re: Gettin the selected item in a s:tree

2007-08-06 Thread Session A Mwamufiya
Hi again, Anyone has a clue about obtaining a user's selection in an s:tree element? I used the example from the showcase, and I don't fully understand the following script: function treeNodeSelected(nodeId) { dojo.io.bind({ url: "

popping messages from an action

2007-08-03 Thread Session A Mwamufiya
Hi, I know that I've sent many questions today, so please bear with me once more. I'd like to have my action popup a message to the user if a submit button is pressed and the entered data is incorrect. Is that possible? Or if not from struts 2, is there a way for struts 2 to execute html cod

Re: getting the selected item in s:select

2007-08-03 Thread Session A Mwamufiya
one by the framework and all we need to do is access the property that we've associated with the selection list. Thanks a million, and again sorry for the spam. Best, Session > Session A Mwamufiya wrote: >> Could someone tell me how in my action code I could get the item that >&g

obtaining a user selection, please help

2007-08-03 Thread Session A Mwamufiya
Hi, I've posted a number of times regarding this subject, but have not gotten a reply. I would think that others have used s:select before and know how to obtain a user's selection in data. Please help, because I have been stuck for a number of hours now. Thanks, Session --

getting the selected item in s:select

2007-08-03 Thread Session A Mwamufiya
Hi, Could someone tell me how in my action code I could get the item that was selected by a user in a s:select list? Thanks, Session - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

obtaining the selected item in s:tree

2007-08-03 Thread Session A Mwamufiya
Hi, Forgive the flurry of posts. I'd like to be able to do two things with tree nodes: - determine which one was clicked from my action code (getting the corresponding id is enough) - display the nodes in different colors depending on the type of the object. I can determine the type of the ob

obtaining a user's selection in a s:select object

2007-08-03 Thread Session A Mwamufiya
Hi again, How should I go about obtaining a user's selection in an s:select element from my action's code? Thanks, Session - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

alerting users from an action

2007-08-03 Thread Session A Mwamufiya
Hi, Is it possible to have an action process a page and launch an alert dialog box if it encounters an issue that the user should be made aware of? Additionally, how would I launch a confirmation dialog box and get the user's choice? Thanks, Session --

Re: using css with struts 2

2007-08-02 Thread Session A Mwamufiya
I got it cleared up, it was an issue with not using the absolute path in my link. Thanks, Session > Hi, Do you have your form's theme set to css_xhtml ? > > Leena > > On 7/31/07, Session A Mwamufiya <[EMAIL PROTECTED]> wrote: >> >> Hi, >> >

performing multiple things with a single button

2007-08-02 Thread Session A Mwamufiya
Hi, I have two frames and would like to have the submit button from one frame be handled by that frame's action and do the following: 1. capture values from the frame and put them in the session object 2. load a different page in the current frame 3. force the other frame to reload Getting 1 and

placing 2 buttons next to each other

2007-08-02 Thread Session A Mwamufiya
Hi, Is there a way to configure an s:form tag so that the 2 submit buttons appear side by side instead of one under the other? I use a css file with input.actionButtons {float: left;} to move both of them to the left, but they're not appearing next to each other. Thanks, Session ---

setting the frame in which a particular result page is displayed

2007-08-02 Thread Session A Mwamufiya
Hi, I have a number of result pages for my action, and I would like them to appear in different frames. Is there a way to define the target frame for each result page? Thanks, Session - To unsubscribe, e-mail: [EMAIL PROTECT

  1   2   >