I've tried it. The problem is solved. You can see solution here:
http://stackoverflow.com/questions/4109125/struts2-pass-actions-method-result-to-custom-tag
--
View this message in context:
http://old.nabble.com/How-to-pass-date-from-action-to-custom-jsp-tag--tp30144287p30152338.html
Sent from
Hello, I want to create simple dummy tag.
I have an action:
class MyAction extends ActionSupport{
/** Some code*/
public Department getRoot(){
/** Some code foes here...*/
return departmentInstance;
}
}
a tag:
%...@tag language=java pageEncoding=UTF-8 body-content=empty %%@
Hi, please, help me to find a solution.
I'm using json plugin. The base of my app is IBM WebSphere Portal Server
6.1, I'm writing portlets.
This is xml configuration for action
[code]
action name=refreshProductList class=MyClass
interceptor-ref name=portletResponse
Good day. I have a question
Please, see fragment from struts.xml:
action name=SavePersonInSession
class=ibs.pperson.web.action.WorkWithSession method=store
result name=success type=redirectAction
Search
/
KE LI-2 wrote:
I think some thing is wrong at these lines,
result name=* type=redirect-action
ViewTestedLetters
/admin
1
/result
Nabble swallowed my tags, I've replaced them on [ and ]
result
When I try to redirect action and set parameter value to it, I get an
exception:
[02.12.08 12:11:33:705 MSK] 0031 OgnlUtil W
com.opensymphony.xwork2.util.OgnlUtil internalSetProperty Caught
OgnlException while setting property 'page' on type
holod wrote:
I use s:iterator/
inside this tag I want to compose a String.
I've tried this one:
s:set name=representativeIds value= scope=page/
s:iterator value=lawDraft.representatives
s:if test
@TypeConversion(converter =
project.action.admin.converter.DateConverter)
@RequiredFieldValidator(message=Please, enter date. Field can't be
empty)
//@DateRangeFieldValidator(min = 01.01.1990, max = ${new Date()},
message = date must be between ${min} and ${max}, current
I have an action:
action name=StoreLawDraft
class=project.action.admin.StoreLawDraftAction
result name=success type=chain
ShowMainPage
/admin
/result
result name=input/admin/processlaw.jsp/result
result
Excuse me for flooding. The answer is very-very easy.
Designer put away s:url tags for JavaScript and ccs files. That is why
they were not visible for browser.
Check your designers :)
holod wrote:
I have an action:
.action name=StoreLawDraft
class=project.action.admin.StoreLawDraftAction
I've found this one discussion:
http://forums.opensymphony.com/thread.jspa;jsessionid=aaSWPA1PEcc4tixQ2U?messageID=5041#5041
I need the same: min parameter is fixed, max parameter is dynamic
(currentDay + 1 day). Please, show me how can I use some static method
inside annotation.
holod wrote
for me, but I'm using WebSphere AppServer 6.1 + EJB3 feature pack.
The problem was in difference between IBM JDK and Sun JDK.
Good luck, Anton.
JAnton wrote:
I'm using JBOSS-5.0.0.CR1, could you please explain in more details what I
should do?
On Fri, Aug 8, 2008 at 7:37 PM, holod [EMAIL
If you are using IBM WebSphere 6.x, that's ok.
I've faced the same problem: http://jira.opensymphony.com/browse/XW-651
So, I've simply checked out branch of x-work, packaged it using Maven and
now stupid IBM App server allows me to use validation.
Anyway, you you aren't WebSphere user, I
I use s:iterator/
inside this tag I want to compose a String.
I've tried this one:
s:set name=representativeIds value= scope=page/
s:iterator value=lawDraft.representatives
s:if test=id != 0
It was very silly question! Thanks, result type=chain solves the problem!
stanlick wrote:
Consider chaining over redirect. However, this does sort of hard wire
your
flow!
On Tue, Aug 5, 2008 at 5:33 AM, holod [EMAIL PROTECTED] wrote:
1.I have action PrepareDictionaryAction
it has
1.I have action PrepareDictionaryAction
it has field String dictionaryId and appropriate getter and setter.
dictionaryid comes from previous jsp. (enter.jsp)
action sends user to dictionary.jsp
2.dictionary jsp has hidden field s:hidden name=dictionaryId/. So I will
not be lost.
3.then through
And I will explain why.
If I make any mistakes, please, tell me.
This is my struts2 tag:
s:a id=AncorId
showLoadingText=false
targets=%{'linkattachedMainDocRow' + #document.count}
theme=ajax
href=%{#deleteDocumentAction}
notifyTopics=/afterDeleteLaw
.
If you're interested in programming JS I'd recommend the Crockford videos.
Well worth the time, and it'll improve your programming in other languages
as well.
Dave
--- On Thu, 7/31/08, holod [EMAIL PROTECTED] wrote:
From: holod [EMAIL PROTECTED]
Subject: s:a dojo-anchor, seems like
I use dojo anchor widget (s:a/).
It successfully gets response in json from server, but I have several
problems accessing widget, that published a topic.
Please, see my code:
dojo.event.topic.subscribe(/after, function(data, request, widget){
alert('inside a topic event. after request');
] [2] recommend?
jk
[1] [EMAIL PROTECTED]
[2] http://dojotoolkit.org/*
*
On Wed, Jul 30, 2008 at 8:57 AM, holod [EMAIL PROTECTED] wrote:
I use dojo anchor widget (s:a/).
It successfully gets response in json from server, but I have several
problems accessing widget, that published a topic
Thanks newton.dave , I've spent some time experimenting with s:a/ tag
attributes.
Now, I have problem with notifyTopics.
Please, see my function:
1.
dojo.event.topic.subscribe(/afterDeleteLaw, function(data, request,
widget){
//data : text returned from request(the html) It is my json
dojo.event.topic.subscribe(/afterDeleteLaw, function(data, request,
widget){
//data : text returned from request(the html) It is my json
//request: XMLHttpRequest object
//widget: widget that published the topic
var _mydata = eval(( + data +));
});
and:
--- On Fri, 7/25/08, holod [EMAIL PROTECTED] wrote:
I've seen s:div/ tag, but I didn't understand how can
I invoke request to action manually (by mouse click for example)
s:a...?
http://struts.apache.org/2.x/docs/dojo-anchor.html
Note that if you're using S2.0 you'll need to look
Now, I have another problem:
My iterator generates trsome content/tr
I want to give id=bla-bla to my generated raws of table.
For example iterator makes 5 iterations, I get 5 rows (trsome
content/tr), but I want to set id attribute for them:
tr id=MyGeneratedRow0some content/tr
tr
That's not valid JSP; you can't nest tags like that.
Any suggestions, please, can't understand mistake.
That's not what s:param... is for; it's for parameterizing other tags.
tr id=foos:property value=#status.indexbar/tr
You could use s:set... to create the ID if you don't want to create it
tr id=attachedMainDocRows:property value=#document.count/
works fine. It just starts from 1, not from 0
Why? I can't understand what has happened to index.
count is not so bad, thanks for you help and cooperation!
--
View this message in context:
I use s:a/ tag.
It has attribute targets=
My targets generated inside s:interator/ It means they have distinguish
Id's:
tr id=attachedMainDocRow1someContent/tr
tr id=attachedMainDocRow2someContent/tr
tr id=attachedMainDocRow3someContent/tr
I make id attribute of tr with this expression:
tr
targets[s:property value=%{'attachedMainDocRow' + #document.count}/]
works fine,
s:a id= showLoadingText=false targets=%{'attachedMainDocRow' +
#document.count}
theme=ajax href=%{#deleteDocumentAction}
I use s:a/ tag (dojo-anchor)
This tag invokes action, which has result type=json (I'm using JSON plugin
for struts2).
It returns values of all public get*() methods of invoked action in JSON.
I want to do this thing:
1.catch result, parse it and get value of only one public get*() method.
and :.
And the second question:
How is it possible to execute my own JS script right after s:a/
execution?
newton.dave wrote:
--- On Mon, 7/28/08, holod [EMAIL PROTECTED] wrote:
I want to do this thing:
1.catch result, parse it and get value of only one public
get*() method.
2.write it (targets
and :.
And the second question:
How is it possible to execute my own JS script right after s:a/
execution?
newton.dave wrote:
--- On Mon, 7/28/08, holod [EMAIL PROTECTED] wrote:
I want to do this thing:
1.catch result, parse it and get value of only one public
get*() method.
2.write it (targets
attribute var doesn't exist in my struts-tags.tld. I'm using the last one
struts2 pack.
lawDraft.docs returns List with 5 elements.
Simple printing /s:property value=lawDraft.docs shows 5 elements
I've tried to invoke method getTitle() of class Document which instances
are in ArrayList:
1.
I have very easy problem, can I solve it with the help of any struts2 tag?
Explanation:
I have an image.
User clicks on this image.
Request with several parameters goes to a server.
Action is invoked, parameters used during action execution.
Action sends back simple string Success or Fail.
this
Thank you, I've finally solved the problem! Previous solutions helped me,
seems like I was making stupid mistakes.
This code snippet prints links to my download action, my download action
works fine.
Thank you again!
s:iterator value=lawDraft.docs id=doc
Plsease, see my code:
table
s:iterator value=%{lawDraft.docs} status=document
tr
td
s:url id=downloadLink
value=downloadLawDraftDocument.action
namespace=/admin
s:param
I have a question, please see code of my action:
public class PrepareLawDraftAction extends ActionSupport{
private LawDraft lawDraft; //has method getDateIntro(), which returns Date
private Date loadDate;
public String execute(){
//...
}
@TypeConversion(converter =
fields that the user can't modify, which it discards the option of
rewriting those fields as hidden fields in your form (for security
reasons)
2008/7/18 holod [EMAIL PROTECTED]:
Please, help me with suggestion.
My logic is:
1.PrepareLawAction is invoked.
This action gets Law object from DB
Please, help me with suggestion.
My logic is:
1.PrepareLawAction is invoked.
This action gets Law object from DB (if action received lawId parameter ) or
it prepares template Law object (just automatically fills some Law fields
which user can't modify).
2.Action sends user to processlaw.jsp
modify, which it discards the option of
rewriting those fields as hidden fields in your form (for security
reasons)
2008/7/18 holod [EMAIL PROTECTED]:
Please, help me with suggestion.
My logic is:
1.PrepareLawAction is invoked.
This action gets Law object from DB (if action received lawId
My struts.xml:
nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;#60;action name=StoreLawDraft
class=lol.action.admin.StoreLawAction#62;
nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp; #60;result
name=success#62;/admin/processlaw.jsp#60;/result#62;
nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;#60;result
Stacktrace:
[17.07.08 11:20:18:239 MSD] 0066 SystemOut O #PrepareLawDraftAction
RESULT = success
[17.07.08 11:20:18:255 MSD] 0066 ServletWrappe E SRVE0068E:
Необрабатываемая исключительная ситуация сгенерирована в одном из служебных
методов сервлета: /admin/processlaw2.jsp.
Lukasz Lenart wrote:
name of the action in struts.xml, so you should put # in there.
It should be:
you shouldn't put # in there.
Regards
--
Lukasz
http://www.lenart.org.pl/
-
To unsubscribe, e-mail: [EMAIL
Finally, I found a error.
I've got freemaker.jar and freemaker-2.x.x.jar in classpath.
freemaker.jar is used by other app, freemaker-2.x.x is used by struts2 app.
So, the first freemaker.jar was on duty to provide classes.
Now, I've removed ald version of freemaker, and this terrible exception
My task is:
1. Action PrepareLawDraft has private field LawDraft lawDraft ; it has
public getter and setter.
This action fills LawDraft object fields.
2.On ActionSupport.SUCCESS I go to processlaw.jsp
On this jsp I want to output some fields of LawDraft and allow user to
modify
3.Then user
44 matches
Mail list logo