Skip to main content

redirecting a page to jmaki.dContainer on Submit button click

3 replies [Last post]
kkccss
Offline
Joined: 2008-07-07
Points: 0

Hello All,

I have a jsp page having a jMaki.dContainer in it displaying a yahoo.tabbedView widget inside it.
The tabbed view page has a submit button, on clicking of which a new page is coming as response. I want to display that page in the same dContainer. I am using Spring MVC framework and each button click is calling a controller which returns a new page. And that page i want to show in the dContainer. Please suggest how to do this.

Thanks.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi Kkcss,

I have broken up what I think you want to do in a few separate files which I will list the contents below:

Basically you need a page with the dcontainer. Let's call it index.jsp:

<%@ taglib prefix="a" uri="http://jmaki/v1.0/jsp" %>

Now you need the yahoo.jsp page containing the tabbed view:

yahoo.jsp:

<%@ taglib prefix="a" uri="http://jmaki/v1.0/jsp" %>
value="{items:[
{label : 'My Tab', content : 'Some Content'},
{id : 'bar', label : 'My Tab 2', include : 'button.jsp ', lazyLoad : true },
{label : 'My Tab 3', content : 'More Content', selected : true}
]
}" />

Now finally you need the button.jsp which contains the button. You could include the content inline in the tabbed view content but for this example it is easier to read this way. button.jsp is:

This is pretty much it. The publish to the topic "/jmaki/dcontainer/setInclude" with the payload of {value : 'bar.jsp'} will load the contents of the page bar.jsp into the dcotnainer.

You can easily dynamically generate the content used for the button.

Let me know if this doesn't work.

-Greg

kkccss
Offline
Joined: 2008-07-07
Points: 0

Hello Greg,

Thanks a lot. This works fine , but i am using Spring MVC framework and the request from my jsp page on clicking of submit button is going to spring Controller and it fetches data from database and gives the response back.
but now page is not submitting and hence not fetching the data, calling formBacking method of controller and simply displaying the formview page without data.

Thanks.

castertroy
Offline
Joined: 2009-04-01
Points: 0

Hi Greg,

Is it possible to pass parameters to the page being loaded by the dContainer? I'm new in jmaki and i'm trying to do something like an Windows Explorer. I used dojo tree on the left side bar and display JSP on the content

. What i'm trying to do is to dynamically load data on the content JSP based on the tree item clicked on the left side bar. Hope you could point me out to the right direction.

Thanks,

- Joseph