Hello, I am new to Struts and trying to make UI with Struts with Jquery. but didnot get success over it.
so I plan to remove jquery component and use basic HTML elements with Struts 2 to see whether it is working correctly or not... but surprisingly, it is my bad luck
Here is the details of my problem:
I have a combobox with label Geo Locations: which is suppose to be appear below Company Office dropdown, but it is not working as expected.
please find below code snippet and Image of my UI.
Heading - "Here is the component with basic HTML Tags. This should go below Company Office"
Combobox with label Geo Locations is EXPECTED to appear below Company Office dropdown,
but in ACTUAL both the components made with raw HTML tags are appearing on TOP. ie. before all UI components made with struts tag.
As mentioned in my initial thread, my aim is to use Juery DDCL plugin to create DropdownCheckboxList. but I was facing the issue.
so I thought to add some UI components using raw html tag and then I will write my jquery to do the needful.
But while adding UI component with raw HTML tag, I faced this issue and left with NO CLUE about why this is happening.
Ulf Dittmer wrote:It is probably not such a good idea -or a problematic ideas to say the least- to have some components rendered by Struts, and some by jQuery.
I think Sharad is using the Struts 2 jQuery Plugin, so he should be OK. The first thing you (Sharad) should do is look at the HTML source in the browser and see if you can see why the page is being rendered in that fashion. I suspect what is happening has something to do with this FAQ entry.
Thanks for directing me to the right link/location.
I View the html source in browser and as per the source.. UI is generated.
My learning is - All basic HTML elements are placed together and then all Struts specific elements are presented in <table> which is created dynamically by struts API internally.
to get rid of this - I myself created table inside <form> and put all Struts + HTML tags under different <td> and it works correctly.
In this scenario, as the <table> is already in place, struts is not adding any new <table> dynamically. So every thing is inplace correctly.
Now my work is to have DDCL plugin correctly inplace with my other UI components.
Below is the new UI with all elements ordered correctly
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop