Changing portlet state

Can I set and modify portlet state(minimized, maximized, invisible) in a pageflow action?

Yes.. using the backing context
//to maximize the portlet
protected void maximize()
PortletBackingContext context = PortletBackingContext.getPortletBackingContext(super.getRequest());
context.setupStateChangeEvent(WindowCapabilities.MAXIMIZED.getName());
}

Similar Messages

  • Problem changing portlet state and mode programmatically

    I am trying to change state/mode of a portlet programmatically in backing file.
    My request is, when a portlet is changed to EDIT, I want it be maximized. Based on that, I put logic in handlePostbackData() like this,
    if (PortletBackingContext.getWindowMode().
    equalsIgnoreCase("EDIT")) {
    // change to EDIT mode
    PortletBackingContext.setupStateChangeEvent(
    WindowCapabilities.MAXIMIZED.getName());
    } else {
    PortletBackingContext.setupStateChangeEvent(
    WindowCapabilities.NORMAL.getName());
    However, I found during handlePostbackData() phase, the mode I retrieved by PortletBackingContext.getWindowMode() was the one before the clicking.
    Say for view mode, I click the EDIT button and I expect in the handlePostbackBack() phase, I could get "edit" returned by PortletBackingContext.getWindowMode(). But actually it returned "VIEW".
    The mode keeps in the previous mode till it enters the preRender() phase. But as API, setStateChangeEvent() should be used in handlePostbackData() ONLY.
    Any suggestions?

    you should be able to do this through declerative IPC
    of course you can do this via the IDE but you can also add it to the .portlet file. Something like this...
    <netuix:handleEvent event="onEdit"
    fromSelfInstanceOnly="true"
    eventLabel="handleOnEditGeneric_el">
    <netuix:changeWindowState newState="maximized"/>
    </netuix:handleEvent>
    Chris Jolley
    Portal Architect

  • 8.1, Change pageflow state from event listener

    Hi,
    I've implemented an event listener in a backing file (like in the custom event
    tutorial ).
    The backing file is assigned to a portlet.
    Is it possible to change the state of the portlets pageflow when an event is received?
    I want to reset the pageflow so that the 'begin' action is executed again.
    From the tutorial and sample portal I found out, that how to change the window
    mode or the visibility, but I can't find any methods for setting the current url/action.
    Another solution would be to setup a listenTo relationship and redirect the incoming
    actions to the 'begin' action. What I'm missing here is the possibility to trigger
    such an event from a page flow (which is possible when using custom events). Can
    this be done?
    Bye
    Achim

    try to go to Control Panel\All Control Panel Items\Administrative Tools
    Disable and set the trigger as never at task scheduler > time sync
    You can also try to clean boot
    http://support.microsoft.com/kb/929135/en-us

  • Persistence of portlet states

    Hi,
    We are able to change the portlets states (i.e. max, mini, and normal). However, once user logs out and back in, the portlets appear in default state, not the states right before user log out.
    I found an old BEA message (http://forums.bea.com/thread.jspa?messageID=200573438) regarding the issue, which mentioned about it might be fixed/enhanced in BEA 9. I am wondering if anyone would like to inform us on how to persiste portlet states. Thanks.
    By the way, we found two ways to changes programatically.
    (1) in backing file:
         PortletBackingContext context = PortletBackingContext.getPortletBackingContext(getRequest());
         context.setupStateChangeEvent(WindowCapabilities.MINIMIZED.getName());
    or (2), in jsp:
    http://host-domain/Desktop-url?_nfpb=true&_windowLabel=portletInstance_name&_state=normal&_pageLabel=pageLabelName
    Thanks.

    Hi,
    We are able to change the portlets states (i.e. max, mini, and normal). However, once user logs out and back in, the portlets appear in default state, not the states right before user log out.
    I found an old BEA message (http://forums.bea.com/thread.jspa?messageID=200573438) regarding the issue, which mentioned about it might be fixed/enhanced in BEA 9. I am wondering if anyone would like to inform us on how to persiste portlet states. Thanks.
    By the way, we found two ways to changes programatically.
    (1) in backing file:
         PortletBackingContext context = PortletBackingContext.getPortletBackingContext(getRequest());
         context.setupStateChangeEvent(WindowCapabilities.MINIMIZED.getName());
    or (2), in jsp:
    http://host-domain/Desktop-url?_nfpb=true&_windowLabel=portletInstance_name&_state=normal&_pageLabel=pageLabelName
    Thanks.

  • How can I change the state of a runtime menu item programati​cally?

    Using LabView 6.1, I would like to change the state of the runtime menu item "Operate/Print at completion".
    The goal here is to print the VI front panel according to the operator choice (OK ->print, Cancel ->don't print)
    In a first release, I put a Stop function at the dialog output (activated by the cancel button) but this function stop the complete application and my idea where to stop only the VI in which the dialog is running.
    In a second release, I've tried to use the "Application
    control/Menu" but I receive every time an error:
    Error 88 occured at Cannot modify application menu item in the printtest.vi.
    Possible reasons: LabView, Runtime menu error...
    Any suggestion is appreciated.
    Re
    gards,
    phidu

    Instead of using the print at completion option, print the VI programatically if the user selects to print...open a reference to the VI you want to print and use an invoke node to print vi to printer.
    Alternatively create another VI with a layout optimized for printout, set it to print at completion and run and load the data into that VI if and only if the user OKs the print...
    Mads
    MTO

  • How can I change a State name in iphoto map?

    A few months ago, changing a location of a group of photos, I really changed a state name.
    The image shows the name State "Casa David i Mireia" where should say "Catalunya" that is the real name.
    How can I change that name. I have opened a case in Apple Support, but the solution to reinstal the app have not worked for me.
    Thank you for your help
    Jordi

    Thanks for your help!
    The problem is that I think that I changed the "default" name for the state where the photos were taken. I have 50 differents locations, that are all correct, and photo per photo, I can modify the original location, but only at "local" level.
    How can I change the name displayed in State section as "Casa David i Mireia" for "Catalunya" that is the real name for the State where the photos where taken?
    I don't if this post is comprehensive. I'm not sure.
    Thanks for your time!
    Jordi

  • Is it possible to change application state from a component?

    I was wondering if it is possible to change application state from within a custom component and if so, what would the syntax be if I had an application named "zzz" and I wanted to change the app state from "state1" to "state2" from my component?
    Thanks!

    Hi,
    you always have a static class Application.
    Application.application will be the root component. After that you can change it state.
    Application.application.currentState = "state2";
    But it's not the best way to change states. It's better to dispatch events from components and change states in listeners.

  • What is the best practice for changing view states?

    I have a component with two Pie Charts that display
    percentages at two specific dates (think start and end values).
    But, I have three views: Start Value only, End Value only, or show
    Both. I am using a ToggleButtonBar to control the display. What is
    the best practice for changing this kind of view state? Right now
    (since this code was inherited), the view states are changed in an
    ActionScript function which sets the visible and includeInLayout
    properties on each Pie Chart based on the selectedIndex of the
    ToggleButtonBar, but, this just doesn't seem like the best way to
    do this - not very dynamic. I'd like to be able to change the state
    based on the name of the selectedItem, in case the order of the
    ToggleButtons changes, and since I am storing the name of the
    selectedItem for future reference.
    Would using States be better? If so, what would be the best
    way to implement this?
    Thanks.

    I would stick with non-states, as I have always heard that
    states are more for smaller components that need to change under
    certain conditions, like a login screen that changes if the user
    needs to register.
    That said, if the UI of what you are dealing with is not
    overly complex, and if it will not become overly complex, maybe
    states is the way to go.
    Looking at your code, I don't think you'll save much in terms
    of lines of code.

  • Change a state in main.mxml from a script in another mxml

    Hi,
    i'm having some trouble with my application, let's say i have the main application file called MAIN.MXML
    in wich i have set different States, and have different forms.
    now i have a form called loginForm which contains the textInput item for Login and Password, i also have a link Need to Register
    which onClick will change the state to show in the same panel a different form registerForm (with the relevant textInput items)
    now the MAIN.MXML includes a custom component called <comp: NetworkManager /> which includes all the logic scripts and MXML
    tags to create and manage an HTTPService request to a PHP Server.
    when the user click on the Login button, this will call a function included in the main.as script (imported in MAIN.MXML) which
    will call a function in the script within NetworkManager.MXML passing all the form data.
    in NetworkManager.MXML the script will create an XML message, will send to the PHP Server and wait the response... if this comes
    true the user is authenticated, otherwise is not.
    so far so good, i get the message sent, the correct response back. Now i want to hide the form in MAIN.MXML and put something like
    Welcome firstName lastName!! instead. But i don't know how to do it. If i try to access the states in MAIN.MXML from the NetworkManager.MXML
    i'll get all sort of errors which i don't have it here with me.
    I know this sounds like a newbie question, and it really is ... any taker?
    your help is much appreciated.
    thanks
    T.

    Hi,
    i've tried RemoveChild but i get an error like:
    ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller.
    at flash.display::DisplayObjectContainer/removeChild()
    at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$removeChild()[C:\autobuild\3.2.0\frameworks\p rojects\framework\src\mx\core\UIComponent.as:5096]
    at mx.core::Container/removeChild()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\ core\Container.as:2274]
    at components::NetworkManager/sendUserAuthHandler()[C:\Documents and Settings\Tom\My Documents\flex_prj\Shoppy\src\components\NetworkManager.mxml:182]
    at components::NetworkManager/serverHandler()[C:\Documents and Settings\Tom\My Documents\flex_prj\Shoppy\src\components\NetworkManager.mxml:98]
    at components::NetworkManager/__serverRPC_result()[C:\Documents and Settings\Tom\My Documents\flex_prj\Shoppy\src\components\NetworkManager.mxml:290]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.rpc.http.mxml::HTTPService/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()[C:\autobuild\3.2.0\framewor ks\projects\rpc\src\mx\rpc\http\mxml\HTTPService.as:290]
    at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()[C:\autobuild\3.2.0\frameworks\ projects\rpc\src\mx\rpc\AbstractInvoker.as:193]
    at mx.rpc::Responder/result()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\Responde r.as:43]
    at mx.rpc::AsyncRequest/acknowledge()[C:\autobuild\3.2.0\frameworks\projects\rpc\src\mx\rpc\ AsyncRequest.as:74]
    at DirectHTTPMessageResponder/completeHandler()[C:\autobuild\3.2.0\frameworks\projects\rpc\s rc\mx\messaging\channels\DirectHTTPChannel.as:403]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at flash.net::URLLoader/onComplete()
    who is the caller of loginForm then? i've tried with Application.application.loginForm but i do get the same error though.
    loginForm is contained in a Canvas item, is it the caller? or who else?
    thanks
    T.

  • Code for capture digital data when change of state

    Dear Sir,
    I had written a program to capture the digital data when it change of state.
    It work well when I check the check box "Lock file for faster access".
    But error occur when it unchecked.
    Because I need to open the tdm file at the vi running, thus I need to uncheck it.
    Please kindly to advise any solution for it.
    The program is attached.
    Thank You.
    Attachments:
    datalogcos.vi ‏53 KB

    Hi Jayme,
    Sorry for late reply.
    The screen capture of error message is attached.
    Thanks for your helping.
    Poly-Alex
    Attachments:
    error.jpg ‏24 KB

  • How do I change the states of the "Submit"  button in adobe muse?

    How do I change the states of the "Submit"  button in adobe muse? Currently I can only change the color, text and stroke of the button, but I cannot customize it as I have the other buttons in the tool.

    I want to replace the button with an image, however it does not permit me to paste an image into the button, nor does it allow me to delete the box that is currently there. The best I can do is paste the image into the text box that is provided.

  • Can I change the state of an object by highlighting over text?

    That question probably doesn't make sense, but I didn't know how to word it with just a few words.
    I'm working on a site where I have a 'button' that has text in it. When someone hovers over the button, it changes colors (it's basically showing the user that the site is responding). When I put text inside the button, it causes the button to not change colors when I hover over it.
    I know that it's happening because the text is covering up the area that is supposed to respond to the user's mouse.
    So, I'm wondering if there is a way of either making the text and the 'button' all one object, or if it's possible to make the text 'invisible' to the mouse. What I mean by 'invisible' is that the computer wont acknowledge the text which will make the button responsive to the user's mouse.
    I am able to do this through photoshop but I was just wondering if it's possible to do this in only muse.

    Hi
    You can define states for the background layer such as rectangle and then insert text frame which will change the state on hover of mouse, but if the text frame covers the background then it wont active the state.
    The purpose that you are trying to achieve such as invisible text to mouse is not possible with native menu features , but yes as you have mentioned you can use an image for this , write up the text and use the image.
    The state button has same feature with rectangle in background and text within that.
    Thanks,
    Sanjit

  • CHANGE OF STATE

    Dear all,
    I want to write an application involve change of states of an indicator.
    The indicator will by default will be green in colour and will only change to to either amber or red colour.
    I need the program to output an message only when there are certain conditions arise. The conditions are:
     i) green to amber
     ii) green to red
     iii) amber to red
     iv) red to amber
    The rest of the conditons there will be no message output.
    What are the best ways to write this program? Is it more efficient to use state machine, event structure for this application?
    Anyone can help out with this? Thanks so much!

    Joven wrote:
    That is indeed an elegant solution. So Short and sweet. Thanks so much for your kind help.
     The program stays about the same size, even with thousands of inputs. You simply use arrays instead of scalars for the data. Infinitely scalable!
    Here is a quick draft for 10 inputs.
    (Looking at your code, you still make unnecessary local variables.  Why do you possibly need the "array" local and indicator????)
    Message Edited by altenbach on 04-19-2010 07:34 AM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    state changeMOD_Array.vi ‏12 KB
    StateChangeArray.png ‏10 KB

  • Set up Signal Express to log when there is a change in state of the inputs (NI USB-6501 logger)

    Hello NI Forum, I have recently purchased digital I/O logger NI USB-6501.  This arrived with Signal Express, which I intend to use as a Lite version.  I just wondered if it was possible to set up Signal Express to only add a log entry when there is a change in state of the inputs?  I have this working on a 0.1sec sample period and can interrogate the logs after recording.  Most of the time nothing will be happenning, I just wondered if there was a way to reduce the ammount of data captured?  Cheers.

    Ah that unfortunate, and yes start/stop conditions for loging are part of the Full version of SignalExpress
    Here's the comparision: http://www.ni.com/labview/signalexpress/purchasing-options.htm
    Sorry about that

  • Change Boolean state when switching between cases

    I have a case structure with a true and false case.  In the false case
    I have two boolean I can turn on and off by clicking on them.  When
    changing to the true case I disabled the two booleans using a property
    node.  However when switching to the true case the booleans are
    disabled and remain in their last state, i.e. if they were true (on) in
    the false case, they remain true (on) in the grayed out disabled false
    case.   How do I change the state of the boolean in addition to
    disableing it.  i.e. if in the false case the boolean is in the true
    state (on) and I switch to another case the booleans are disabled using
    the property node and return to the false (off) state?  I have attached
    a example vi.
    Thank you for your help.
    Danny
    Attachments:
    Property node and select function.vi ‏14 KB

    Jorge already gave you some useful advice, but I would really recommend that you rethink your approach.
    Here are some points:
    I am not sure why you place the booleans inside the case structure.
    You song and dance is just an "invert" (see picture). Even better leave it all out and swap the contents of the two cases!
    There is no reason to constantly spin the loop writing the same properties over and over. It is sufficient to recalculate when one of the controls change. Use an event structure!
    You can eliminate the second switch by placing the diagram constants in the two cases.
    Attached is a quick draft using events to duplicate your existing functionality. See if it gives you some ideas.
    Message Edited by altenbach on 02-03-2008 02:23 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    invert.png ‏3 KB
    Property_node_and_select_functionMOD.vi ‏18 KB

Maybe you are looking for

  • Files not Updating

    I have an application which I made three changes to.  I changed the logical port in the models - I centered the title - and I updated some images.  I deployed the application and tested it in our sandbox.  Everything looked great - I checked in the c

  • How to setup customization KPI (Key Performance Indictor) icon set on excel

    Hi, How to setup the KPI (Key Performance Indictor) using the customization KPI icon set on excel as request from company. Should it display the customization KPI icon with excel service of share point site?

  • Which is better, Sennheiser or Plantronics?

    As I post in the other thread but have no answer on audio latency. I have found that there is no audio latency with built-in microphone and in-line microphone. Do you have the experience with Plantronics Audio 350 Ultimate PC Headset and Sennheiser P

  • Issue in integrating Essbase cubes with OBIEE

    Hi I am trying to use Essbase cubes as datasource in OBIEE for generating reports,but the issue is in generating , No columns in fact table of cube in BMM layer. Outline of cube is Revel(cube) (Hierachies) Time Time <5> (Label Only) Item <54> (Label

  • Click on an Image?

    How can I add a click to an image, so that when its clicked, it will do this: myTexta[event.target.repeaterIndices-mapRepeater.startingIndex].visible = true;