how u maintain a static menu bar in gwt using mvp framework - gwt-mvp

I would love to know from anyone who knows how we can keep the a widget in mvp static by putting it in the entry point class.Or is it recommended to include the widget in appcontroller.
I have an issue like I want to make my menu bar static throughout my page. For this I follow
I will create a RootPanel
I divide the page into two by adding two panels.I would like to send the mainpanel to the Appcontroller by goTo and change the main panel with respect to the click in the menu bar.
Here i am confused like where should I add my menu bar to handle its events.
Can anyone help me out with this

Related

Create a generic popup panel

I have added a Global Button with the following code.
public override void Initialize()
{
if (!String.IsNullOrEmpty(Base.PrimaryView))
{
Type primaryViewItemType = Base.Views[Base.PrimaryView].Cache.GetItemType();
PXAction action = PXNamedAction.AddAction(Base, primaryViewItemType, "SubmitTicket", "Submit Ticket", TestClick);
}
}
public IEnumerable TestClick(PXAdapter adapter)
{
throw new PXException("Button clicked from graph" + Base.GetType().Name);
}
And it renders the button like this in each of the pages.
Now, I would like to display a popup panel, on button's click. I know I can create a popup panel on screen section. But, is there some way that I can have a general popup panel created in one place and can be displayed on each of the pages on the button's click?
Thank you.
As #HB_ACUMATICA mentioned there is no good easy way.
Providing another alternative to his post, you can create a graph and use it as a reusable popup by calling:
throw new PXPopupRedirectException(graph, string.Empty, true)
One thing I ran into was a sizing issue on the popup...
Changing the height/width when calling another graph as an in-page popup using PXPopupRedirectException
If you do copy and paste the PXSmartPanel you can create re-usable business logic by implementing the reusable business logic pattern found in this help as a starting point:
Reusing Business Logic
If I understand correctly you want to share the same PXSmartPanel control in different pages without having to copy/paste it in every screen.
In Acumatica Framework this is achieve by custom container controls like 'PXUploadDialog' which derives functionality from other controls like 'PXSmartPanel'. This is the control that is used when you attach files in all screen.
Unfortunately there seems to be no documentation on how to achieve this.
The closest I found is this SO question which is essentially unanswered:
Create custom User Control for Acumatica
Considering this, you may want to copy/paste the same smart panel in all screen.
To ease copying you can use the 'Edit ASPX' feature, make sure you backup the project before.
Edit ASPX to get to the code:
Copy paste your smart panel in the page and click 'GENERATE CUSTOMIZATION SCRIPT' to package the changes in the project:

Making and Object uniteractable

So I have a part of my game where the character is selecting an area of the map. And it opening up a panel. I have made it so that happens but an=m now stuck on the other part of it. I want only certain area of the map to be intractable, so that I can bar the player from selecting areas of the map that they aren't ready for. I have no idea how to make game objects in the game uninteractable. I have looked on Stack overflow, Youtube an d the Unity API to no success. Can someone help me with that.
How to make things un-interactable will vary depending on your situation. I'll be presuming that you're map is broken up into a grid of sorts.
The basic setup would involve a bool, probably called 'CanAccessZone'.
Then you'll need a class, to store any access info and popup logic, by popup logic I mean make the element either non-interactable or show a popup, with the shown popup being dependant on 'CanAccessZone'. This class can then be set up by your Map class when the level is loaded, or you could let the popup class grab the necessary values from the Map class.
If you're using Unity's UI buttons for the map pieces, then you could set interactable to false, until you want to let the player access the zone. If you want to display a popup informing the player that they can't access the zone, then your button will be interactable, but the click will delegate to your popup logic method.
It's a similiar principle if you're using gameobjects as buttons. You'd be using any of the OnMouse events to handle click events. https://docs.unity3d.com/ScriptReference/MonoBehaviour.html
Hopefully this'll lead you in the right direction.

can layout for a view for a specific action in controller can be changed in yii

I need to know can we have a different layout for a specific action in controller
for controller/create i dont want the navigation bar appear just can their be a form with no navigation bar
but for the same controllers with different action should have the navigation bar .
what i know is if am not wrong we can have customised layout designed and specify it in the controller if i wrong please let me know.
but i need to design different layout for specific action in controller
cAN I ACHIEVE SO if so Please guide me
Yes. You can do.
You have to declare layout in your controller as a class variable.
public $layout='column2';
Then in your action function, you can change the layout with use of below code.
public function actionFUNCTION()
{
$this->layout='column1'; // layout without nav bar.
$this->render('VIEW_PATH');
}
You can use the below code to render your view without any layout.
$this->renderPartial();

Show Title in MonoTouch tabbed application

Maybe I'm missing something super simple, but I can't seem to get a title to show up at the top of Views contained within a basic tabbed application. I follow these steps...
New Solution, Universal Storyboard, Tabbed Application
Run that and you have two basic Views "First View" and "Second View".
Neither View by default has a title bar, but the default code shows setting a this.Title.
Why don't the title bars show up? How do I get them to show? I've tried several things to get these to show such as...
Setting "Top Bar" in Interface Builder to "Navigation Bar". It then shows in Interface Builder but never shows on runtime.
I've also tried in ViewDidLoad() to set this.TabBarController.Title but that doesn't seem to do anything either.
Thoughts?
The feature you are looking for is called a NavigationBar and can be added manually via IB to your view if it does not have a NavigationController associated with it. If there is a navigation controller then the NavigationBar will show up automatically.
So to answer your question if you want a NavigationBar go to IB and add one from the objects library you should then be able to manipulate the Title on the nav bar to your hearts content.

iPad: Correct approach to custom navigation items in UINavigationController

This relates to a question I asked a few days ago: iOS: Setting text in nib subview from view in UITabBar/UINavigationController application
I need to put the search bar and buttons on the top right of a navigation controller, this is more than the standard single button that UINavigationController.navigationItem.rightBarButtonItem allows so I am using the initWithCustomView: method of UIBarButtonItem to load a view from a nib file.
In my particular case, i've put the view as a seperate item in the main view file for that form
The problem i've got is load and display sequence and I wanted to know if this was the right approach to this?
It seems that the following happens:
viewDidLoad on my main window gets called
viewDidAppear on my main window gets called and I set up rightBarButtonItem
I then want to populate a text field on that search bar but because the loading of the view for the button item happens in the main thread, I don't know when it's appeared.
Would I be better to create a new class with nib for the search bar and buttons which would then have a viewDidLoad/viewDidAppear and I could then create a delegate function so I could 'deQueue' the text to go into the search bar?
Or, am I missing something really simple?

Resources