JSF 2 : dynamic required validation for different buttons ?

Hello,
I'm currently learning about jsf 2.0 from core jsf 2.0 book + glassfish + cdi.
I have a question about the validation feature of JSF.
Let's say i have a very simple login application, which has a very simple layout like :
userid : (input field for userid - using required="true")
password : (input secret for password - using required="true")
loginButton + registerButton(using immediate="true") + checkUserIdAvailabilityButton
Now, let's say the loginButton is pressed, and the userid and password are left empty, validation error would occur on both of the fields, and that's working as what i intended.
And when the registerButton is pressed, it doesnt care whether the userid or password is filled by the user, since it's using immediate="true", thus bypassing validation and the command gets executed at the apply request value phase, and that's still working as what i intended.
And here comes my problem .. When the checkUserIdAvailabilityButton is pressed, i only expect the userid to be filled, and i dont need to care about whether the password field is filled or not, but the password field will throw error saying that it's a required field.
Is there anyway to resolve this kind of problem ? I know this could be a very simple application, but in my working place, i think they design lots of screens like this, like the save button along with refresh button with different required fields but the buttons are in the same page.
Thank you !

Hello there !
Thank you for the response.
I agree with the server side approach. I also find it not easy to maintain lots of uncentralized validations on many jsf pages.
For example, validation on the my CustomerName's length could get replicated on hundreds of pages, and when the requirement changes, i have to update many pages.
But doing this on the serverside is not easy either, i suppose, got to have a custom framework to fill the needs. Im thinking of a general validator that could validate when supplied the variable's name, and the validator will know whether the field needs validating on the correctness of the date value, or the length of the fieldname, etc, based on some external configuration that says this variable is a type of date, with max length of this, min value of that, etc.
If i dont have this kind of tools, i'll also replicate all the validations like the CustomerName's case on many bean methods, which i think is not maintainable too.
Do you happen to know whether this kind of validation tools exist somewhere ? I dont think that bean validation framework from jsr 303 would fill my need, am i correct ?
Regards,
Albert Kam

Similar Messages

  • Dynamic Text preparation for Command button in ADF (Tr component)

    We have one command link and our requirement is to preapre the command button text dynamicaly .?
    Details are givin below :
    I need to get the button text value form the UCMS file based on the dynamic preparation .
    The key value of UCMS is "setupfamily_group_1-8FAM4".
    In the above mentioned key value the part 1 is "*setupfamily_group*_" is static text and part 2 "*1-8FAM4*" is dynamic which i will get throuth the List of Objects.
    i.e managedServices.product.productId. here managedSercies is varible contains the Objects from the list.
    please let me know how to append the part1 and part 2 as mentioned above in Command button text field ?
    <tr:forEach items="#{pageFlowScope.myExtrasBean.managedServicesExtras}"
    var="managedServices">
    <tr:commandButton text="#{myExtrasBundle.setupfamily_group_+#managedServices.product.productId}" id="setup_service"
    actionListener="#{pageFlowScope.myExtrasBean.manageMyFamilyProducts}"
    action="vfFamilyFlow">
    <f:attribute name="productId" value="#{managedServices.product.productId}"/>
    </tr:commandButton>
    </forEach>
    We not getting how to append the Static and dynamic text for command button text filed ? pleas let me know the syntax .
    Thanks

    HI
    We have tried with above both options .its issues not resolved .
    for the first one we are getting the compile time error
    and for the second option ,when we run the dynamic value its self printing in the JSF .
    We are trying to prepare the command button text as some part dynamically and some part static and its will act as key in the XML and get the corresponding value from the UCMS .
    Thanks

  • How to exclude Required Validation for some fields?

    Hi,
    I have a page in a form with some fields that are set as required like this:
    Field 1   Field 2
    table
    Field 3   Field4 "Add" button
    Field 5    Field 6
    "Submit" button
    There are two buttons in this form. The "Add" button is PPR allows adding Field 3 and Field 4 to the table. The "Submit" button is for the actual submission and processing. When "Add" button is pressed, I only want the require validation to be done for Field 3 and Field 4, but not Field 1/Field 2/Field 5/Field 6.
    Currently, if I press "Add" button, the required field validations are triggered for all six fields. How can I only limit the require validation to some required fields only for this button?
    Thanks
    -Mina

    subform is a great idea and kinna what I needed in this situation, but there is another challenge.
    In my case, I tried to put table, Field 3 and Field 4 in subform:
    Field 1 Field 2
    <af:subform>
    table
    Field 3 Field4 "Add" button
    </af:subform>
    Field 5 Field 6
    "Submit" button
    When I press "Add" button, Required validation still triggered for all fields. Only if I put Field 1 and Field 2 in another subform, and Field 5 and Field 6 in a different subform. Then it works like this:
    <af:subform>
    Field 1 Field 2
    </af:subform>
    <af:subform>
    table
    Field 3 Field4 "Add" button
    </af:subform>
    <af:subform>
    Field 5 Field 6
    "Submit" button
    </af:subform>
    But in my case, I need Field 1, Field 2, Field 5, Field 6 and "Submit" button to be in the same subform, as the "Submit" button applies to these four fields. In the UI design, Field 3 and Field 4 are between Field 1/Field 2 and Field 5/Field 6 though.
    Any other ideas?

  • Dynamic-actions/expressions for Radio button in VC

    Hi,
    I would like to know whether dynamic actions for radio-buttons are possible in VC??
    I have a situation where, i have to display/hide an input-field according to the radio-button that i select.
    Is this possible in VC??
    Because, i do not find any place where i can write expressions for a radio-button so that it can take actions accordingly.

    Actually its possible.
    Here is the sample code for this.
    tables : kna1.
    parameters : chk1 radiobutton group g1 user-command abc,
                 chk2 radiobutton group g1.
    parameters : chk3 type kunnr.
    at selection-screen output.
    loop at screen.
      if chk1 = 'x' and screen-name = chk3.
          chk3-active = '0'.
      endif.
    endloop.
    In this way you can hide a input-field on the screen.

  • Dynamic region column for different user?

    Hi experts,
    I am developing a system for users with different privileges level corresponding to regions(state, city, country).
    National users could access states data within the nation, state users could access cities data within the
    state and so on for city users.
    I have a region hierarchies(state, city, country) and I was wondering if it can work:
    when  national users log on, they will see table like this: region column (hierarchies)+ data column
    state
    data
    For state users:
    city
    data
    Besides developing three separate tables for these type of user, how can I achieve this  with one table? Can the region column change dynamically corresponding to different users and also the column have drill down function ?
    Hope I make my question clear, any suggestion will be appreciated  . If this question had been asked, sorry about that and pls send me the link.
    regards,
    Jeff

    HI,
    You can done this by using "Data Level Security" and "Object Level Security".
    Step 1:
    Create the hierarchy as level1 Contains state and level 2 contains city.
    step:2
    Drag to presentation and right click on the hierarchy of level1 (State)
    Step3: Go to Permissions get the online user go to the particular user and give access to read for the state user and no access for city user.
    Step4: Right click on the level2 (City) and go to permission and set the user access to read for city user and no access for state user.
    Check inconsistency and save the RPD.
    Check in the report side.
    For more Ref:http://mkashu.blogspot.com
    Regards,
    VG

  • Is "AutoPostback" property valid for Radio button control in RCDC

    Hi,
    I have been trying to add "Autopostback" property to a radio button control, but it doesnt seem to be working.
    Below is the code:
    <my:Control
    my:Name="Activation"
    my:TypeName="UocSimpleRadioButton"
    my:Caption="{Binding
    Source=schema, Path=ADActivation.DisplayName}"
    my:Description="{Binding
    Source=schema, Path=ADActivation.Description}"
    my:AutoPostback="true"
    my:RightsLevel="{Binding
    Source=rights, Path=ADActivation}">
    <my:Properties>
    <my:Property
    my:Name="TrueText"
    my:Value="ADActive"/>
    <my:Property
    my:Name="FalseText"
    my:Value="NotActive"/><my:Property
    my:Name="SelectedItem"
    my:Value="{Binding
    Source=object, Path=ADActivation, Mode=TwoWay}" /></my:Properties></my:Control>
    Dolly

    Dolly,
    What do you expect the AutoPostback property to do?
    AutoPostback: This is an optional,
    Boolean-type attribute. The default value is false.
    If set to false, refreshing
    the page may not refresh the control. For information about AutoPostback,
    look for the Microsoft ASP.NET UI control property of the same name. -- FIM RCDC Reference
    According to MSDN:
    Set this property to true if the server needs to capture the selection as soon as it is made. For example, other controls on the Web page can be automatically filled depending on the user's selection from a list
    control.
    This property can be used to allow automatic population of other controls on the Web page based on a user's selection from a list.
    Blain Checkley illustrates its use with his blog post: http://identityminded.wordpress.com/2011/10/14/fim2010-semi-dynamic-rcdc-operations/
    David Lundell, Get your copy of FIM Best Practices Volume 1 http://blog.ilmbestpractices.com/2010/08/book-is-here-fim-best-practices-volume.html

  • Same JSF page being shown for different command links

    Hi
    I have two command links and as per navigation-rules, both of them go to the same page "Common.jsp" which has a <jsp:include> to include another file which is gets from session.
    Each command link specifies its own JSP page to be included (in common.jsp) and adds them to the sesion.
    After selecting one command link the desired page is showing up fine...
    However if I come back and select the second command_link, it shows the same page again.
    It does not even go to the action_listener of the second command_link.
    Is there any way to force it go to the actionlistener of the command_link where I can specify a different page in the session... ?
    Thanks

    Hi
    I have two command links and as per navigation-rules,
    both of them go to the same page "Common.jsp" which
    has a <jsp:include> to include another file which is
    gets from session.
    Each command link specifies its own JSP page to be
    included (in common.jsp) and adds them to the sesion.
    After selecting one command link the desired page is
    showing up fine...
    However if I come back and select the second
    command_link, it shows the same page again.
    It does not even go to the action_listener of the
    second command_link.
    Is there any way to force it go to the actionlistener
    of the command_link where I can specify a different
    page in the session... ?
    What do you mean by "specify a different page in the session"? An <h:command_link> always goes back to the page it was originally rendered from, and expects the action invoked by the command to determine where to go next. If you really want to go to different pages, you should either make the action method return different results (i.e. trigger different navigation rules) or consider using <h:output_link> instead, where you can define the destination URL yourself.
    Craig McClanahan
    Thanks

  • How to text for Submit button in different languages.

    Hi All
    We have a requirement to add 'Submit Button' in iSupplier Portal's Standard Pages.
    We have substituted the controller to add the Submit button and it works fine also .
    Our Application has 7 different languages, so the requirement is to show the button Text w.r.t the
    language only .
    We have written the following code
    OASubmitButtonBean oasb= (OASubmitButtonBean)oapagecontext.getWebBeanFactory().createWebBean(oapagecontext,"BUTTON_SUBMIT");
    oasb.setID("IPOPrintReportButton");
    oasb.setUINodeName("IPOPrintReportButton");
    oasb.setEvent("IPOPrintReportButton");
    oasb.setText("IPO Print Report Button");
    //oasb.setTranslatableText("XXIPO","XXIPO_PRINT_REPORT_TXT");
    pageButtonBarBean2.addIndexedChild(oasb);
    when we have used setText method , we are getting the same name in every language. so we tried using setTranslatableText Method and gave it the Messages to set the Button Text. But Now button text is empty .
    Pls tell us how to achieve this requirement of having text in different languages on the button ..w.r.t the environment language. we have also defined same Message 'XXIPO_PRINT_REPORT_TXT' for other languages.
    naveen

    Hi Kumar
    Can u pls brief this a little more .
    Lets say I get the language as German in the Controller . Now how do i set the test for the submit button .
    Do u mean to say I should check like this:
    If (langaue is german )
    button.setText("German Submit")
    else if (langauge is netherland)
    button.setText("Netherland Submit")
    harcoding the vaues in the contorller??

  • Click on Detach button in PanelCollection why required validation is fired?

    Hi All ,
    Click on Detach button in PanelCollection layout why required validation is fired of column which is required true.How to resolved this problem.and also i want to hide column hidden information.Which coming last in Panel Collection layout.
    Thank

    Hi,
    + Why required validation is fired of column which is required true+
    I assume that the detach button does have immediate=true set, which may be considered a bug. I don't think you can do anything against this other than filing a bug as the behavior is developed in JavaScript (which version of JDeveloper do you use?)
    and also i want to hide column hidden information
    Make sure you phrase your questions so that they are understood. What does this mean to me ?
    Frank

  • How to parse RSS Feed - Different URL for each button

    I'm making an app with AS3 and I want to be able to load a different RSS Feed when the user clicks on each button. This is the code I have so far, has anyone any idea how I can modify my code to do this?
    here's my code so far:
    //IMPORT CLASSES
    import fl.controls.List;
    import flash.net.URLLoader;
    import flash.events.Event;
    import flash.net.URLRequest;
    cGOSSIP.addEventListener(MouseEvent.CLICK, doClick);
    function doClick (e:MouseEvent):void
    cGOSSIP.gotoAndStop ("GOSSIP"); 
    wNEWS.addEventListener(MouseEvent.CLICK, doClick2);
    function doClick2 (e: MouseEvent):void
              wNEWS.gotoAndStop ("WORLD NEWS");
    eNEWS.addEventListener(MouseEvent.CLICK, doClick3);
    function doClick3 (e: MouseEvent):void
              eNEWS.gotoAndStop ("ENT NEWS");
    fbNEWS.addEventListener(MouseEvent.CLICK, doClick4);
    function doClick4 (e: MouseEvent):void
              fbNEWS.gotoAndStop ("FB NEWS");
    //NEWSLIST FORMATTING
    var newsListTf:TextFormat = new TextFormat();
    newsListTf.font = "Verdana";
    newsListTf.color = 0xFFFFFF;
    newsListTf.size = 18;
    newsListTf.align = "left";
    newsList.setRendererStyle("textFormat", newsListTf);
    newsList.rowHeight = 100;
    newsList.allowMultipleSelection = false;
    //newsList.wordWrap = true;
    //NEWSDISPLAY TEXT AREA FORMATTING
    var rssStoryTf:TextFormat = new TextFormat();
    rssStoryTf.font = "Verdana";
    rssStoryTf.color = 0x6699CC;
    rssStoryTf.size = 22;
    rssStoryTf.align = "left";
    rssStory.setStyle("textFormat", rssStoryTf);
    //READMORE BUTTON FORMATTING
    var buttonTf:TextFormat = new TextFormat();
    buttonTf.font = "Verdana";
    buttonTf.color = 0xFFFFFF;
    buttonTf.size = 22;
    btn_ReadMore.setStyle("textFormat", buttonTf);
    //RSS FEED
    var rssLoader:URLLoader = new URLLoader();
    var rssURL:URLRequest = new URLRequest
    ("http://rssfeeds.tv.adobe.com/adobe-higher-education-solutions.xml");
    rssLoader.addEventListener(Event.COMPLETE, rssLoaded);
    newsList.addEventListener(Event.CHANGE, selectRssStory);
    btn_ReadMore.addEventListener(MouseEvent.CLICK, goToURL);
    rssLoader.load(rssURL);
    var newsXML:XML = new XML();
    var currentStoryURL:URLRequest = new URLRequest();
    newsXML.ignoreWhitespace = true;
    function rssLoaded(evt:Event):void
    newsXML = new XML(rssLoader.data);
    //trace(newsXML);
    for(var item:String in newsXML.channel.item) {
    //newsList.addItem({label: newsXML.channel.item[item].pubDate.substr(0, 16)
    //+": " + newsXML.channel.item[item].title } );
    newsList.addItem({label: newsXML.channel.item[item].title.substr(0, 40)
    +" ..." } );
    newsList.selectedIndex = 0;
    //FIRST LOAD
    currentStoryURL = new URLRequest(newsXML.channel.item[0].link);
    rssStory.htmlText = newsXML.channel.item[0].description;
    function selectRssStory(evt:Event):void
    rssStory.htmlText = newsXML.channel.item[evt.target.selectedIndex ].description;
    currentStoryURL = new URLRequest(newsXML.channel.item[evt.target.selectedIndex
    ].link);
    function goToURL(event:MouseEvent):void
    navigateToURL(currentStoryURL);

    I copied the wrong code, it works and loads the feed but I have a number of buttons in the main menu and I want to be able to load a different rss feed for each button?
    Here's the code.
    btn_Home.addEventListener(MouseEvent.CLICK, clickHome);
    function clickHome(e:MouseEvent):void
              gotoAndStop ("START");
    //NEWSLIST FORMATTING
    var newsListTf:TextFormat = new TextFormat();
    newsListTf.font = "Verdana";
    newsListTf.color = 339999;
    newsListTf.size = 18;
    newsListTf.align = "left";
    newsList.setRendererStyle("textFormat", newsListTf);
    newsList.rowHeight = 100;
    newsList.allowMultipleSelection = false;
    //newsList.wordWrap = true;
    //NEWSDISPLAY TEXT AREA FORMATTING
    var rssStoryTf:TextFormat = new TextFormat();
    rssStoryTf.font = "Verdana";
    rssStoryTf.color = 0x6699CC;
    rssStoryTf.size = 22;
    rssStoryTf.align = "left";
    rssStory.setStyle("textFormat", rssStoryTf);
    //READMORE BUTTON FORMATTING
    var buttonTf:TextFormat = new TextFormat();
    buttonTf.font = "Verdana";
    buttonTf.color = 0xFFFFFF;
    buttonTf.size = 22
    btn_ReadMore.setStyle("textFormat", buttonTf);
    //RSS FEED
    var rssLoader:URLLoader = new URLLoader();
    var rssURL:URLRequest = new URLRequest
    ("http://www.tmz.com/rss.xml");
    rssLoader.addEventListener(Event.COMPLETE, rssLoaded);
    newsList.addEventListener(Event.CHANGE, selectRssStory);
    btn_ReadMore.addEventListener(MouseEvent.CLICK, goToURL);
    rssLoader.load(rssURL);
    var newsXML:XML = new XML();
    var currentStoryURL:URLRequest = new URLRequest();
    newsXML.ignoreWhitespace = true;
    function rssLoaded(evt:Event):void
    newsXML = new XML(rssLoader.data);
    //trace(newsXML);
    for(var item:String in newsXML.channel.item) {
    //newsList.addItem({label: newsXML.channel.item[item].pubDate.substr(0, 16)
    //+": " + newsXML.channel.item[item].title } );
    newsList.addItem({label: newsXML.channel.item[item].title.substr(0, 40)
    +" ..." } );
    newsList.selectedIndex = 0;
    //FIRST LOAD
    currentStoryURL = new URLRequest(newsXML.channel.item[0].link);
    rssStory.htmlText = newsXML.channel.item[0].description;
    function selectRssStory(evt:Event):void
    rssStory.htmlText = newsXML.channel.item[evt.target.selectedIndex ].description;
    currentStoryURL = new URLRequest(newsXML.channel.item[evt.target.selectedIndex
    ].link);
    function goToURL(event:MouseEvent):void
    navigateToURL(currentStoryURL);

  • Need a Effective Design Pattern for Different Validation methods ???

    Hi All,
    I am having different validation methods with separate functions. I like to know the Best and Effective Design Pattern to do this.
    for example
    validateUserId()
    validatePassword()
    validateAuthentication()
    validateSession()
    validateConnection()
    .... etc......
    Can anybody help me to solve this?
    Thanks,
    J.Kathir

    Hi there - is this the kind of thing you wanted?.
    This structure has served me well. There is quite a lot to it and lots you need to infer but you should be able to work it out!
    It works for EJB & swing etc (I believe)..
    It doesn't use exceptions to return validation messages.
    It doesn't use lots of little objects. The code is very explicit & pretty simple.
    public class PersonValidator
    Person myData;
    public PersonValidator() {
    //personId will be 0 and we are in nsert mode
    myData = new Person();
    public PersonValidator(long personId) {
    //personId will have a value and we are in update mode
    myData = PersonDb.getPerson(personId);
    // =================================Single field validation
    // =================================For swing apps to call - not over network.
    // =================================Use validateData method
    public String validateDateOfBirth(String dataOfBirthStr) {
    String msg = "";
    msg = validateDateStr(dataOfBirthStr);
    if (!msg.equals("")) return msg;
    public String validateSurname(String surname) {
    String msg = "";
    if (surname.equals("")) return "surname must be entered";
    //=============================================Cross Validation
    public List crossValidateAndSave(boolean saveData) {
    String msg = "";
    List valerrs = new ArrayList();
    if (surname.equals("Collins") && dateOfBirth.compareTo("???")) {
    List.add("Candidate is lying about their age. Please enter a realistic Date of birth");
    if (valerrs.size() == 0) {
    if (saveData()) {
    personDb.saveData(myData);
    // =========================To validate across the netwrok this lets you
    // pass all the data in 1 go & receive multiple messages in reply.
    // AN EJB can delegate to this code or this code could be in the EJB.
    // @param stopAtFirstMessage flag allow efficiency if app ccan't handle multiple validation
    // erros at a time.
    // @param saveData flag allows validation without saving - allows for confirm message.
    // @param EditPersonGuiData - What the user types in. Numeric data & dates can be
    // in Strings. Using struts this could be the formBean.
    public List validateData(EditPersonGuiData inputData, boolean stopAtFirstMessage, boolean saveData) {
    String msg = "";
    List valerrs = new ArrayList();
    msg = validateDateOfBirth(inputData.dateOfBirth);
    if (!msg.equals("")) valerrs.add(msg);
    if (stopAtFirstMessage) return valerrs;
    valerrs = crossValidateAndSave()
    return valerrs;
    }

  • How to switch to a different app store? I am trying to update my apps but am getting a popup that says your account is not valid for use in the uS store. you must switch to the Canadian Store before purchasing. How do I do this?  I can't find the place

    I am trying to update my apps but keep getting a popup that says "Your Account is not valid for use in the US store. you must switch to the Canadian Store before purchasing." I can not find where to do this! Please help! Thank you!

    [Apologies to pdesteele for this slight OT bit, but it's all relevant to your question, I think ]
    We do have a place in the UK which we could use as an address, but for various reasons it gets a bit complex even though we still have a UK bank account. We moved to France when there were no iDevices and apps around, just bought the occasional music, so it wasn't a problem. Funny thing is I can't even download the free UK bank app because it's not available in the French store .
    I'll live with the problem for now as we plan to move back to the UK in a year or so - we miss the weather .

  • DRM Validation for checking existence of nodes in a different Hierarchy as a property value

    Hello Gurus,
    I have two hierarchies named A & B respectively. I need to create a validation for nodes in hierarchy A which checks value of a property such that the node should have property value equal to any node name in Hierarchy B.
    Means the values for that particular property for nodes in hierarchy A should exist as a node in hierarchy B.
    It would be very grateful if some one can provide an idea to achieve this.

    Hi,
    Try this in a formula type validation-
    NodeInHier(PropValue(Custom.PropName),B)
    This would return false if the property value is not a node in Hierarchy B and True if it is.
    So you will get a validation message every time the property is loaded with a value which is not node in Hierarchy B.
    Thanks, Let me know
    Denzz

  • Can the same button be used for different things

    hi, i want to be able to change what area the player goes to when they press the journey button. but the code i made can only display one message, and that is, "you journey on..."
    i want to be able , for each button press, to move the player forward to a new area, is that possible? here is the code so far.
    import java.applet.Applet;
    import java.awt.Button;
    import java.awt.Graphics;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    public class Buttondemo extends Applet implements ActionListener{
    String msg = "";
    String zone = "forest";
    String message = "Current zone is" + zone;
    Button attack,run, inventory, search, journey ;
    public void init(){
    attack = new Button("attack");
    run = new Button("run");
    inventory = new Button("inventory");
    search = new Button("search");
    journey = new Button("journey");
    add(attack);
    add(run);
    add(inventory);
    add(search);
    add(journey);
    attack.addActionListener(this);
    run.addActionListener(this);
    inventory.addActionListener(this);
    search.addActionListener(this);
    journey.addActionListener(this);
    public void actionPerformed(ActionEvent ae){
    String str = ae.getActionCommand();
    if(str.equals("attack")){
    msg = "You attack!";
    else if(str.equals("run")){
    msg = "You run!";
    else if(str.equals("inventory")){
    msg = "Here is your inventory";
    else if(str.equals("search")){
         msg = "You start searching...";
    else 
         msg = "You journey on...";
    repaint();
    public void paint(Graphics g){
    g.drawString(msg, 6, 100);

    Ofcourse its possible. Maybe you wanna consider using an specific actionlistener for the journey button instead of using the common actionlistener.
    Like this:
    journey.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent ae){
              //Move forward...
    });

  • Dynamic system resolution for portal published BI content

    I have a Dev-Tst-Prd ABAP stack BI landscape with a corresponding Dev-Tst-Prd Java stack portal landscape.
    My BI developers create reports and webdynpro applications which are then published to our portal and made available via iViews.  These iViews refer to the target applications via URLs which contain hardcoded hostnames and port numbers.  This makes it a pain when portal content is transported from Dev to Tst and then to Prd.
    All my BI systems are known by the SAP_BW alias.  I have a different system definition in each portal for the SAP_BW alias pointing to the corresponding BI backend.
    Can I use dynamic system resolution for this?  If so, how?
    I want a URL like http://<devhost.domain>:<devport>/sap/bc/webdynpro/sap/appname to be transportable.  Obviously if that starts out as http://dev.mycompany.com:8100/sap/bc/webdynpro/sap/appname, it won't work when it arrives in tst where it needs to be http://tst.mycompany.com:8110/sap/bc/webdynpro/sap/appname.  If I could store the URL as something like http://<%JSP SAP_BW %>/sap/bc/webdynpro/sap/appname this could be transportable if there was something in dynamic system resolution to resolve the variable appropriately at runtime in each system.
    As a Netweaver administrator, rather than a portal developer, I'm a little lost as to where to even start.

    Success!  Thank you for your help.
    What finally worked?
    Create a Portal Component iView of type com.sap.portal.appintegrator.sap
    Set URL Template to http://<System.wap.ITS.hostname>/sap/bc/webdynpro/sap/zcs_wd_cc_app
    Set System to SAP_BW (where SAP_BW is an alias for the System entry for the system where we want the WebDynpro app to run)
    Where did the help come from?
    SDN (Mr Nicholls in particular)
    SAP Help (http://help.sap.com/saphelp_nw70/helpdata/en/21/dfd241cb76c417e10000000a155106/frameset.htm in particular)
    Where did the parameter value reference come from?
    The "wap.ITS.hostname" attribute name came from the portal's system definition for SAP_BW.  Under System Administration -> System Configuration -> System Landscape -> Portal Content the entry for the SAP_BW system can be displayed.  In that system entry there is a field labelled SAP ITS host which contains the fully qualified hostname and port number for the ITS server delivering my application.  Expanding the detail of this field (click the arrow head beside the name) shows its Property ID to be wap.ITS.hostname.
    So this last answers my earlier question about where to find the valid contexts and attributes per context for the variables to substitute in the URL template.  The contexts are the names of the fields available to configure the iView, the attributes are the Property IDs of the relevant information fields in the obect described by the context.
    Note:  This solution ended up only being required for WebDynpro content.  The generated URL for WebDynpros appears to resolve any load-balance ITS URL to a specific host and port before publishing, the method here leaves the resolution until runtime - a great advantage in performance and flexibility.
    The Web Application Designer published report content was generated in a transportable form already.

Maybe you are looking for

  • Can't open Illustrator file - "does not have the correct number of operands..."

    Right off the bat - Mac, 10.6.8, Illustrator CS4. I've seen different variations of this "...correct number of operands..." error on these boards, with fonts and other things as the culprit, but I haven't come across this specific issue yet. If someo

  • Using getApplicationModule in the VO Constructor

    I'm trying to use a the getApplicationModule in the constructor of my VO but it returns null. Is there any way to avoid this behaviour ? I suspect there's a problem related to the loading time and order (but I'm sure the ApplicationModule was already

  • Nikon D7000 .nef files

    I have a Nikon D7000 camera which creates raw files - .nef and my version of CS5 is not able to open them directly. Does the latest version of CS5 resolve this problem?

  • Negative values when emptying the trash

    I'm doing a secure version of emptying the trash. The "Items to delete" status has now reached a value of -2 (yes, it went from 0 to negative 1 to negative 2). Any idea what's going wrong here? It's still going.

  • IMovie hangs at Encoding Audio

    Is it normal for iMovie 6 to "hang" when it is going through the "encoding audio" portion of a burn? Each project I've done has the "spinning beach ball of death" during the process. Anywhere from 30 minutes to an hour. The last project I tried to bu