Author Login
Post Reply
user Digest 4 Jun 2008 20:55:38 -0000 Issue 8071
Topics (messages 187231 through 187255):
Is there a subtile(s)?
187231 by: Dimitris Mouchritsas
187232 by: Antonio Petrelli
187237 by: Dimitris Mouchritsas
187238 by: Antonio Petrelli
Cannot use multiple s:action tags?
187233 by: Michael Gagnon
187240 by: Martin Gainty
Re: Is there such a thing as flash in S2?
187234 by: kenk
javascript struts
187235 by: Chris Pat
Re: [ANN] Struts 2 in Action now available
187236 by: Giovanni Azua
[Struts 2] Formatting double
187239 by: Milan Milanovic
187243 by: Milan Milanovic
187245 by: Dave Newton
187250 by: Felipe Lorenz
Re: need help with validation
187241 by: Greg Lindholm
several action execs to fill a form
187242 by: Juan Pablo Pizarro
187244 by: Dave Newton
Interceptor for putting in KVP for i18n
187246 by: tim robertson
s:select - execute action onChange
187247 by: Stetze2008
187249 by: Felipe Lorenz
Re: Getting a s:select selected value
187248 by: piltrafeta
187251 by: Felipe Lorenz
187252 by: piltrafeta
187255 by: Felipe Lorenz
[Struts2] Convention Plugin
187253 by: vikofvan
187254 by: Musachy Barroso
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_187231.ezm (zipped)Hi all,
I'm searching if there's a meaning like subtiles in struts. We have one
tile, "menu", which will hold 3 menus. Should we break it into 3
different tiles, say
menu_admin, menu_info, menu_login or can we define it in another way?
Thanks
Dimitris

Attachment:
user_187232.ezm (zipped)2008/6/4 Dimitris Mouchritsas <dimitris.mouchritsas@(protected)>:
> Hi all,
> I'm searching if there's a meaning like subtiles in struts. We have one
> tile, "menu", which will hold 3 menus. Should we break it into 3 different
> tiles, say
> menu_admin, menu_info, menu_login or can we define it in another way?
What do you mean with "menu" here?
What version of Struts and Tiles are you using?
Antonio

Attachment:
user_187237.ezm (zipped)Antonio Petrelli wrote:
> 2008/6/4 Dimitris Mouchritsas <dimitris.mouchritsas@(protected)>:
>
>> Hi all,
>> I'm searching if there's a meaning like subtiles in struts. We have one
>> tile, "menu", which will hold 3 menus. Should we break it into 3 different
>> tiles, say
>> menu_admin, menu_info, menu_login or can we define it in another way?
>>
>
> What do you mean with "menu" here?
> What version of Struts and Tiles are you using?
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
We're using Struts 1.2.4. The menu would look something like:
== Logged in ===
John Doe (my role)
Last login: .....
> My Profile
> My Notifications
> My homepage
> Log out
== Administration ===
> Organization Management
> User Management
> Email User
....
== Information ===
> News
> Statistics
.....
with > I denote links. So in essence there are 3 seperate menus there.
There will need to be logic to hide/show specific items in each menu,
according to a user's role.
Regards
Dimitris

Attachment:
user_187238.ezm (zipped)2008/6/4 Dimitris Mouchritsas <dimitris.mouchritsas@(protected)>:
> The menu would look something like:
> .....
>
> So in essence there are 3 seperate menus there.
Ok, you can use "definition in a definition". For example:
<definition name="menuContainer" template="/threeRows.jsp">
<put name="menu1" value="menuLogin" />
<put name="menu2" value="menuAdministration" />
<put name="menu3" value="menuInformation" />
</definition>
<definition name="menuLogin" template="/iterate.jsp">
<!-- put your attributes here -->
</definition>
<!-- you see the pattern :-) -->
> There
> will need to be logic to hide/show specific items in each menu, according to
> a user's role.
You can use a controller (a Tiles controller) to create items to show
in a JSP page.
HTH
Antonio

Attachment:
user_187233.ezm (zipped)When I attempt to use more than 1 s:action tag on a page, I just get back a
blank page - no error, no console output, just nothing.
My page just looks like:
<body>
<h1><s:property value="project.title"/></h1>
<s:action namespace="/admin/nextGen" name="ManageNotes"
executeResult="true">
<s:param name="id" value="%{project.id}"/>
</s:action>
<br/>
<s:action namespace="/admin/nextGen" name="ManageSamples"
executeResult="true">
<s:param name="id" value="%{project.id}"/>
</s:action>
<br/>
</body>
If I just use one action (either one alone), the page is correctly rendered
with that content. I see the header text with the content result of the
action. With both present, I don't even see the header text. I don't even
get any html back -- just blank. No struts error, no tomcat error...nothing.
Tomcat is running in eclipse, and my console shows no output beyond the
startup output. What might cause this?

Attachment:
user_187240.ezm (zipped)
tough to say without seeing the web.xml
I would be looking for the servlet entry for admin.NextGen.ManageNotes
and also the servlet web.xml entry for admin.NextGen.ManageSamples
also please display code for each Action class
Any or configurations in struts-config.xml should be displayed as well
Thanks
Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
> From: mgagnon@(protected)
> To: user@(protected)
> Subject: Cannot use multiple s:action tags?
> Date: Wed, 4 Jun 2008 09:31:37 -0400
>
> When I attempt to use more than 1 s:action tag on a page, I just get back a
> blank page - no error, no console output, just nothing.
>
> My page just looks like:
> <body>
> <h1><s:property value="project.title"/></h1>
> <s:action namespace="/admin/nextGen" name="ManageNotes"
> executeResult="true">
> <s:param name="id" value="%{project.id}"/>
> </s:action>
> <br/>
>
> <s:action namespace="/admin/nextGen" name="ManageSamples"
> executeResult="true">
> <s:param name="id" value="%{project.id}"/>
> </s:action>
> <br/>
> </body>
>
>
>
> If I just use one action (either one alone), the page is correctly rendered
> with that content. I see the header text with the content result of the
> action. With both present, I don't even see the header text. I don't even
> get any html back -- just blank. No struts error, no tomcat error...nothing.
> Tomcat is running in eclipse, and my console shows no output beyond the
> startup output. What might cause this?
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
_________________________________________________________________
Search that pays you back! Introducing Live Search cashback.
http://search.live.com/cashback/?&pkw=form=MIJAAF/publ=HMTGL/crea=srchpaysyouback

Attachment:
user_187234.ezm (zipped)
Thanks GB. I'll try to respond back to this thread by friday or so. -- K
:working:
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_187235.ezm (zipped)Hello
Is/how it possible to process a js array into an array structure or multiple name/values input elements with struts? Then how would the form bean be structures? As a simple field of type arraylist? Finally what would the action be as simple as a getter of the arraylist? tia.

Attachment:
user_187236.ezm (zipped)stanlick@(protected):
> Thanks Giovanni --
>
> It is nice to hear all the work is paying off for you! Would you be willing
> to post a review on Amazon?
>
Sure thing! within the next 48 hours :)

Attachment:
user_187239.ezm (zipped)Hi,
I have a double value that should be formated in following format: 000.000,00. I just need to show this value in the jsp page with <s:property/>. How can I do this ?
--
Thx in advance, Milan Milanovic

Attachment:
user_187243.ezm (zipped)I found how to do it in this page: http://www.roseindia.net/struts/struts2/struts-2-format.shtml
But I'm not sure how can I format number e.g., like this: 000.000.000,00 kg
?
These patterns are not clear to me.
--
Thx, Milan
Milan Milanovic <milanmilanovich@(protected),
I have a double value that should be formated in following format: 000.000,00. I just need to show this value in the jsp page with . How can I do this ?
--
Thx in advance, Milan Milanovic

Attachment:
user_187245.ezm (zipped)It's standard Java I18N formatting, IIRC.
Maybe try some Java docs, [1] might help.
Dave
[1] http://java.sun.com/docs/books/tutorial/i18n/format/decimalFormat.html
--- On Wed, 6/4/08, Milan Milanovic <milanmilanovich@(protected):
> From: Milan Milanovic <milanmilanovich@(protected)>
> Subject: Re: [Struts 2] Formatting double
> To: "Struts Users Mailing List" <user@(protected)>
> Date: Wednesday, June 4, 2008, 12:06 PM
> I found how to do it in this page:
> http://www.roseindia.net/struts/struts2/struts-2-format.shtml
>
> But I'm not sure how can I format number e.g., like
> this: 000.000.000,00 kg
>
> ?
>
> These patterns are not clear to me.
>
> --
> Thx, Milan
>
> Milan Milanovic <milanmilanovich@(protected):
> Hi,
>
> I have a double value that should be formated in following
> format: 000.000,00. I just need to show this value in the
> jsp page with . How can I do this ?
>
> --
> Thx in advance, Milan Milanovic

Attachment:
user_187250.ezm (zipped)Are you brazilian to use a comma for decimal separator?
whatever, if your system work only with that format(000.000,00) you can
create a String field in Action class, and do the parse from string to
double manually.
On Wed, Jun 4, 2008 at 2:14 PM, Dave Newton <newton.dave@(protected):
> It's standard Java I18N formatting, IIRC.
>
> Maybe try some Java docs, [1] might help.
>
> Dave
>
> [1] http://java.sun.com/docs/books/tutorial/i18n/format/decimalFormat.html
>
> --- On Wed, 6/4/08, Milan Milanovic <milanmilanovich@(protected):
>
> > From: Milan Milanovic <milanmilanovich@(protected)>
> > Subject: Re: [Struts 2] Formatting double
> > To: "Struts Users Mailing List" <user@(protected)>
> > Date: Wednesday, June 4, 2008, 12:06 PM
> > I found how to do it in this page:
> > http://www.roseindia.net/struts/struts2/struts-2-format.shtml
> >
> > But I'm not sure how can I format number e.g., like
> > this: 000.000.000,00 kg
> >
> > ?
> >
> > These patterns are not clear to me.
> >
> > --
> > Thx, Milan
> >
> > Milan Milanovic <milanmilanovich@(protected):
> > Hi,
> >
> > I have a double value that should be formated in following
> > format: 000.000,00. I just need to show this value in the
> > jsp page with . How can I do this ?
> >
> > --
> > Thx in advance, Milan Milanovic
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_187241.ezm (zipped)
Also see the FAQ "How do we repopulate controls when validation fails"
http://struts.apache.org/2.0.11.1/docs/how-do-we-repopulate-controls-when-validation-fails.html
curiousengr wrote:
>
> Hi,
>
> I am facing problem with validation. I need urgent help if someone can
> provide it I will greatly appreciate that.
>
> I have an action entryAction which renders entry.jsp. In entry.jsp I
> display certain properties from the action class using s:property as well
> as I display a list of items in a drop down using s:iterator and and
> option tags. Along with this data display I also display a file upload
> form. Once the user chooses a file and uploads it then control goes to
> uploadSuccess.jsp via UploadAction.java. But if there are validation
> errors like file name is missing then control is supposed to go back to
> input page i.e. entry.jsp. I have tried both XML based validation as well
> as validation in Action class code. The validation works, errors are
> displayed on entry.jsp as expected but the property fields and the drop
> down data that were being displayed before the validation was triggered
> are no longer available on the UI. they are all blank. I do not know how
> to cause the entryAction to execute when validation error causes the
> entry.jsp to display due to <result
> name="input">entry.jsp</result> configuration. Can someone please guide
> me as to how to solve this problem with struts2? Is there any
> configuration parameter that I can pass or is there any kind of
> interceptor that I have to use? How do I cause an action to invoke when
> input result is configured as a jsp file?
>
> Thanks
> Pranav
>
>
>
>
>
> ---------------------------------------------------------------------
> 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_187242.ezm (zipped)Hi All.
I've a problem, I use a RequestListAction that return a List and it is
used to fill a form. The problem is that the getRequest method is
called several times before showing the result (form filled).
My action:
private Request request;
public Collection<CommandResult> getLstCommand() {
try {
lstCommand = new CommandResultServiceImpl().getByIdRequest(idRequest);
} catch (Exception e) {
lstCommand = null;
}
return lstCommand;
}
@Override
public String execute() throws Exception {
return SUCCESS;
}
public Request getRequest() {
try {
request = new RequestServiceImpl().getByIdRequest(idRequest);
} catch (Exception e) {
request = null;
}
return request;
}
My form:
<s:url id="url" action="RequestList" />
<h3>REQUEST DETAIL</h3>
<s:form action="%{url}" method="POST">
<table>
<tr>
<td><s:property value="%{getText('login')}" /></td>
<td><s:property value="request.user.login" /></td>
</tr>
<tr>
<td><s:property value="%{getText('country')}" /></td>
<td><s:property value="request.user.country.fullName" /></td>
</tr>
<tr>
<td><s:property value="%{getText('subject')}" /></td>
<td><s:property value="request.subject" /></td>
</tr>
<tr>
<td><s:property value="%{getText('description')}" /></td>
<td><s:property value="request.description" /></td>
</tr>
<tr>
<td><s:property value="%{getText('fail')}" /></td>
<td><s:property value="request.failEntity.fail.description" /></td>
</tr>
<tr>
<td><s:property value="%{getText('node')}" /></td>
<td><s:property value="request.node.description" /></td>
</tr>
<tr>
<td><s:property value="%{getText('severity')}" /></td>
<td><s:property value="request.severity.severity" /></td>
</tr>
<tr>
<td><s:property value="%{getText('siebelId')}" /></td>
<td><s:property value="request.siebelId" /></td>
</tr>
<tr>
<td><s:property value="%{getText('remedyId')}" /></td>
<td><s:property value="request.remedyId" /></td>
</tr>
<tr>
<td><s:property value="%{getText('paasPA')}" /></td>
<td><s:property value="request.paasPA" /></td>
</tr>
<tr>
<td><s:property value="%{getText('datetime')}" /></td>
<td><s:property value="request.datetime" /></td>
</tr>
</table>
<br>
<s:if test="%{lstCommand != null}">
<s:if test="%{lstCommand.size > 0}">
<table class="ex">
<tr>
<th>Command</th>
<th>Description</th>
<th>Result</th>
</tr>
<s:iterator value="lstCommand" id="commands" status="cmds_stat">
<tr>
<td><s:property value="command.command" /></td>
<td><s:property value="command.description" /></td>
<td><textarea rows="7" cols="30" readonly><s:property
value="result"/></textarea> </td>
<!--<td><s:property value="result" /></td>-->
<s:hidden value="idCommand" />
</tr>
</s:iterator>
</table>
</s:if>
<s:else>
<s:label>There are not commands associated.</s:label>
</s:else>
</s:if>
<br>
<s:submit value="FINISH" align="left" />
</s:form>
My struts.xml
<action name="ShowRequest"
class="org.gblx.action.tr.ShowRequestAction">
<result>/TR/showRequest.jsp</result>
</action>
Any idea?
Thanks
JP

Attachment:
user_187244.ezm (zipped)getRequest() is called repeatedly because you have a whole bunch of OGNL that looks like "request.node.description" etc. that calls getRequest().
If you were using Spring/etc. to handle service instantiation you wouldn't have to worry about this. Or you could just not get a new request every time.
Dave
--- On Wed, 6/4/08, Juan Pablo Pizarro <juanpablo.pizarro@(protected):
> From: Juan Pablo Pizarro <juanpablo.pizarro@(protected)>
> Subject: several action execs to fill a form
> To: "Struts Users Mailing List" <user@(protected)>
> Date: Wednesday, June 4, 2008, 12:05 PM
> Hi All.
>
> I've a problem, I use a RequestListAction that return a
> List and it is
> used to fill a form. The problem is that the getRequest
> method is
> called several times before showing the result (form
> filled).
>
> My action:
>
> private Request request;
>
> public Collection<CommandResult> getLstCommand() {
> try {
> lstCommand = new
> CommandResultServiceImpl().getByIdRequest(idRequest);
> } catch (Exception e) {
> lstCommand = null;
> }
> return lstCommand;
> }
>
> @Override
> public String execute() throws Exception {
> return SUCCESS;
> }
>
> public Request getRequest() {
> try {
> request = new
> RequestServiceImpl().getByIdRequest(idRequest);
> } catch (Exception e) {
> request = null;
> }
> return request;
> }
>
>
> My form:
>
> <s:url id="url" action="RequestList"
> />
> <h3>REQUEST DETAIL</h3>
> <s:form action="%{url}"
> method="POST">
> <table>
> <tr>
> <td><s:property
> value="%{getText('login')}"
> /></td>
> <td><s:property
> value="request.user.login" /></td>
> </tr>
> <tr>
> <td><s:property
> value="%{getText('country')}"
> /></td>
> <td><s:property
> value="request.user.country.fullName"
> /></td>
> </tr>
> <tr>
> <td><s:property
> value="%{getText('subject')}"
> /></td>
> <td><s:property value="request.subject"
> /></td>
> </tr>
> <tr>
> <td><s:property
> value="%{getText('description')}"
> /></td>
> <td><s:property
> value="request.description" /></td>
> </tr>
> <tr>
> <td><s:property
> value="%{getText('fail')}"
> /></td>
> <td><s:property
> value="request.failEntity.fail.description"
> /></td>
> </tr>
> <tr>
> <td><s:property
> value="%{getText('node')}"
> /></td>
> <td><s:property
> value="request.node.description" /></td>
> </tr>
> <tr>
> <td><s:property
> value="%{getText('severity')}"
> /></td>
> <td><s:property
> value="request.severity.severity"
> /></td>
> </tr>
> <tr>
> <td><s:property
> value="%{getText('siebelId')}"
> /></td>
> <td><s:property
> value="request.siebelId" /></td>
> </tr>
> <tr>
> <td><s:property
> value="%{getText('remedyId')}"
> /></td>
> <td><s:property
> value="request.remedyId" /></td>
> </tr>
> <tr>
> <td><s:property
> value="%{getText('paasPA')}"
> /></td>
> <td><s:property value="request.paasPA"
> /></td>
> </tr>
> <tr>
> <td><s:property
> value="%{getText('datetime')}"
> /></td>
> <td><s:property
> value="request.datetime" /></td>
> </tr>
> </table>
>
> <br>
> <s:if test="%{lstCommand != null}">
> <s:if test="%{lstCommand.size > 0}">
> <table class="ex">
> <tr>
> <th>Command</th>
> <th>Description</th>
> <th>Result</th>
> </tr>
> <s:iterator value="lstCommand"
> id="commands" status="cmds_stat">
> <tr>
> <td><s:property value="command.command"
> /></td>
> <td><s:property
> value="command.description" /></td>
> <td><textarea rows="7"
> cols="30" readonly><s:property
> value="result"/></textarea> </td>
> <!--<td><s:property value="result"
> /></td>-->
> <s:hidden value="idCommand" />
> </tr>
> </s:iterator>
> </table>
> </s:if>
> <s:else>
> <s:label>There are not commands
> associated.</s:label>
> </s:else>
> </s:if>
> <br>
> <s:submit value="FINISH"
> align="left" />
> </s:form>
>
> My struts.xml
> <action name="ShowRequest"
> class="org.gblx.action.tr.ShowRequestAction">
> <result>/TR/showRequest.jsp</result>
> </action>
>
> Any idea?
>
> Thanks
>
> JP
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail:
> user-help@(protected)

Attachment:
user_187246.ezm (zipped)Hi,
I am trying to write an interceptor that will put in key value pairs for
things that are not in the ResourceBundle.
Can someone please help? There are so many contexts, that I am not sure how
to set them.
Suppose I have a Map<String, String> that I want to put in such that
%getText(...) will find them.
Please any pointers gratefully received!
public String intercept(ActionInvocation invocation) throws Exception {
log.debug("Overriding the resource bundle");
Map<String, Object> overrides = new HashMap<String, Object>();
overrides.put("hello.world.text", "overriden");
invocation.getInvocationContext().getValueStack().setExprOverrides(overrides);
return invocation.invoke();
}
The reason I am doing this, is because I actually have code for a
MergedResourceBundle that reads and merges multiple property files of the
same path and name (different jars). Unfortunately the struts2 boils down
to a ResourceBundle.getResourceBundle(...) in LocalizedTextUtil which will
only grab one file. If someone can suggest a better approach to having this
read multiple ApplicationResources.properties I would gratefully receive
that too.
Tim

Attachment:
user_187247.ezm (zipped)hi I'm sorry but I did not find a quick solution for my problem on the web.
I want to execute an action if another value of the select-box was selected.
So i guess I have to use the onChange attribute but I dont know how.
this is my actual form:
<s:form action="changeDefaultScope" namespace="/user" method="POST"
theme="simple">
<s:select list="myList" key="label.allscopes"
listKey="id" listValue="name" value="myValue"
emptyOption="false" name="scopeId" theme="simple" />
<s:submit key="button.changeScope" theme="simple" />
</s:form>
I would like to call the action without the submit button. (Javasscript
- onChange)
Can anybody help? Thanks in advance.

Attachment:
user_187249.ezm (zipped)Hi. What action? A action to update another select, i.e.?
I use something like this:
onChange="jsFunction(this.value);"
function jsFunction( id ) {
var div = dojo.widget.byId("<my div>");
div.href = "myAction?myField="+id;
div.refresh();
}
That is it?
On Wed, Jun 4, 2008 at 4:12 PM, Stetze2008 <stetze2008@(protected):
> hi I'm sorry but I did not find a quick solution for my problem on the web.
>
> I want to execute an action if another value of the select-box was
> selected.
> So i guess I have to use the onChange attribute but I dont know how.
>
> this is my actual form:
>
> <s:form action="changeDefaultScope" namespace="/user" method="POST"
> theme="simple">
> <s:select list="myList" key="label.allscopes"
> listKey="id" listValue="name" value="myValue"
> emptyOption="false" name="scopeId" theme="simple" />
> <s:submit key="button.changeScope" theme="simple" />
> </s:form>
>
> I would like to call the action without the submit button. (Javasscript -
> onChange)
>
> Can anybody help? Thanks in advance.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_187248.ezm (zipped)
If i put key="maxCoord" it continues taking the value from the listbox of the
first record...
styl9090 wrote:
>
> Try changing this line,
> <s:select name="maxCoord" .../>
> to
> <s:select key="maxCoord" .../>
> then, your variable(maxCoord) will hold the selected value from the list
> box.
>
>
>
> piltrafeta wrote:
>>
>> Actually session.coordValues has a list with numbers from 1 to 10, and
>> this is correct...
>> The thing is that it takes maxCoord as an array. And it returns only the
>> first element, which means the value in the first select of the list of
>> records.
>>
>> I've tried creating only one form for all the records and what i obtains
>> in my maxCoord is a list with the values for each record.
>>
>>
>>
>> Laurie Harper wrote:
>>>
>>> The most likely explanation would be that your option values collection
>>> (session.coordValues) has empty or inconsistent key values. Check that
>>> it contains what you think it does.
>>>
>>> L.
>>>
>>> piltrafeta wrote:
>>>> Hi ,
>>>> i have a jsp with some forms like this :
>>>> <s:form action="acceptUser" method="post">
>>>> <tr>
>>>> <td>
>>>> <s:a href="#" onclick="accept(%{#users.value._id})"> Accept </s:a>
>>>> </td>
>>>> <td><s:url id="url" action="rejectUser" includeParams="none" >
>>>> <s:param name="idUser" value="%{#users.value._id}" />
>>>> </s:url>
>>>> <s:a href="%{url}"> Reject </s:a>
>>>> <!--<s:form action="rejectUser" method="post">
>>>> <s:a href="#" onclick="onLinkClick(%{#users.value._id})"> Reject
>>>> </s:a>
>>>> </s:form>-->
>>>> </td>
>>>> <td><s:property value="#users.value._name"/></td>
>>>> <td><s:property value="#users.value._username"/></td>
>>>> <td><s:select name="maxCoord"
>>>> headerValue="" headerKey="" list="#session.coordValues"
>>>> size="1" multiple="false" />
>>>> </td>
>>>> </tr>
>>>> <s:hidden name="idUser"/>
>>>> </s:form>
>>>>
>>>> and in my JavaActionClass i have a attribute with the same name as the
>>>> select element :
>>>> private String maxCoord;
>>>> public String accept() {
>>>> print(maxCoord);
>>>> return SUCCESS;
>>>> }
>>>> public String getMaxCoord() {
>>>> return maxCoord;
>>>> }
>>>> public void setMaxCoord(String maxCoord) {
>>>> this.maxCoord = maxCoord;
>>>> }
>>>> when i'm printing the maxCoord value, i only obtanins the correct value
>>>> if i
>>>> select the first form in my jsp class... if i chose any of the other i
>>>> get
>>>> an empty string.
>>>> Can you halp me with this please ?
>>>> Thanks
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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_187251.ezm (zipped)use javascript for this problem...
On Wed, Jun 4, 2008 at 4:35 PM, piltrafeta <piltrafeta@(protected):
>
> If i put key="maxCoord" it continues taking the value from the listbox of
> the
> first record...
>
>
>
>
> styl9090 wrote:
> >
> > Try changing this line,
> > <s:select name="maxCoord" .../>
> > to
> > <s:select key="maxCoord" .../>
> > then, your variable(maxCoord) will hold the selected value from the list
> > box.
> >
> >
> >
> > piltrafeta wrote:
> >>
> >> Actually session.coordValues has a list with numbers from 1 to 10, and
> >> this is correct...
> >> The thing is that it takes maxCoord as an array. And it returns only the
> >> first element, which means the value in the first select of the list of
> >> records.
> >>
> >> I've tried creating only one form for all the records and what i obtains
> >> in my maxCoord is a list with the values for each record.
> >>
> >>
> >>
> >> Laurie Harper wrote:
> >>>
> >>> The most likely explanation would be that your option values collection
> >>> (session.coordValues) has empty or inconsistent key values. Check that
> >>> it contains what you think it does.
> >>>
> >>> L.
> >>>
> >>> piltrafeta wrote:
> >>>> Hi ,
> >>>> i have a jsp with some forms like this :
> >>>> <s:form action="acceptUser" method="post">
> >>>> <tr>
> >>>> <td>
> >>>> <s:a href="#" onclick="accept(%{#users.value._id})"> Accept
> </s:a>
> >>>> </td>
> >>>> <td><s:url id="url" action="rejectUser" includeParams="none" >
> >>>> <s:param name="idUser" value="%{#users.value._id}" />
> >>>> </s:url>
> >>>> <s:a href="%{url}"> Reject </s:a>
> >>>> <!--<s:form action="rejectUser" method="post">
> >>>> <s:a href="#" onclick="onLinkClick(%{#users.value._id})"> Reject
> >>>> </s:a>
> >>>> </s:form>-->
> >>>> </td>
> >>>> <td><s:property value="#users.value._name"/></td>
> >>>> <td><s:property value="#users.value._username"/></td>
> >>>> <td><s:select name="maxCoord"
> >>>> headerValue="" headerKey=""
> list="#session.coordValues"
> >>>> size="1" multiple="false" />
> >>>> </td>
> >>>> </tr>
> >>>> <s:hidden name="idUser"/>
> >>>> </s:form>
> >>>>
> >>>> and in my JavaActionClass i have a attribute with the same name as the
> >>>> select element :
> >>>> private String maxCoord;
> >>>> public String accept() {
> >>>> print(maxCoord);
> >>>> return SUCCESS;
> >>>> }
> >>>> public String getMaxCoord() {
> >>>> return maxCoord;
> >>>> }
> >>>> public void setMaxCoord(String maxCoord) {
> >>>> this.maxCoord = maxCoord;
> >>>> }
> >>>> when i'm printing the maxCoord value, i only obtanins the correct
> value
> >>>> if i
> >>>> select the first form in my jsp class... if i chose any of the other i
> >>>> get
> >>>> an empty string.
> >>>> Can you halp me with this please ?
> >>>> Thanks
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >>> For additional commands, e-mail: user-help@(protected)
> >>>
> >>>
> >>>
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Getting-a-s%3Aselect-selected-value-tp17566943p17654835.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_187252.ezm (zipped)
what do you mean ?
felipe.lorenz wrote:
>
> use javascript for this problem...
>
> On Wed, Jun 4, 2008 at 4:35 PM, piltrafeta <piltrafeta@(protected):
>
>>
>> If i put key="maxCoord" it continues taking the value from the listbox of
>> the
>> first record...
>>
>>
>>
>>
>> styl9090 wrote:
>> >
>> > Try changing this line,
>> > <s:select name="maxCoord" .../>
>> > to
>> > <s:select key="maxCoord" .../>
>> > then, your variable(maxCoord) will hold the selected value from the
>> list
>> > box.
>> >
>> >
>> >
>> > piltrafeta wrote:
>> >>
>> >> Actually session.coordValues has a list with numbers from 1 to 10, and
>> >> this is correct...
>> >> The thing is that it takes maxCoord as an array. And it returns only
>> the
>> >> first element, which means the value in the first select of the list
>> of
>> >> records.
>> >>
>> >> I've tried creating only one form for all the records and what i
>> obtains
>> >> in my maxCoord is a list with the values for each record.
>> >>
>> >>
>> >>
>> >> Laurie Harper wrote:
>> >>>
>> >>> The most likely explanation would be that your option values
>> collection
>> >>> (session.coordValues) has empty or inconsistent key values. Check
>> that
>> >>> it contains what you think it does.
>> >>>
>> >>> L.
>> >>>
>> >>> piltrafeta wrote:
>> >>>> Hi ,
>> >>>> i have a jsp with some forms like this :
>> >>>> <s:form action="acceptUser" method="post">
>> >>>> <tr>
>> >>>> <td>
>> >>>> <s:a href="#" onclick="accept(%{#users.value._id})">
>> Accept
>> </s:a>
>> >>>> </td>
>> >>>> <td><s:url id="url" action="rejectUser" includeParams="none" >
>> >>>> <s:param name="idUser" value="%{#users.value._id}" />
>> >>>> </s:url>
>> >>>> <s:a href="%{url}"> Reject </s:a>
>> >>>> <!--<s:form action="rejectUser" method="post">
>> >>>> <s:a href="#" onclick="onLinkClick(%{#users.value._id})"> Reject
>> >>>> </s:a>
>> >>>> </s:form>-->
>> >>>> </td>
>> >>>> <td><s:property value="#users.value._name"/></td>
>> >>>> <td><s:property value="#users.value._username"/></td>
>> >>>> <td><s:select name="maxCoord"
>> >>>> headerValue="" headerKey=""
>> list="#session.coordValues"
>> >>>> size="1" multiple="false" />
>> >>>> </td>
>> >>>> </tr>
>> >>>> <s:hidden name="idUser"/>
>> >>>> </s:form>
>> >>>>
>> >>>> and in my JavaActionClass i have a attribute with the same name as
>> the
>> >>>> select element :
>> >>>> private String maxCoord;
>> >>>> public String accept() {
>> >>>> print(maxCoord);
>> >>>> return SUCCESS;
>> >>>> }
>> >>>> public String getMaxCoord() {
>> >>>> return maxCoord;
>> >>>> }
>> >>>> public void setMaxCoord(String maxCoord) {
>> >>>> this.maxCoord = maxCoord;
>> >>>> }
>> >>>> when i'm printing the maxCoord value, i only obtanins the correct
>> value
>> >>>> if i
>> >>>> select the first form in my jsp class... if i chose any of the other
>> i
>> >>>> get
>> >>>> an empty string.
>> >>>> Can you halp me with this please ?
>> >>>> Thanks
>> >>>
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> >>> For additional commands, e-mail: user-help@(protected)
>> >>>
>> >>>
>> >>>
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Getting-a-s%3Aselect-selected-value-tp17566943p17654835.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_187255.ezm (zipped)Use javascript to select an item.
On Wed, Jun 4, 2008 at 5:02 PM, piltrafeta <piltrafeta@(protected):
>
> what do you mean ?
>
>
>
> felipe.lorenz wrote:
> >
> > use javascript for this problem...
> >
> > On Wed, Jun 4, 2008 at 4:35 PM, piltrafeta <piltrafeta@(protected):
> >
> >>
> >> If i put key="maxCoord" it continues taking the value from the listbox
> of
> >> the
> >> first record...
> >>
> >>
> >>
> >>
> >> styl9090 wrote:
> >> >
> >> > Try changing this line,
> >> > <s:select name="maxCoord" .../>
> >> > to
> >> > <s:select key="maxCoord" .../>
> >> > then, your variable(maxCoord) will hold the selected value from the
> >> list
> >> > box.
> >> >
> >> >
> >> >
> >> > piltrafeta wrote:
> >> >>
> >> >> Actually session.coordValues has a list with numbers from 1 to 10,
> and
> >> >> this is correct...
> >> >> The thing is that it takes maxCoord as an array. And it returns only
> >> the
> >> >> first element, which means the value in the first select of the list
> >> of
> >> >> records.
> >> >>
> >> >> I've tried creating only one form for all the records and what i
> >> obtains
> >> >> in my maxCoord is a list with the values for each record.
> >> >>
> >> >>
> >> >>
> >> >> Laurie Harper wrote:
> >> >>>
> >> >>> The most likely explanation would be that your option values
> >> collection
> >> >>> (session.coordValues) has empty or inconsistent key values. Check
> >> that
> >> >>> it contains what you think it does.
> >> >>>
> >> >>> L.
> >> >>>
> >> >>> piltrafeta wrote:
> >> >>>> Hi ,
> >> >>>> i have a jsp with some forms like this :
> >> >>>> <s:form action="acceptUser" method="post">
> >> >>>> <tr>
> >> >>>> <td>
> >> >>>> <s:a href="#" onclick="accept(%{#users.value._id})">
> >> Accept
> >> </s:a>
> >> >>>> </td>
> >> >>>> <td><s:url id="url" action="rejectUser" includeParams="none" >
> >> >>>> <s:param name="idUser" value="%{#users.value._id}" />
> >> >>>> </s:url>
> >> >>>> <s:a href="%{url}"> Reject </s:a>
> >> >>>> <!--<s:form action="rejectUser" method="post">
> >> >>>> <s:a href="#" onclick="onLinkClick(%{#users.value._id})"> Reject
> >> >>>> </s:a>
> >> >>>> </s:form>-->
> >> >>>> </td>
> >> >>>> <td><s:property value="#users.value._name"/></td>
> >> >>>> <td><s:property value="#users.value._username"/></td>
> >> >>>> <td><s:select name="maxCoord"
> >> >>>> headerValue="" headerKey=""
> >> list="#session.coordValues"
> >> >>>> size="1" multiple="false" />
> >> >>>> </td>
> >> >>>> </tr>
> >> >>>> <s:hidden name="idUser"/>
> >> >>>> </s:form>
> >> >>>>
> >> >>>> and in my JavaActionClass i have a attribute with the same name as
> >> the
> >> >>>> select element :
> >> >>>> private String maxCoord;
> >> >>>> public String accept() {
> >> >>>> print(maxCoord);
> >> >>>> return SUCCESS;
> >> >>>> }
> >> >>>> public String getMaxCoord() {
> >> >>>> return maxCoord;
> >> >>>> }
> >> >>>> public void setMaxCoord(String maxCoord) {
> >> >>>> this.maxCoord = maxCoord;
> >> >>>> }
> >> >>>> when i'm printing the maxCoord value, i only obtanins the correct
> >> value
> >> >>>> if i
> >> >>>> select the first form in my jsp class... if i chose any of the
> other
> >> i
> >> >>>> get
> >> >>>> an empty string.
> >> >>>> Can you halp me with this please ?
> >> >>>> Thanks
> >> >>>
> >> >>>
> >> >>>
> ---------------------------------------------------------------------
> >> >>> To unsubscribe, e-mail: user-unsubscribe@(protected)
> >> >>> For additional commands, e-mail: user-help@(protected)
> >> >>>
> >> >>>
> >> >>>
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Getting-a-s%3Aselect-selected-value-tp17566943p17654835.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)
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Getting-a-s%3Aselect-selected-value-tp17566943p17655387.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_187253.ezm (zipped)
Where can I get hold of the strust2 convention plugin? It seems to be missing
from the 2.1.2 build. Thanks.
Vikram
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_187254.ezm (zipped)The Convention plugin has not been released yet, it is in the sandbox here:
http://svn.apache.org/viewvc/struts/sandbox/trunk/struts2-convention-plugin/
musachy
On Wed, Jun 4, 2008 at 4:13 PM, vikofvan <vikofvan@(protected):
>
> Where can I get hold of the strust2 convention plugin? It seems to be missing
> from the 2.1.2 build. Thanks.
>
> Vikram
> --
> View this message in context: http://www.nabble.com/-Struts2--Convention-Plugin-tp17655614p17655614.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)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd