Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

user Digest 4 Jun 2008 12:50:21 -0000 Issue 8070

user-digest-help

2008-06-04


Author LoginPost Reply

user Digest 4 Jun 2008 12:50:21 -0000 Issue 8070

Topics (messages 187210 through 187230):

Re: Struts 2 / Eclipse
 187210 by: Andrew Myers

Re: welcome file on localhost
 187211 by: Al Sutton

S2 Refering to another key in the Resource Bundle?
 187212 by: Rubens
 187223 by: Maxx

Re: [ANN] Struts 2 in Action now available
 187213 by: Giovanni Azua
 187214 by: Frans Thamura
 187224 by: stanlick.gmail.com

struts 2 radio tag selected default
 187215 by: aspat
 187219 by: Felipe Lorenz
 187225 by: Lukasz Lenart
 187227 by: aspat
 187228 by: aspat

Re: Action-Redirect Parameter Problem
 187216 by: Adam Hardy

focusElement attribute in <s:form> tag
 187217 by: StrutsUser
 187220 by: Felipe Lorenz
 187221 by: StrutsUser
 187222 by: Felipe Lorenz
 187229 by: StrutsUser
 187230 by: Felipe Lorenz

Re: Images in s:select
 187218 by: Felipe Lorenz

Help with remote div
 187226 by: Felipe Lorenz

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_187210.ezm (zipped)
Thanks to Musachy I have got this going now.

For anyone else interested reference there was one additional step I
needed after the instructions below, and that was to right click the
project in Eclipse, then select Properties and in J2EE Module
Dependencies put a checkbox next to "Maven Dependencies". Now I can use
maven and run my struts 2 project under tomcat with WTP

Musachy Barroso wrote:
> I always use maven and it is quite easy:
>
> http://struts.apache.org/2.1.2/docs/struts-maven-archetypes.html
>
> after you have your blank project created, just do a :
>
> mvn eclipse:eclipse -Dwtpversion=1.5
>
> in the project directory and import the generated project into
> eclipse. After that, just run it using WTP as usual.
>
> musachy


Attachment: user_187211.ezm (zipped)
It's a Jetty thing, not something related to localhost.

See
http://sourceforge.net/mailarchive/message.php?msg_name=B285FB88-985D-4DE1-A051-4F170C1D5238%40adjective.org
for an idea of how to do it.

Al.

Stetze2008 wrote:
> hi,
>
> when opening http://localhost:8080/myApplication/ on my local Jetty
> server instead of showing the action defined in the welcomefilelist of
> my web.xml I'm asked to download a file from type
> application/octet-stream.
> it works on the tomcat internet server. does anybody know how to solve
> this locally?
>
> thanks in advance,
> Stefan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>


Attachment: user_187212.ezm (zipped)

Does Struts 2 resource bundle support refering to previously defined
parameter keys in the resources file?

For example, something like this:

software.version=1.0.1
software.text=Software version is ${software.version}

<s:text name="software.text" /> prints
Software version is 1.0.1

I know I can use the {0}, {1}, ...{n} tokens and pass use
<s:param>...</s:param> with <s:text>...</s:text>. However, I have cases
where this is not possible to do.

Thanks.

Rubens.
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_187223.ezm (zipped)
On Wed, Jun 4, 2008 at 8:26 AM, Rubens <rubens_gomes@(protected):
>
> Does Struts 2 resource bundle support refering to previously defined
> parameter keys in the resources file?
>
> For example, something like this:
>
> software.version=1.0.1
> software.text=Software version is ${software.version}
>
> <s:text name="software.text" /> prints
> Software version is 1.0.1
>
> I know I can use the {0}, {1}, ...{n} tokens and pass use
> <s:param>...</s:param> with <s:text>...</s:text>. However, I have cases
> where this is not possible to do.

AFAIK, it's not working the way you excepted it to be, because this
resource bundle system is provided by the Java Properties class.

see: http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html

Maxx

Attachment: user_187213.ezm (zipped)
I am very excited that I've just received my copy :) You guys Don, Scott
and Chad did an excellent job. I specially like very much the coverage
of core topics of the framework e.g. the explanation on writing custom
validators for which there is not so much online documentation. I
yesterday ended up looking in a WW article for a concise explanation on
this topic but it was outdated for S2 ... today I have the book :)

What I like the most though is that this is the first Struts 2 book that
manages to be truly S2 version unspecific. I was afraid to receive just
another S2 book that would automatically become outdated but for Struts
2 in Action it is absolutely not the case. On the other hand, and as a
trade-off you find no info about some plugins shipped with Struts 2 e.g.
dojo but then maybe it was a bit out of scope. I think overall the scope
of this book is excellent and will be relevant for all 2.x versions to
come :)

If I were asked I would like to see/find in the market books strictly
dedicated to:

- Explaining all S2 key plugins e.g. dojo, REST, Code behind etc.
- Maybe another book dedicated solely to explaining how best
using/integrating AJAX toolkits with S2: YUI, DWR, dojo

Excellent job!

Best regards,
Giovanni

Attachment: user_187214.ezm (zipped)
On Wed, Jun 4, 2008 at 2:58 PM, Giovanni Azua <giaz@(protected):

> I am very excited that I've just received my copy :) You guys Don, Scott
> and Chad did an excellent job. I specially like very much the coverage of
> core topics of the framework e.g. the explanation on writing custom
> validators for which there is not so much online documentation. I yesterday
> ended up looking in a WW article for a concise explanation on this topic but
> it was outdated for S2 ... today I have the book :)
>

i bought the book, i recomment Ian's Struts 2 Web Project,

cool also

F

Attachment: user_187224.ezm (zipped)
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?

Thanks,
Scott Stanlick

On Wed, Jun 4, 2008 at 2:58 AM, Giovanni Azua <giaz@(protected):

> I am very excited that I've just received my copy :) You guys Don, Scott
> and Chad did an excellent job. I specially like very much the coverage of
> core topics of the framework e.g. the explanation on writing custom
> validators for which there is not so much online documentation. I yesterday
> ended up looking in a WW article for a concise explanation on this topic but
> it was outdated for S2 ... today I have the book :)
>
> What I like the most though is that this is the first Struts 2 book that
> manages to be truly S2 version unspecific. I was afraid to receive just
> another S2 book that would automatically become outdated but for Struts 2 in
> Action it is absolutely not the case. On the other hand, and as a trade-off
> you find no info about some plugins shipped with Struts 2 e.g. dojo but then
> maybe it was a bit out of scope. I think overall the scope of this book is
> excellent and will be relevant for all 2.x versions to come :)
>
> If I were asked I would like to see/find in the market books strictly
> dedicated to:
>
> - Explaining all S2 key plugins e.g. dojo, REST, Code behind etc.
> - Maybe another book dedicated solely to explaining how best
> using/integrating AJAX toolkits with S2: YUI, DWR, dojo
>
> Excellent job!
>
> Best regards,
> Giovanni
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>


--
Scott
stanlick@(protected)

Attachment: user_187215.ezm (zipped)

Hi,

I would like to know if there is a way to select a radio button in struts 2
by default, which allow me to avoid converting the code as follows :

<input type="radio" checked=true name="listSWModel" id="listSWModelradioList
:" value="List :"/><label for="listSWModelradioList :">List :</label>

I will prefer to use :

<s:radio id="listSWModelradio" name="listSWModel" list="listSWModelList" />

Can someone help me,

thanks,

aspat
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_187219.ezm (zipped)
i dont think so.... i do it by javascript... if somobady know... please..
tell us..

On Wed, Jun 4, 2008 at 5:58 AM, aspat <loukoulouk93@(protected):

>
> Hi,
>
> I would like to know if there is a way to select a radio button in struts 2
> by default, which allow me to avoid converting the code as follows :
>
> <input type="radio" checked=true name="listSWModel"
> id="listSWModelradioList
> :" value="List :"/><label for="listSWModelradioList :">List :</label>
>
> I will prefer to use :
>
> <s:radio id="listSWModelradio" name="listSWModel" list="listSWModelList" />
>
> Can someone help me,
>
> thanks,
>
> aspat
> --
> View this message in context:
> http://www.nabble.com/struts-2-radio-tag-selected-default-tp17642159p17642159.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_187225.ezm (zipped)
Hi,

<s:radio list="#{'true':'Yes', 'false':'No'}" name="employee.active"
value="%{employee.active}"/>

or

<s:radio list="#{'true':'Yes', 'false':'No'}" name="employee.active"
value="true"/>


Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment: user_187227.ezm (zipped)

I find the solution :

<s:radio name="listSWModel" list="listSWModelCreate"
value="#{listSWModelCreate[0]:'Yes'}"/>
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_187228.ezm (zipped)

Thanks for your answer, the solution is : (i want to select the first item of
my list )

<s:radio name="listSWModel" list="listSWModelCreate"
value="#{listSWModelCreate[0]:'Yes'}"/>

aspat


Lukasz Lenart wrote:
>
> Hi,
>
> <s:radio list="#{'true':'Yes', 'false':'No'}" name="employee.active"
> value="%{employee.active}"/>
>
> or
>
> <s:radio list="#{'true':'Yes', 'false':'No'}" name="employee.active"
> value="true"/>
>
>
> Regards
> --
> Lukasz
> http://www.lenart.org.pl/
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_187216.ezm (zipped)
I don't have permission to re-open it unfortunately.

Musachy Barroso on 02/06/08 23:46, wrote:
> This should probably be re-opened as a bug. Just thinking out loud
> here, there should be some interface that results must implement if
> they want to use params this way, so the ReflectionProvider will just
> pass the params thru the interface method, instead of trying to set
> them as properties.
>
> musachy
>
> On Mon, Jun 2, 2008 at 6:20 PM, Adam Hardy
> <ahardy.struts@(protected):
>> That's a lucid explanation alright, but there are still a few unanswered
>> questions:
>>
>> - it's marked as resolved for 2.0.8, presumably the resolution is the
>> change of the logging from WARN to DEBUG. However in OgnlUtil line 369 in
>> v2.0.9, it's still logged at WARN.
>>
>> - perhaps this log level change should be requested and the issue should be
>> re-opened as an enhancement?
>>
>> - the real enhancement is as Don says, to refactor the code so that no
>> exception is thrown.
>>
>> Musachy Barroso on 02/06/08 18:52, wrote:
>>> Don had a better explanation on the issue :)
>>>
>>> "The actual problem here is the way that results are created. Result
>>> parameters are supposed to correspond to properties on the Result
>>> object, however the action redirect result uses them as parameters for
>>> its URL. When building the result, ognl will throw an exception, which
>>> is logged as a warn, if it can't set the property on the result
>>> object, which in this case, is ok. I've modified XWork to log them as
>>> debug since warn is too harsh. This has the sideeffect of possibly
>>> hiding issues with result parameters when they really are result
>>> properties, but I think it is the lesser of the two evils. The whole
>>> thing needs to be re-evaluated as there shouldn't be any case when
>>> exceptions thrown are "ok"."
>>>
>>> musachy
>>>
>>> On Mon, Jun 2, 2008 at 1:51 PM, Musachy Barroso <musachy@(protected):
>>>> If I don't remember wrong, the problem is that the value of params are
>>>> set as properties in the Result object. In the case of the
>>>> action-redirect result, these params are used as params to the target
>>>> action. The params are indeed passed, but when struts tries to set
>>>> them as properties in the result, it fails (hence the logged
>>>> exception).
>>>>
>>>> musachy
>>>>
>>>> On Mon, Jun 2, 2008 at 1:09 PM, Adam Hardy
>>>> <ahardy.struts@(protected):
>>>>> Only solution is a code change where it is logged.
>>>>>
>>>>> As I said earlier in the thread, I think that closed bug report should
>>>>> be
>>>>> re-opened or cloned and set to Enhancement.
>>>>>
>>>>> Mark Lester on 02/06/08 17:42, wrote:
>>>>>> Yeah it sets the parameter for me too it just throws the exception
>>>>>> which I a bit of an annoyance and wondering how to make it not throw
>>>>>> that exception
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Adam Hardy [mailto:ahardy.struts@(protected):
>>>>>> Monday,
>>>>>> June 02, 2008 8:43 AM
>>>>>> To: Struts Users Mailing List
>>>>>> Subject: Re: Action-Redirect Parameter Problem
>>>>>>
>>>>>> I had a look at the code and I can see why it throws an exception at
>>>>>> that point, but despite that, my experience is that it works - it does
>>>>>> set
>>>>>> the
>>>>>> parameter on my Result.
>>>>>>
>>>>>> Mark Lester on 02/06/08 13:08, wrote:
>>>>>>> Yeah I am still having problems with it.
>>>>>>>
>>>>>>> -----Original Message-----
>>>>>>> From: Adam Hardy [mailto:ahardy.struts@(protected):
>>>>>>> Sunday,
>>>>>>> June 01, 2008 2:52 PM
>>>>>>> To: Struts Users Mailing List
>>>>>>> Subject: Re: Action-Redirect Parameter Problem
>>>>>>>
>>>>>>> That issue is closed, although there is a comment left after it was
>>>>>>> closed suggesting that the issue is still a problem and that the bug
>>>>>>> should
>>>>>>> be re-opened.
>>>>>>>
>>>>>>> I see this 'warning' from OGNL wherever I use Action-Redirect
>>>>>> results
>>>>>>> with the latest struts2 version, and it's true that the stacktrace in
>>>>>>> the
>>>>>>> webserver log is distracting, but I don't find any problems with it
>>>>>>> like
>>>>>>> the last
>>>>>>> comment suggests.
>>>>>>>
>>>>>>> It's not clear why the poster of that comment didn't re-open the bug
>>>>>>> or create a new one if there is a real problem there.
>>>>>>>
>>>>>>> Do you find problems with it still?
>>>>>>>
>>>>>>> It seems to me that the issue should not have been changed from
>>>>>> status
>>>>>>> open to resolved, rather it should have been changed from priority
>>>>>>> major
>>>>>>> to
>>>>>>> enhancement.
>>>>>>>
>>>>>>> Also the poster of the last comment should have left more details
>>>>>> with
>>>>>>> perhaps a patch or unit-test displaying his/her bug.
>>>>>>>
>>>>>>>
>>>>>>> Adam
>>>>>>>
>>>>>>>
>>>>>>> Mark Lester on 30/05/08 14:31, wrote:
>>>>>>>> Thanks for the quick response. I don't think that is the problem
>>>>>>>> because that directory is already clear plus I have only used the
>>>>>>>> current version of struts2
>>>>>>>> -----Original Message-----
>>>>>>>> From: Owen Berry [mailto:owen.berry@(protected),
>>>>>>>> 2008 9:24 AM
>>>>>>>> To: Struts Users Mailing List
>>>>>>>> Subject: Re: Action-Redirect Parameter Problem
>>>>>>>>
>>>>>>>> If you're using Maven, you should try clearing out your local Maven
>>>>>>>> repository (rm -rf ~/.m2/repository) and try again ... I've had a
>>>>>>> few
>>>>>>>> cases where I seemed to be using old versions of jars until I did
>>>>>>>> this.
>>>>>>>>
>>>>>>>> On Fri, May 30, 2008 at 9:18 AM, Mark Lester
>>>>>> <MarkL@(protected)>
>>>>>>>> wrote:
>>>>>>>>> I followed the
>>>>>>>>> http://struts.apache.org/2.x/docs/redirect-action-result.html To
>>>>>>>> pass
>>>>>>>>> parameters to an action
>>>>>>>>>
>>>>>>>>> And it generates the exception
>>>>>>>>>
>>>>>>>>> Caught OgnlException while setting property 'navigation' on type
>>>>>>>>> 'org.apache.struts2.dispatcher.ServletActionRedirectResult'.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> I looked the Exception up and I found a bug report for struts 2 at
>>>>>>>>>
>>>>>>>>> http://issues.apache.org/struts/browse/WW-1714
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> The problem is that it says the issue is resolved as of version
>>>>>>> 2.08
>>>>>>>>> but I am using 2.11 and I am still getting the warning.
>>>>>>>>>
>>>>>>>>> Information regarding this issue would be very helpful.


Attachment: user_187217.ezm (zipped)

Hi,
I have a requirement where I need to set the focus in a particular element
when a page is loaded. I tried using the 'focusElement' attribute in
<s:form> tag. I got the error 'Attribute focusElement invalid for tag form
according to TLD'. I am using struts2-core-2.0.11.jar and the form tag in
this version does not have the 'focusElement' attribute. I tried downloading
version 2.0.11.1 also. This too does not have this attribute.
Could anyone please help me on how to get the latest struts2 jar. Or is
there anyother way to set the focus to an element when the page is loaded?

Thanks & Regards
--
Sent from the Struts - User mailing list archive at Nabble.com.


Attachment: user_187220.ezm (zipped)
I do this by java scritp...

On Wed, Jun 4, 2008 at 8:12 AM, StrutsUser <ajaykumar.r@(protected)>
wrote:

>
> Hi,
> I have a requirement where I need to set the focus in a particular element
> when a page is loaded. I tried using the 'focusElement' attribute in
> <s:form> tag. I got the error 'Attribute focusElement invalid for tag form
> according to TLD'. I am using struts2-core-2.0.11.jar and the form tag in
> this version does not have the 'focusElement' attribute. I tried
> downloading
> version 2.0.11.1 also. This too does not have this attribute.
> Could anyone please help me on how to get the latest struts2 jar. Or is
> there anyother way to set the focus to an element when the page is loaded?
>
> Thanks & Regards
> --
> View this message in context:
> http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644275.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_187221.ezm (zipped)

Thanks Felipe.
Could you give me some pointers in writing this sort of Javascript code for
focussing on an element.
I am not well versed in Javascript. That's why.
Thanks & Regards
Ajay


felipe.lorenz wrote:
>
> I do this by java scritp...
>
> On Wed, Jun 4, 2008 at 8:12 AM, StrutsUser <ajaykumar.r@(protected)>
> wrote:
>
>>
>> Hi,
>> I have a requirement where I need to set the focus in a particular
>> element
>> when a page is loaded. I tried using the 'focusElement' attribute in
>> <s:form> tag. I got the error 'Attribute focusElement invalid for tag
>> form
>> according to TLD'. I am using struts2-core-2.0.11.jar and the form tag in
>> this version does not have the 'focusElement' attribute. I tried
>> downloading
>> version 2.0.11.1 also. This too does not have this attribute.
>> Could anyone please help me on how to get the latest struts2 jar. Or is
>> there anyother way to set the focus to an element when the page is
>> loaded?
>>
>> Thanks & Regards
>> --
>> View this message in context:
>> http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644275.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_187222.ezm (zipped)
Sure:

document.getElementById(<id_of_element>).focus();

On Wed, Jun 4, 2008 at 8:40 AM, StrutsUser <ajaykumar.r@(protected)>
wrote:

>
> Thanks Felipe.
> Could you give me some pointers in writing this sort of Javascript code for
> focussing on an element.
> I am not well versed in Javascript. That's why.
> Thanks & Regards
> Ajay
>
>
> felipe.lorenz wrote:
> >
> > I do this by java scritp...
> >
> > On Wed, Jun 4, 2008 at 8:12 AM, StrutsUser <ajaykumar.r@(protected)>
> > wrote:
> >
> >>
> >> Hi,
> >> I have a requirement where I need to set the focus in a particular
> >> element
> >> when a page is loaded. I tried using the 'focusElement' attribute in
> >> <s:form> tag. I got the error 'Attribute focusElement invalid for tag
> >> form
> >> according to TLD'. I am using struts2-core-2.0.11.jar and the form tag
> in
> >> this version does not have the 'focusElement' attribute. I tried
> >> downloading
> >> version 2.0.11.1 also. This too does not have this attribute.
> >> Could anyone please help me on how to get the latest struts2 jar. Or is
> >> there anyother way to set the focus to an element when the page is
> >> loaded?
> >>
> >> Thanks & Regards
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644275.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/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644692.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_187229.ezm (zipped)

Hi,
I tried this by putting this code in a javascript function and calling it
during onfocus of <s:form>. It's not working. I am not sure how to call this
function always when the page is loaded.

Ajay


felipe.lorenz wrote:
>
> Sure:
>
> document.getElementById(<id_of_element>).focus();
>
> On Wed, Jun 4, 2008 at 8:40 AM, StrutsUser <ajaykumar.r@(protected)>
> wrote:
>
>>
>> Thanks Felipe.
>> Could you give me some pointers in writing this sort of Javascript code
>> for
>> focussing on an element.
>> I am not well versed in Javascript. That's why.
>> Thanks & Regards
>> Ajay
>>
>>
>> felipe.lorenz wrote:
>> >
>> > I do this by java scritp...
>> >
>> > On Wed, Jun 4, 2008 at 8:12 AM, StrutsUser <ajaykumar.r@(protected)>
>> > wrote:
>> >
>> >>
>> >> Hi,
>> >> I have a requirement where I need to set the focus in a particular
>> >> element
>> >> when a page is loaded. I tried using the 'focusElement' attribute in
>> >> <s:form> tag. I got the error 'Attribute focusElement invalid for tag
>> >> form
>> >> according to TLD'. I am using struts2-core-2.0.11.jar and the form tag
>> in
>> >> this version does not have the 'focusElement' attribute. I tried
>> >> downloading
>> >> version 2.0.11.1 also. This too does not have this attribute.
>> >> Could anyone please help me on how to get the latest struts2 jar. Or
>> is
>> >> there anyother way to set the focus to an element when the page is
>> >> loaded?
>> >>
>> >> Thanks & Regards
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644275.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/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644692.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_187230.ezm (zipped)
Ok. put it insede of tag <HEAD>.

SOmething like this:
<head>
<script defer>
  _your_javascript_here_
</script>
</head>


On Wed, Jun 4, 2008 at 9:40 AM, StrutsUser <ajaykumar.r@(protected)>
wrote:

>
> Hi,
> I tried this by putting this code in a javascript function and calling it
> during onfocus of <s:form>. It's not working. I am not sure how to call
> this
> function always when the page is loaded.
>
> Ajay
>
>
> felipe.lorenz wrote:
> >
> > Sure:
> >
> > document.getElementById(<id_of_element>).focus();
> >
> > On Wed, Jun 4, 2008 at 8:40 AM, StrutsUser <ajaykumar.r@(protected)>
> > wrote:
> >
> >>
> >> Thanks Felipe.
> >> Could you give me some pointers in writing this sort of Javascript code
> >> for
> >> focussing on an element.
> >> I am not well versed in Javascript. That's why.
> >> Thanks & Regards
> >> Ajay
> >>
> >>
> >> felipe.lorenz wrote:
> >> >
> >> > I do this by java scritp...
> >> >
> >> > On Wed, Jun 4, 2008 at 8:12 AM, StrutsUser <
> ajaykumar.r@(protected)>
> >> > wrote:
> >> >
> >> >>
> >> >> Hi,
> >> >> I have a requirement where I need to set the focus in a particular
> >> >> element
> >> >> when a page is loaded. I tried using the 'focusElement' attribute in
> >> >> <s:form> tag. I got the error 'Attribute focusElement invalid for tag
> >> >> form
> >> >> according to TLD'. I am using struts2-core-2.0.11.jar and the form
> tag
> >> in
> >> >> this version does not have the 'focusElement' attribute. I tried
> >> >> downloading
> >> >> version 2.0.11.1 also. This too does not have this attribute.
> >> >> Could anyone please help me on how to get the latest struts2 jar. Or
> >> is
> >> >> there anyother way to set the focus to an element when the page is
> >> >> loaded?
> >> >>
> >> >> Thanks & Regards
> >> >> --
> >> >> View this message in context:
> >> >>
> >>
> http://www.nabble.com/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644275.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/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17644692.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/focusElement-attribute-in-%3Cs%3Aform%3E-tag-tp17644275p17645786.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_187218.ezm (zipped)
try something with CSS...

On Tue, Jun 3, 2008 at 6:48 PM, Volker Karlmeier <volker@(protected)>
wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello all,
>
>
> is it possible to design a list with an s:select-tag that conaints
> images ?
> I want to offer a list of available langauges with a flag, but how can
> I realize it ?
> any suggestions ?
>
> Volker
>
> Stetze2008 schrieb:
> > hi,
> >
> > when opening http://localhost:8080/myApplication/ on my local Jetty
> > server instead of showing the action defined in the welcomefilelist
> > of my web.xml I'm asked to download a file from type
> > application/octet-stream.
> > it works on the tomcat internet server. does anybody know how to
> > solve this locally?
> >
> > thanks in advance,
> > Stefan
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.3 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFIRbwUx4KjH6Tk4MMRAuNcAJ9EmrGuUWQp/GPGmZ/s446wk1vBPgCdHDgn
> cALnW+RM5LoUaK079Ashq1k=
> =VJb6
> -----END PGP SIGNATURE-----
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment: user_187226.ezm (zipped)
Hi folks.

I've try to use remote divs, but the javascripts doesnt work, and i get some
exceptions!

This is my index.jsp

> <%@(protected)"%>
> <%@(protected)"%>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>   "http://www.w3.org/TR/html4/loose.dtd">
>
> <html>
>   <head>
>      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>      <title>JSP Page</title>
>      <s:head theme="ajax"/>
>      <link href="css/flora/flora.tabs.css" rel="stylesheet"
> type="text/css"/>
>      <script type="text/javascript"
> src="script/jquery-1.2.3.min.js"></script>
>      <script type="text/javascript"
> src="script/ui.core.min.js"></script>
>      <script type="text/javascript"
> src="script/ui.tabs.min.js"></script>
>      <script type="text/javascript"
> src="script/jquery.maskedinput-1.1.3.pack.js"></script>
>   </head>
>   <body>
>      <div id="tab" class="flora" style="width: 714px; height: 325px;">
>         <ul class="ui-tabs-nav">
>           <li id="1"><a href="#"><span>Dados Pessoais</span></a></li>
>           <li id="2"><a href="#"><span>Endereço</span></a></li>
>         </ul>
>         <s:div id="the_Div"
>             href="TH_DadosPessoais.jsp"
>             loadingText="Carregando..."
>             cssClass="ui-tabs-panel"
>             executeScripts="true"
>             separateScripts="false"
>             theme="ajax">
>         </s:div>
>      </div>
>   </body>
> </html>


And this is my TH_DadosPessoais.jsp head

> <%@(protected)"%>
> <%@(protected)"%>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
>   "http://www.w3.org/TR/html4/loose.dtd">
>
> <html>
>   <head>
>      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>      <title>JSP Page</title>
>      <s:head theme="ajax" debug="true"/>
>      <link href="css/form.css" rel="stylesheet" type="text/css"/>
>      <link href="css/flora.datepicker.css" rel="stylesheet"
> type="text/css"/>
>      <script type="text/javascript"
> src="script/jquery-1.2.3.min.js"></script>
>      <script type="text/javascript"
> src="script/jquery.maskedinput-1.1.3.pack.js"></script>
>      <script type="text/javascript">
>         $(document).ready(function(){
>           $("input").each(function(){
>              $(this).focus(function(){
>                 $(this).css('background-color', '#F7FEA0');
>              });
>              $(this).blur(function(){
>                 $(this).css('background-color', 'white');
>              });
>           });
>           $("#dataNasc_input").mask("99/99/9999", {placeholder:" "});
>           $("#numCartHabilit_input").mask("99999999999",
> {placeholder:" "});
>           $("#origem0").get(0).checked = true;
>           document.getElementById("nom_condempr").focus();
>         });
>      </script>
>   </head>
>   <body>
>

I think the problem is the <scripts> tag, but i've try delete, but even a
simple alert('') dont work. Why?
©2008 gg3721.com - Jax Systems, LLC, U.S.A.