You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mead Lai <la...@gmail.com> on 2010/11/06 01:34:47 UTC
How to use
Hi All,
I am now using <s:optiontransferselect> tag with simple theme.
It shows two select-list fine, but if I click the button to move the items,
it doesn't work.
Any clue can help me?
Now I am trying to write a double-select with JQury & HTML.
Thank you in advance.
Regards,
Mead
Re: How to use
Posted by Li Ying <li...@gmail.com>.
The template of <optiontransferselect> has these code:
<#if !stack.findValue("#optiontransferselect_js_included")??><#t/>
<script type="text/javascript" src="<@s.url
value="/struts/optiontransferselect.js" encode='false'
includeParams='none'/>"></script>
<#assign temporaryVariable =
stack.setValue("#optiontransferselect_js_included", "true") /><#t/>
</#if>
These code should generate some HTML code which import the JS file.
And, the JS file is in the struts2-core-2.2.1.jar, under the path
[/org/apache/struts2/static/].
>> I am confused why the "optiontransferselect.js" was not automatically imported/generated into HTML page
Maybe there are something else getting wrong.
(1)check if the HTML code is right
(2)check if there are error messages on the client side
(3)check if there are exceptions on the server side
Maybe you can find something.
2010/11/7 Mead Lai <la...@gmail.com>:
> Appreciate all of you very much.
> Is the "/struts/optiontransferselect.js" included in the struts-core.jar?
> I am confused why the "optiontransferselect.js" was not automatically
> imported/generated into HTML page.
> I config the "struts.theme = simple" for entire project.
>
> Regards,
> Mead
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: How to use
Posted by Mead Lai <la...@gmail.com>.
Appreciate all of you very much.
Is the "/struts/optiontransferselect.js" included in the struts-core.jar?
I am confused why the "optiontransferselect.js" was not automatically
imported/generated into HTML page.
I config the "struts.theme = simple" for entire project.
Regards,
Mead
On Sat, Nov 6, 2010 at 9:08 PM, Li Ying <li...@gmail.com> wrote:
> Sorry, type error:
>
> "The is nothing ..."
>
> should be
>
> "There is nothing ..."
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: How to use
Posted by Li Ying <li...@gmail.com>.
Sorry, type error:
"The is nothing ..."
should be
"There is nothing ..."
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: How to use
Posted by Li Ying <li...@gmail.com>.
I read the source of <optiontransferselect>, it's template will
include the JS file [/struts/optiontransferselect.js] automatically.
The JS file included by <head> tag is [/struts/utils.js]. The is
nothing relate to <optiontransferselect> in it.
2010/11/6 Dave Newton <da...@gmail.com>:
> The JavaScript isn't being included. This is not an Ajax tag, and the s:
> head tag needs to be there.
>
> Dave
> On Nov 6, 2010 2:59 AM, "Li Ying" <li...@gmail.com> wrote:
>>> <s:optiontransferselect doubleList="{'testing','funning'}"
>>> list="{'spring','hibernate'}" doubleName=""></s:optiontransferselect>
>>
>>
>> Looks like you missed the attribute [name]
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: How to use
Posted by Dave Newton <da...@gmail.com>.
The JavaScript isn't being included. This is not an Ajax tag, and the s:
head tag needs to be there.
Dave
On Nov 6, 2010 2:59 AM, "Li Ying" <li...@gmail.com> wrote:
>> <s:optiontransferselect doubleList="{'testing','funning'}"
>> list="{'spring','hibernate'}" doubleName=""></s:optiontransferselect>
>
>
> Looks like you missed the attribute [name]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
Re: How to use
Posted by Li Ying <li...@gmail.com>.
> <s:optiontransferselect doubleList="{'testing','funning'}"
> list="{'spring','hibernate'}" doubleName=""></s:optiontransferselect>
Looks like you missed the attribute [name]
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: How to use
Posted by Mead Lai <la...@gmail.com>.
Hi Li,
Thank you very much.
<s:optiontransferselect doubleList="{'testing','funning'}"
list="{'spring','hibernate'}" doubleName=""></s:optiontransferselect>
There is no struts JavaScript included in the
Error in Chrome browser.:
Failed to load resource: the server responded with a status of 404 (Not
Found)
IndexAction_index.action:300<http://localhost:8080/sysmanage/groupmanage/IndexAction_index.action>Uncaught
ReferenceError: moveSelectedOptions is not defined
IndexAction_index.action:298<http://localhost:8080/sysmanage/groupmanage/IndexAction_index.action>Uncaught
ReferenceError: moveSelectedOptions is not defined
Regards,
Mead
On Sat, Nov 6, 2010 at 3:37 PM, Li Ying <li...@gmail.com> wrote:
> "no object found" looks like some javascript is running, but it could
> not found an object in the HTML DOM.
> so, it looks like not an error of javascript file, but an error of
> your HTML DOM.
> For example, ID of some element is missed.
>
> Again, I need read the entire source code before I can tell what is
> getting wrong.
>
>
>
> 2010/11/6 Mead Lai <la...@gmail.com>:
> > Thanks for you reply.
> > There is a JavaScript Error, shows"no object found", and I checked the
> page
> > HTML source, found there was no JavaScript files included.
> > Than I add a tag <head theme="ajax"/>, it cause a exception " no freeMark
> > template found". It seems the tag <head theme="ajax"/> was obsolete.
> >
> > Regards,
> > Mead
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: How to use
Posted by Li Ying <li...@gmail.com>.
"no object found" looks like some javascript is running, but it could
not found an object in the HTML DOM.
so, it looks like not an error of javascript file, but an error of
your HTML DOM.
For example, ID of some element is missed.
Again, I need read the entire source code before I can tell what is
getting wrong.
2010/11/6 Mead Lai <la...@gmail.com>:
> Thanks for you reply.
> There is a JavaScript Error, shows"no object found", and I checked the page
> HTML source, found there was no JavaScript files included.
> Than I add a tag <head theme="ajax"/>, it cause a exception " no freeMark
> template found". It seems the tag <head theme="ajax"/> was obsolete.
>
> Regards,
> Mead
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: How to use
Posted by Mead Lai <la...@gmail.com>.
Thanks for you reply.
There is a JavaScript Error, shows"no object found", and I checked the page
HTML source, found there was no JavaScript files included.
Than I add a tag <head theme="ajax"/>, it cause a exception " no freeMark
template found". It seems the tag <head theme="ajax"/> was obsolete.
Regards,
Mead
Re: How to use
Posted by Li Ying <li...@gmail.com>.
>> if I click the button to move the items, it doesn't work.
Does any javascript error show up?
Can you show us your entire source code?
2010/11/6 Mead Lai <la...@gmail.com>:
> Hi All,
>
> I am now using <s:optiontransferselect> tag with simple theme.
> It shows two select-list fine, but if I click the button to move the items,
> it doesn't work.
> Any clue can help me?
> Now I am trying to write a double-select with JQury & HTML.
> Thank you in advance.
>
> Regards,
> Mead
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org