You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Serge Bornow <se...@architech-solutions.com> on 2007/11/28 00:05:00 UTC

Using Ajax components in Struts 2.0.11 problem

Hello All,

I am quite new to Struts 2, i cannot figure out a problem i am having, i 
hope someone might give me a hint.

I took this code from a Tutorial:

|<s:tabbedPanel id="test" >

      <s:div id="one" label="Tab 1" theme="ajax" labelposition="top" >
        This is the first panel.
        RoseIndia.nt<br>
        JavaJazzUp.com<br>
        NewsTrackIndia.com
      </s:div>

      <s:div id="two" label="Tab 2" theme="ajax">
        This is the second panel.
      </s:div>
      
      <s:div id="three" label="Tab 3" theme="ajax">
        This is the third panel.<br>
        Java Tutorial<br>
        PHP Tutorial<br>
        Linux Tutorial
      </s:div>

      <s:div id="four" label="Tab 4" theme="ajax">
        This is the forth panel.
      </s:div>

     </s:tabbedPanel>


Which is supposed to show Tabs on a page (JSP).

Now the header contains:

|| <s:head theme="ajax" debug="true"/>

Which is supposed to inject all the javaScript files that Dojo requires 
and it does however those .js files ARE NOT FOUND.

Struts Docs keep referring to AJAX being CONFIGURED.
What does it mean? I read that core jar contains all the dojo javascript 
files.

Is this a bug related to 2.0.11 , any suggestions?

I really appreciate it any comment on this.

Serge
|


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts 2 tree tag question

Posted by john feng <jo...@gmail.com>.
put the box inside the iterate loop:

<html:mutlibox id=... name=... value='<bean:write name="your record id"/>' >

the actionform knows how many boxes being checked by the user.

On 11/29/07, akash agrawal <ak...@yahoo.co.uk> wrote:
>
> Hi John,
>
> Thanks for the insight. If you can share some code that will be helpful to
> understand how you used multibox tag. ( I haven't used multibox tag before).
>
> Thanks,
> -akash
>
> john feng <jo...@gmail.com> wrote: I have created tree that each node
> displays several attributes of an object,
> i.e., top node is Dept object that user could see a checkbox field
> DeptNo>, DeptNo field, DName field, Location field. clicking top node +
> image, the second layer nodes display Employee object that user could see
> a
> checkbox field, EmpNo, EName field, Sal field, NumberOfDepents
> field. Clicking the second node Employee + image, then displays Dependent
> object...
>
> You see my tree is not like a Windows folder like tree, it has more fields
> to display for each row of the nodes. Its each parent node field header
> left
> most position has a checkbox that could check or uncheck all the children
> nodes' checkboxes.
>
> I used the regular iterate and multibox tags and CSS to get this done
> really
> straight forward, without using tree tag.
>
>
>
> On 11/28/07, akash agrawal  wrote:
> >
> > Hi,
> >
> > Trying to build a form having a tree where each node in the tree needs
> to
> > have a checkbox to take input from the user. How can I accomplish this
> using
> > struts tree tag?
> >
> > Thanks,
> >
> > -Akash
> >
> >
> > ---------------------------------
> > Get easy, one-click access to your favorites.  Make Yahoo! your
> homepage.
>
>
>
> ---------------------------------
> Get easy, one-click access to your favorites.  Make Yahoo! your homepage.

Re: Struts 2 tree tag question

Posted by akash agrawal <ak...@yahoo.co.uk>.
Hi John,

Thanks for the insight. If you can share some code that will be helpful to understand how you used multibox tag. ( I haven't used multibox tag before).

Thanks,
-akash

john feng <jo...@gmail.com> wrote: I have created tree that each node displays several attributes of an object,
i.e., top node is Dept object that user could see a checkbox field 
DeptNo>, DeptNo field, DName field, Location field. clicking top node +
image, the second layer nodes display Employee object that user could see a
checkbox field, EmpNo, EName field, Sal field, NumberOfDepents
field. Clicking the second node Employee + image, then displays Dependent
object...

You see my tree is not like a Windows folder like tree, it has more fields
to display for each row of the nodes. Its each parent node field header left
most position has a checkbox that could check or uncheck all the children
nodes' checkboxes.

I used the regular iterate and multibox tags and CSS to get this done really
straight forward, without using tree tag.



On 11/28/07, akash agrawal  wrote:
>
> Hi,
>
> Trying to build a form having a tree where each node in the tree needs to
> have a checkbox to take input from the user. How can I accomplish this using
> struts tree tag?
>
> Thanks,
>
> -Akash
>
>
> ---------------------------------
> Get easy, one-click access to your favorites.  Make Yahoo! your homepage.


       
---------------------------------
Get easy, one-click access to your favorites.  Make Yahoo! your homepage.

Re: Struts 2 tree tag question

Posted by john feng <jo...@gmail.com>.
I have created tree that each node displays several attributes of an object,
i.e., top node is Dept object that user could see a checkbox field <holds
DeptNo>, DeptNo field, DName field, Location field. clicking top node +
image, the second layer nodes display Employee object that user could see a
checkbox field<holds EmpNo>, EmpNo, EName field, Sal field, NumberOfDepents
field. Clicking the second node Employee + image, then displays Dependent
object...

You see my tree is not like a Windows folder like tree, it has more fields
to display for each row of the nodes. Its each parent node field header left
most position has a checkbox that could check or uncheck all the children
nodes' checkboxes.

I used the regular iterate and multibox tags and CSS to get this done really
straight forward, without using tree tag.



On 11/28/07, akash agrawal <ak...@yahoo.co.uk> wrote:
>
> Hi,
>
> Trying to build a form having a tree where each node in the tree needs to
> have a checkbox to take input from the user. How can I accomplish this using
> struts tree tag?
>
> Thanks,
>
> -Akash
>
>
> ---------------------------------
> Get easy, one-click access to your favorites.  Make Yahoo! your homepage.

Struts 2 tree tag question

Posted by akash agrawal <ak...@yahoo.co.uk>.
Hi,

Trying to build a form having a tree where each node in the tree needs to have a checkbox to take input from the user. How can I accomplish this using struts tree tag?

Thanks,

-Akash

       
---------------------------------
Get easy, one-click access to your favorites.  Make Yahoo! your homepage.

Tree ui component with each node having a checkbox (struts 2.0.9)

Posted by akash agrawal <ak...@yahoo.co.uk>.
Hi,

Can someone tell me how to build a tree with each node having a check box, so that user can input their choices by selecting/unchecking each node in the tree and input can be collected in the action?

Thanks in advance,

-Akash

       
---------------------------------
Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how.

Re: Using Ajax components in Struts 2.0.11 problem

Posted by Serge Bornow <se...@architech-solutions.com>.
Dave,

I had the filter mapping set to /*.action
and did not have that property.

It works now, thank you kindly.

Serge

Dave Newton wrote:
> The usual cause of not finding the JavaScript files is
> that your S2 filter isn't mapped to "/*" or that the
> "struts.serve.static" property is set to "false".
>
> d.
>
> --- Serge Bornow
> <se...@architech-solutions.com> wrote:
>
>   
>> Hello All,
>>
>> I am quite new to Struts 2, i cannot figure out a
>> problem i am having, i 
>> hope someone might give me a hint.
>>
>> I took this code from a Tutorial:
>>
>> |<s:tabbedPanel id="test" >
>>
>>       <s:div id="one" label="Tab 1" theme="ajax"
>> labelposition="top" >
>>         This is the first panel.
>>         RoseIndia.nt<br>
>>         JavaJazzUp.com<br>
>>         NewsTrackIndia.com
>>       </s:div>
>>
>>       <s:div id="two" label="Tab 2" theme="ajax">
>>         This is the second panel.
>>       </s:div>
>>       
>>       <s:div id="three" label="Tab 3" theme="ajax">
>>         This is the third panel.<br>
>>         Java Tutorial<br>
>>         PHP Tutorial<br>
>>         Linux Tutorial
>>       </s:div>
>>
>>       <s:div id="four" label="Tab 4" theme="ajax">
>>         This is the forth panel.
>>       </s:div>
>>
>>      </s:tabbedPanel>
>>
>>
>> Which is supposed to show Tabs on a page (JSP).
>>
>> Now the header contains:
>>
>> || <s:head theme="ajax" debug="true"/>
>>
>> Which is supposed to inject all the javaScript files
>> that Dojo requires 
>> and it does however those .js files ARE NOT FOUND.
>>
>> Struts Docs keep referring to AJAX being CONFIGURED.
>> What does it mean? I read that core jar contains all
>> the dojo javascript 
>> files.
>>
>> Is this a bug related to 2.0.11 , any suggestions?
>>
>> I really appreciate it any comment on this.
>>
>> Serge
>> |
>>
>>
>>
>>     
> ---------------------------------------------------------------------
>   
>> To unsubscribe, e-mail:
>> user-unsubscribe@struts.apache.org
>> For additional commands, e-mail:
>> user-help@struts.apache.org
>>
>>
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Using Ajax components in Struts 2.0.11 problem

Posted by Dave Newton <ne...@yahoo.com>.
The usual cause of not finding the JavaScript files is
that your S2 filter isn't mapped to "/*" or that the
"struts.serve.static" property is set to "false".

d.

--- Serge Bornow
<se...@architech-solutions.com> wrote:

> Hello All,
> 
> I am quite new to Struts 2, i cannot figure out a
> problem i am having, i 
> hope someone might give me a hint.
> 
> I took this code from a Tutorial:
> 
> |<s:tabbedPanel id="test" >
> 
>       <s:div id="one" label="Tab 1" theme="ajax"
> labelposition="top" >
>         This is the first panel.
>         RoseIndia.nt<br>
>         JavaJazzUp.com<br>
>         NewsTrackIndia.com
>       </s:div>
> 
>       <s:div id="two" label="Tab 2" theme="ajax">
>         This is the second panel.
>       </s:div>
>       
>       <s:div id="three" label="Tab 3" theme="ajax">
>         This is the third panel.<br>
>         Java Tutorial<br>
>         PHP Tutorial<br>
>         Linux Tutorial
>       </s:div>
> 
>       <s:div id="four" label="Tab 4" theme="ajax">
>         This is the forth panel.
>       </s:div>
> 
>      </s:tabbedPanel>
> 
> 
> Which is supposed to show Tabs on a page (JSP).
> 
> Now the header contains:
> 
> || <s:head theme="ajax" debug="true"/>
> 
> Which is supposed to inject all the javaScript files
> that Dojo requires 
> and it does however those .js files ARE NOT FOUND.
> 
> Struts Docs keep referring to AJAX being CONFIGURED.
> What does it mean? I read that core jar contains all
> the dojo javascript 
> files.
> 
> Is this a bug related to 2.0.11 , any suggestions?
> 
> I really appreciate it any comment on this.
> 
> Serge
> |
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org