Re: Where did the target attribute go in the a-tag?

2008-01-29 Thread David Tercero

Hi niels,

   you can generate a html anchor, using the s:url tag to generate the href
url,

s:url ...  target=...some text 

hope this helps.




niels-15 wrote:
 
 There is no target attribute in de a-tag:
 http://struts.apache.org/2.x/docs/a.html
 
 I am a newbie, and want to open de link in another (specified) browser  
 window..
 
 How to overcome this?
 
 Niels
 

-- 
View this message in context: 
http://www.nabble.com/Where-did-the-target-attribute-go-in-the-a-tag--tp15156349p15157668.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem setting id property of texfield tag

2008-01-29 Thread David Tercero

Hi, thanks for the anwer.

   It is a bit complicated, because house.id is not in the value stack but
in the page context. I use JSTL tag to complement the struts ones, so
sometimes the property is in the page context.

   With the version 2.0.9 you could use the ${} expressions (Expression
Language), but not in the 2.0.11. Recently I updated my application from
2.0.9 to 2.0.11, and realized s: tags with EL expressions caused an
exception.

   I can't reference house.id as an OGNL expression because house is not in
the stack value. The main problem seems to be I can't give the id property a
value using the s:param tag, what it's not exposed in the struts2
documentation.

   I've tested something simillar

s:set name=tmpIds:param
name=valuestockTotal_${house.id}/s:param/s:set
s:textfield id=stockTotal_%{#tmpId} value=.../

   but this generate a dump of the value stack (like toString method):

id=stockTotal_{. valueStack dump .}


Thanks in advance.





Julien RICHARD-2 wrote:
 
 Do you tried :
 
 s:textfield id=stockTotal_%{house.id} value=%{house.number}/
 
 On Jan 29, 2008 12:32 PM, David Tercero [EMAIL PROTECTED] wrote:
 

 Hi all,

   I'm  having troubles setting the id property in a textfield tag. I use
 the version 2.0.11

   The case is I'm not able to introduce a variable value into the id
 property, I mean:

 s:textfield
s:param name=idstockTotal_${house.id}/s:param
s:param name=namestockList[${house.id}].number/s:param
s:param name=value${house.number}/s:param
 /s:textfield

   I generate several textfields like this one and I need to reference it
 in
 javascript (that's because i need to set the id property). Using the
 param
 tag doesn't work for the id, but goes right for the name and value
 propertys.

   I tried several ways but none of them seems to work.

 Any help would be appreciated.
 --
 View this message in context:
 http://www.nabble.com/Problem-setting-id-property-of-texfield-tag-tp15157521p15157521.html
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 
 -- 
 RICHARD Julien,
 UNILOG
 
 

-- 
View this message in context: 
http://www.nabble.com/Problem-setting-id-property-of-texfield-tag-tp15157521p15161516.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Problem setting id property of texfield tag

2008-01-29 Thread David Tercero

Hi, it works fine :clap:, Dave you are a crack ;-)

Thank you very much =)


newton.dave wrote:
 
 From: David Tercero [EMAIL PROTECTED]
 It is a bit complicated, because house.id is not in the value
 stack but in the request.
 
 
 ...
 
 
 #attr will also search the request scope.
 
 
 Dave
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Problem-setting-id-property-of-texfield-tag-tp15157521p15162594.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Error messages is repeated Using Struts 2 Annotation validation

2008-01-29 Thread David Tercero

Hi,

   Something simillar happens to me when i started with Struts 2. I use
appfuse and I realized that a message displays just above the field I'd
validated, and where I included a messages.jsp (this jsp displays the action
and error messages), usually at the top of the html page.

   To solve this I supressed the field messages (those that are displayed
above the field) rewriting the tag templates. Struts gives you the chance to
override the templates they provide. I created a tree at WEB-INF level just
like they are in the struts2-core library (template/css_xhtml/...). The
files you put there will overwrite the Struts2 ones, and change the default
behaviour of the tags.

Regards.


Johnson nickel wrote:
 
 Hi Friends,
 
 I am using Struts 2 application for my project. Before I was used Struts 1
 when compare to this
 
 Struts 2 is reduced lot of configuration problems. I have use the
 Annotation validation to validate the
 Username and password fields in my Login page.
 
 Code:
  

 @RequiredFieldValidator(type=ValidatorType.SIMPLE,fieldName=username,message=UserName
 is required)
 public String getUsername() {
   return username;
}
 
 
 
 Same as For password also ,
 
 When i have submit the Login button, the Error messages is displaying
 Repeated. I have spend lot of time
 on this issue. Can u anybody give me the solution.
 
 Thanks and Regards,
 Johnson
 

-- 
View this message in context: 
http://www.nabble.com/Error-messages-is-repeated-Using-Struts-2-Annotation-validation-tp15157319p15160651.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where did the target attribute go in the a-tag?

2008-01-29 Thread David Tercero

If you do that, the url will be printed on the html page. You can put it all
together:

lt;a href=lt;s:url action=foo id=fooUrl/gt;
target=_blankgt;...lt;/agt;

You can use a html anchor (lt;a href=gt;), and use the s:url tag to
provide the url. This is the way I usually code the links in my web
applications.

Regards.




newton.dave wrote:
 
 - Original Message 
 From: niels [EMAIL PROTECTED]
 To: Struts Users Mailing List user@struts.apache.org
 Sent: Tuesday, January 29, 2008 8:00:16 AM
 Subject: Re: Where did the target attribute go in the a-tag?
 
 David,
 
 I don't understand what you mean by anchor
 imagine the next situation.
 
 
 s:url action=foo id=fooUrl/
  s:property value='#fooUrl'  target=_blank... 
 
 
 Dave
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Where-did-the-target-attribute-go-in-the-a-tag--tp15156349p15160405.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Where did the target attribute go in the a-tag?

2008-01-29 Thread David Tercero

target belongs to the anchor, not to the s:url tag.




niels-15 wrote:
 
 Thanks David,
 
 but according to the TLD target is not a valid attribute for tag url
 
 Niels
 
 
 On Jan 29, 2008, at 12:44 PM, David Tercero wrote:
 

 Hi niels,

   you can generate a html anchor, using the s:url tag to generate  
 the href
 url,

 s:url ...  target=...some text

 hope this helps.




 niels-15 wrote:

 There is no target attribute in de a-tag:
 http://struts.apache.org/2.x/docs/a.html

 I am a newbie, and want to open de link in another (specified)  
 browser
 window..

 How to overcome this?

 Niels


 -- 
 View this message in context:
 http://www.nabble.com/Where-did-the-target-attribute-go-in-the-a-tag--tp15156349p15157668.html
 Sent from the Struts - User mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/Where-did-the-target-attribute-go-in-the-a-tag--tp15156349p15158312.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Problem setting id property of texfield tag

2008-01-29 Thread David Tercero

Hi all,

   I'm  having troubles setting the id property in a textfield tag. I use
the version 2.0.11

   The case is I'm not able to introduce a variable value into the id
property, I mean:

s:textfield
s:param name=idstockTotal_${house.id}/s:param
s:param name=namestockList[${house.id}].number/s:param
s:param name=value${house.number}/s:param
/s:textfield

   I generate several textfields like this one and I need to reference it in
javascript (that's because i need to set the id property). Using the param
tag doesn't work for the id, but goes right for the name and value
propertys.

   I tried several ways but none of them seems to work.

Any help would be appreciated.
-- 
View this message in context: 
http://www.nabble.com/Problem-setting-id-property-of-texfield-tag-tp15157521p15157521.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Struts 2.0.9 windowState=maximized problem

2007-08-30 Thread David Tercero

Hi all,

   I've got a problem, and I really don't know how to solve it. I'm using
Liferay Portal 4.2.2 and Struts 2.0.9

I've got 2 portlet in the window. The one above is showing a table of
authors, and clicking one row the bottom portlet shows its detail. Inside
the author's detail there's a link that maximized the window and shows the
detail of a book (written by the author).

The issue comes when I click on the arrow on the top-right corner (the back
button). The two portlets comes back, but the book detail is still on the
bottom instead of the author's detail (what it shoud be). This is because in
the back link there's a parameter referencing de book render action (if I
remove this parameter everything goes right).

The link (from author to book detail) is generated this way:
s:url action=renderFichaPublicacion portletUrlType=render
windowState=maximized/

and the action is defined:
action name=renderFichaPublicacion class=autorAction
method=editPublicacion
 result
name=success/WEB-INF/pages/produccion/autor/publicacionFicha.jsp/result
/action

The back button is rendered by the portal, but there's more portlets
included that hasn't this behaviour.

Any help?

Thanks.
-- 
View this message in context: 
http://www.nabble.com/Struts-2.0.9-windowState%3Dmaximized-problem-tf4353415.html#a12404761
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]