Yii Framework CTabview Focus Issue - yii

I am trying to navigate tab3(BaseContact Edit Source) from tab2 (BaseContact EditStructure) button,
Please refer below screen shots...

When you click on "Start Import" an action should be called in a controller.
In this controller, you should have a "redirect". You can pass an url argument (#) in your "redirect" to switch to an other tab.
Eg :
$this->redirect(array('offer/view', 'id' => $offer_id,'#'=>'tab2'));

Related

How to load a component without a page reload on ion-button click?

I have a button on the homepage of my application:
<ion-button href="/start" class="btn" color="danger">start</ion-button>
However, I noticed it actually reloads the page when clicked.
I also have ionic tabs (https://ionicframework.com/docs/api/tabs), and when a tab is clicked a component is loaded instantly.
How can I achieve the same functionality for ion-button?
The tab component has an integration with the router, which allows the tab to function as a vue-router link. ion-button doesn't seem to have the same integration. The documentation for the href prop states:
Contains a URL or a URL fragment that the hyperlink points to. If this property is set, an anchor tag will be rendered.
Using href makes the button function as a regular browser link which will cause the page to reload. Instead, you can wrap the ion-button in a router-link tag or call $router.push in the button's click event.

When I tap with Detox, the button is not tapped. However it can be tapped if I just click at it

The problem is when I tap with Detox, the button is not tapped. However it can be tapped if I just click at it.
version of Detox: 16.8.2,
version of React Native: 0.57.1
Solved.
This happened because I used device.openURL({url: 'https://...' }) previously to open the app from a deep link.
Instead, it worked after opening a new instance of the app with a deep link in argument: device.launchApp({newInstance: true, url: 'https://...' });
After this, the interaction can be performed.
It looks like a bug with the method device.openURL()

Show Print and Save Image option using ActionSheetIOS.showShareActionSheetWithOptions

I am trying to implement ActionSheetIOS.showShareActionSheetWithOptions, I am passing the correct url which might be a link to an image or a file(pdf/msword).
I want to provide an option to Print the file or Save Image file when the user clicks on the Share button. But I only see the following options
"Add to reading list", "Copy" and more
Here's my code:
ActionSheetIOS.showShareActionSheetWithOptions({
url: route.passProps.url,
},
(error) => alert(error),
(success, method) => { }
);
I have verified that the url is correct.
When visiting a url, Safari does provide you an option to Print/Save, so I know its possible, but I don't know how.

How can I call liferay struts action from my own portlet?

I define an editPortletURL
PortletURL redirectURL = renderResponse.createRenderURL();
redirectURL.setWindowState(LiferayWindowState.POP_UP);
redirectURL.setParameter("struts_action", "/asset_publisher/add_asset_redirect");
editPortletURL.setParameter("redirect", redirectURL.toString());
editPortletURL.setParameter("originalRedirect", redirectURL.toString());
editPortletURLString = editPortletURL.toString();
editPortletURLString = HttpUtil.addParameter(editPortletURLString, "doAsGroupId", assetRenderer.getGroupId());
editPortletURLString = HttpUtil.addParameter(editPortletURLString, "refererPlid", plid);
I call the edit_article.jsp from my portlet. I will, if I click on "publish" button, I should be forwarded to the jsp page which is pointed to /asset_publisher/add_asset_redirect struts action.
This action is mapped to the add_asset_jsp. This page fires Liferay.fire (closeWindow) event, which should close the popup window und refresh my portlet.
But If I try to do that - I see my portlet in the popup window...
How can I reference/include Liferay action classes into my own portlet?
If you are working in liferay 6.1 then you can simply use the action-hook to achive your requirment. Please check below links
http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/other-hooks
http://www.liferay.com/documentation/liferay-portal/6.1/development/-/ai/performing-a-custom-acti-4

Rails 3: Rendering actions with named anchors/fragments after failed form submission

The edit view for one of my models contains tabs that utilize anchors in the url to switch between settings such as model/1/edit#tab1 and model/1/edit#tab2. Is there a way to redirect to these anchors after submitting the edit form but failing to save due to errors? My current code is below:
def update
#user = Product.new(params[:user])
if #user.save
flash[:success] = "Your user has been created"
redirect_to #user
else
render 'edit' //want to render here with an anchor
end
end
I would like to store the url containing the anchor before form submit and then re-render the form with the same anchor while rendering error messages. Any ideas?
Best way was to use jquery cookie to save last opened tab and then set default tab using saved cookie.