In liferay, I found that we can call the portlet action url in javascript by
submitForm(document.hrefFm, someActionURL);
I found some help on submitForm(document.hrefFm, someURL) Forum but still not yet cleared with the concept.
With above script one can call his desired actions directly instead of using form and then submitting that form to perform action.
It's useful when you need to execute a portlet action outside of a form, for example by clicking a liferay-ui:icon somewhere in your portlet pages or in the Actions menu of a Search Container.
Related
My repeater has enough data where I see my pagination. When I view the detail transformation for any items after the first page, the history.back() button gives me the form submission error.
Short of hard coding the back button, what's the easiest solution to avoid this?
I assume the "history.back()" is your javascript? The pagination is most likely occurring through postback, and any navigation back will require that same post data being sent.
One option is you can make the pagination not postback, but instead URL based. In the "Paging" area of your repeater, set the Mode to "QueryString" and set a querystring key (like "page"). Try that!
Otherwise you will need to do a window.location = "/The/Previous/Url" so it won't event attempt a postback and will simply direct them to the page, but your page you were last on will be lost.
Wrap the webpart in an update panel. In the webpart you can check the box to do this very easy and leave the rest of your configurations the way they are. If other elements on the page require a postback or rely on that webparts values then you may have to wrap all of them in an update panel.
I have used af:popup a lot in my application and I call the popup only from the pages in which it is created. For example, if popup1 is created in Page1, I can call it only from this page!
I want to call a popup being created within Page1 from Page2. The real scenario is that I want to create the popup within the pageTemplate, and use it everywhere.
The problem with this is that it does not recognize the bindings that are used in the popup when called from another page. Does anyone know how to fix or avoid this?
Please tell me what approach have you used in this case?
Thanks
Actually 1 Page Definition (Binding Container) per page is not a hard/fixed restriction. You can use the same PageDef for more than one page. Admittedly unusual but works. Go to the Databindings.cpx file. You will notice that the jspx page is associated with its pagedef file, not by tightly coupled/direct reference, but by an indirect UsageID. Edit the metadata to have page1 and page2 use the same page definition file, via the usageID. Then the binding container will be shared by both pages.
BUT, PageTemplates can have their own page bindings - have you tried this?
If the problem you're having is the popup when used on Page2 isn't recognizing the bindings from Page1 it's because you don't have those bindings on Page2. Check your Page2 bindings, and ensure you've got the same ones (need to be named the same as well). You will need to add them if they aren't there! Each page has its own set of bindings.
I hope this helps.
Im having a question regarding retrieving the view state of a JSF page.
I have an application in which the user is able to search for persons in a
list and when the user press "show" button the same JSF page will be filled
with a list of the various persons.
Now when I choose one of the persons , another JSF page will show up with more
in-depth and detailed information about that person. Now in that page there is a
"cancel/abort" button displayed. What I want to accomplish is that when I press
that specific "cancel/abort" button the page should be redirected and navigate
back to the JSF page with the list as it was shown, so in some way the "view state"
should be stored (I assume only) but I dont know how it could be done...
I just wanted to check if anyone has been able to solve this kind of issue
in some manner.. ? (The JSF search page as mentioned above is declared as a viewscoped as
an additional information)
Thanks for all help..
You could make the bean #SessionScoped. That means that only one instance will be created by browser session, so when you get back you get the last state.
Of course, session scoped means that when you get back to the view even if it is not a "back" navigation, that info will still be there.
I have two pages, one page for input, another page for the options, how to send value form page to another page on xPages Mobile Controls, or is there another way to make like this.
See my sample page:
1. Page 1:User Input
http://i1248.photobucket.com/albums/hh490/dannysumarnach/page_1_form_user_input.jpg
Page 2:Picklist
http://i1248.photobucket.com/albums/hh490/dannysumarnach/page_2_user_choice_PickList.jpg
note: the built-in typeahead not posible
Regards,
Danny
The in built type ahead is missing the dojo tundra.css file when using the single page app control. This file comes with Dojo its just not being included. Import this file to get the type ahead to work.
I'm unsure as to what you mean about passing value from one page to another, you can submit data to a document and open it in another page, add it to a scoped variable, add a parameter to the URL. All of these options will work.
Have a look at my blog post on this topic. There are a couple of gotchas to get around, most notably, ensuring the the page with your document datasource gets recalculated at the correct time. I'm working on a NotesIn9 on it.
Part 3 covers a couple of amendments to get it working with existing documents and includes a sample page that will work in the Extension Library Demo db. Note the extra view that needs to be created and other details in Part Two.
http://www.intec.co.uk/xpages-mobile-controls-and-value-pickers-part-three-client-side-approach-extended/
this is an image of a sharepoint list action , the sending news letter is a custom action that i added , but when clicking on it , i want it to open a page not redirection, i want it to get a pop up action with a mask behind as the View item do
What you are referring to is the modal framework in sharepoint 2010. You need to change your action javascript code.
Here is an article i've used in the past.
http://www.chakkaradeep.com/post/Using-the-SharePoint-2010-Modal-Dialog.aspx
You need to call ModalDialog Javascript function from your CustomAction rather than redirection.
Here's the URL with example of what you are looking for:
http://www.chakkaradeep.com/post/Using-the-SharePoint-2010-Modal-Dialog.aspx