cancel
Showing results for 
Search instead for 
Did you mean: 

Hide Calendar in ESS Web Dynpro Time Entry Application

Former Member
0 Kudos
50

Hello All,

We are currently on ESS SP 11. NW 2004 SP19 (EP 6.0 SP 19)

In "Record Working Time" application, we see the Calendar expanded by default. We want to Hide the Calendar by default.

I have went the link but the actual procedure for modifying the Web dynpro CCs is not mentioned there.

Please suggest me the changes to be done exactly to achieve this functionality.

Thanks for the time taken. Points will be awarded for all the helpful answers.

Thanks,

Raj

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

You don't need to develpo anything to get this done. In the portal you need to get the role Self-Service Administrator. With this role you will be able to navigate als you do as portal content administrator.

Within the Content Provided by SAP->srvconfig (This is the floorplan manager configuration) you can navigate to the time sheet, there you click on next, click on the tab CAP view and unclick the marked checkbox.

Next time you use the time sheet the calendar doesn't show, and the control says Show calendar.

Regards

former_member188032
Participant
0 Kudos

Did anyone every figure out how to do this in NW 2004? There have been a couple of forum replies referencing the Self-Service Administrator role. The floorplan manager configuration is not accessible thru EP 6.0, NW2004. I need to have the calendar hidden when the WebDynpro timesheet is initially displayed, with the link option to "show calendar" instead of having the calendar visible with the "hide calendar" link. Any suggestions would be deeply appreciated.

Former Member
0 Kudos

Hi,

Not sure if the posters here were able to eventually accomplish this or not. If not, this is the way I was able to do it:

you go into pcui_gp~xssutils -> Web Dynpro -> Web Dynpro Componenets -> FcCap -> Component Controller (Implementation) and change the method prepareCapUpdate:

if (useDefault == true) {

//If user never selected an item use activeItem from configuration

preparedActiveItem = "xx";//preparedCAPState.getActiveItem();

Just change the line "preparedActiveItem = preparedCAPState.getActiveItem();" to "preparedActiveItem = "xx";//preparedCAPState.getActiveItem();"

That should do the trick.

Thanks,

-Kevin

Edited by: Kevin Deuel on Jan 17, 2008 11:56 AM

Edited by: Kevin Deuel on Jan 17, 2008 12:02 PM

Former Member
0 Kudos

Hi ,

There would be a function called getCAPItems .Look in this . This must be returning a set of CAPs .. One of them is the calendar.

Regards

Bharathwaj

Former Member
0 Kudos

Hello Bharathwaj,

Thanks for your reply.

I could not locate the method "getCAPItems" in the WD Component "CcCatRecord".

In the implementation of the Interface Controller of the

Web Dynpro Component "CcCatRecord", I found the method

"getCAPState" and the implementation of this method is as follows:

public com.sap.pcuigp.xssutils.java.CAPState getCAPState( com.sap.pcuigp.xssfpm.java.Perspective perspective )

{

//@@begin getCAPState()

if (perspective.getName() == PERSPECTIVE_RECORD)

{

return new CAPState(cap, cap[0].getId());

}

else

{

return null;

}

//@@end

}

Am I looking at the right place ?

Where else can I look for the same?

Do you want me to post the whole code for the Interface Controller of the WD Component "CcCatRecord" ?

Please suggest me.

Thank You for your time on this thread.

Thanks,

Raj

Former Member
0 Kudos

Hi ,

You are looking at the right place.. Sorry for the typo..

Here there is a variable cap. Its seems to be an array of somethin.. Look into this array.. U shud be able to find your calendar here..

If you cannot find the same, please post the code of Interface Controller of Cc ..

Regards

Bharathwaj

Former Member
0 Kudos

Hello Bharathwaj,

I could not figure out the logic in the code.

I am posting the code for interface controller of component

"CcCatRecord".

Please help with the code modification.

Thanks in Advance.

Regards,

Raj

// -

-


// This file has been generated partially by the Web Dynpro Code Generator.

// MODIFY CODE ONLY IN SECTIONS ENCLOSED BY @@begin AND @@end.

// ALL OTHER CHANGES WILL BE LOST IF THE FILE IS REGENERATED.

// -

-


package com.sap.xss.hr.cat.record.cc;

//

// IMPORTANT NOTE:

// ALL IMPORT STATEMENTS MUST BE PLACED IN THE FOLLOWING SECTION ENCLOSED

// BY @@begin imports AND @@end. FURTHERMORE, THIS SECTION MUST ALWAYS CONTAIN

// AT LEAST ONE IMPORT STATEMENT (E.G. THAT FOR IPrivateCcCatRecordInterface).

// OTHERWISE, USING THE ECLIPSE FUNCTION "Organize Imports" FOLLOWED BY

// A WEB DYNPRO CODE GENERATION (E.G. PROJECT BUILD) WILL RESULT IN THE LOSS

// OF IMPORT STATEMENTS.

//

//@@begin imports

import java.util.HashMap;

import com.sap.pcuigp.xssfpm.java.IFPM;

import com.sap.pcuigp.xssfpm.java.IMessageManager;

import com.sap.pcuigp.xssfpm.java.NavigationGraph;

import com.sap.pcuigp.xssfpm.java.NavigationPath;

import com.sap.pcuigp.xssfpm.java.Perspective;

import com.sap.pcuigp.xssfpm.java.VAC;

import com.sap.pcuigp.xssutils.java.CAPItem;

import com.sap.pcuigp.xssutils.java.CAPState;

import com.sap.pcuigp.xssutils.java.ROPState;

import com.sap.pcuigp.xssutils.java.ROPStep;

import com.sap.xss.hr.cat.record.cc.wdp.IPrivateCcCatRecordInterface;

//@@end

//@@begin documentation

//@@end

public class CcCatRecordInterface

{

/**

  • Logging location.

*/

private static final com.sap.tc.logging.Location logger =

com.sap.tc.logging.Location.getLocation(CcCatRecordInterface.class);

static

{

//@@begin id

String id = "$Id$";

//@@end

com.sap.tc.logging.Location.getLocation("ID.com.sap.tc.webdynpro").infoT(id);

}

/**

  • Private access to the generated Web Dynpro counterpart

  • for this controller class. </p>

*

  • Use <code>wdThis</code> to gain typed access to the context,

  • to trigger navigation via outbound plugs, to get and enable/disable

  • actions, fire declared events, and access used controllers and/or

  • component usages.

*

  • @see com.sap.xss.hr.cat.record.cc.wdp.IPrivateCcCatRecordInterface for more details

*/

private final IPrivateCcCatRecordInterface wdThis;

/**

  • Root node of this controller's context. </p>

*

  • Provides typed access not only to the elements of the root node

  • but also to all nodes in the context (methods nodeXYZ())

  • and their currently selected element (methods currentXYZElement()).

  • It also facilitates the creation of new elements for all nodes

  • (methods createXYZElement()). </p>

*

  • @see com.sap.xss.hr.cat.record.cc.wdp.IPrivateCcCatRecordInterface.IContextNode for more details.

*/

private final IPrivateCcCatRecordInterface.IContextNode wdContext;

/**

  • A shortcut for <code>wdThis.wdGetAPI()</code>. </p>

  • Represents the generic API of the generic Web Dynpro counterpart

  • for this controller. </p>

*/

private final com.sap.tc.webdynpro.progmodel.api.IWDController wdControllerAPI;

/**

  • A shortcut for <code>wdThis.wdGetAPI().getComponent()</code>. </p>

  • Represents the generic API of the Web Dynpro component this controller

  • belongs to. Can be used to access the message manager, the window manager,

  • to add/remove event handlers and so on. </p>

*/

private final com.sap.tc.webdynpro.progmodel.api.IWDComponent wdComponentAPI;

public CcCatRecordInterface(IPrivateCcCatRecordInterface wdThis)

{

this.wdThis = wdThis;

this.wdContext = wdThis.wdGetContext();

this.wdControllerAPI = wdThis.wdGetAPI();

this.wdComponentAPI = wdThis.wdGetAPI().getComponent();

}

//@@begin javadoc:wdDoInit()

/** Hook method called to initialize controller. */

//@@end

public void wdDoInit()

{

//@@begin wdDoInit()

//@@end

}

//@@begin javadoc:wdDoExit()

/** Hook method called to clean up controller. */

//@@end

public void wdDoExit()

{

//@@begin wdDoExit()

//@@end

}

//@@begin javadoc:loadConfiguration()

/** declared method */

//@@end

public void loadConfiguration( com.sap.pcuigp.xssfpm.java.IFPM fpm )

{

//@@begin loadConfiguration()

String dcName = "sap.com/ess~cat";

this.fpm = fpm;

//Soll zentral gelöst werden

//hasReviewStep = fpm.getApplicationProperties().getProperty("sap.xss.hr.cat.reviewstep").equals("yes");

//

// build VACs

//

vacCalendar = new VAC(dcName,

"com.sap.xss.hr.cat.record.vac.calendar.VcCatCalendar");

vacWorklist = new VAC(dcName,

"com.sap.xss.hr.cat.record.vac.worklist.VcCatRecordWorklist");

vacDetail = new VAC(dcName,

"com.sap.xss.hr.cat.record.vac.entry.VcCatRecordEntry");

vacReview = new VAC(dcName,

"com.sap.xss.hr.cat.record.vac.review.VcCatRecordReview");

vacConfirm = new VAC(dcName,

"com.sap.xss.hr.cat.record.vac.confirm.VcCatRecordConfirm");

// XZQ Begin New perspective for detail

vacDetailDay = new VAC(dcName,

"com.sap.xss.hr.cat.record.vac.detail.VcCatRecordDetail");

// XZQ End

// build perspectives

DetailPerspective = new Perspective(PERSPECTIVE_RECORD,

Perspective.LAYOUT_ROW,

new VAC[] { vacDetail });

ReviewPerspective = new Perspective(PERSPECTIVE_REVIEW,

Perspective.LAYOUT_ROW,

new VAC[] );

ConfirmPerspective = new Perspective(PERSPECTIVE_CONFIRM,

Perspective.LAYOUT_ROW,

new VAC[] );

// XZQ Begin

DetailDayPerspective = new Perspective(PERSPECTIVE_DETAIL,

Perspective.LAYOUT_ROW,

new VAC[] );

// XZQ End

perspectives = new HashMap();

perspectives.put(DetailPerspective.getName(), DetailPerspective);

perspectives.put(ReviewPerspective.getName(), ReviewPerspective);

perspectives.put(ConfirmPerspective.getName(), ConfirmPerspective);

// XZQ Begin

perspectives.put(DetailDayPerspective.getName(), DetailDayPerspective);

// XZQ End

navigationGraph = new NavigationGraph(new NavigationPath[] {

new NavigationPath( "", IFPM.EVENT_START, PERSPECTIVE_RECORD),

new NavigationPath(PERSPECTIVE_RECORD, IFPM.EVENT_REVIEW, PERSPECTIVE_REVIEW),

new NavigationPath(PERSPECTIVE_RECORD, IFPM.EVENT_SELECT, PERSPECTIVE_RECORD),

new NavigationPath(PERSPECTIVE_REVIEW, IFPM.EVENT_BACK, PERSPECTIVE_RECORD),

new NavigationPath(PERSPECTIVE_REVIEW, IFPM.EVENT_SAVE, PERSPECTIVE_CONFIRM),

// XZQ Begin

new NavigationPath(PERSPECTIVE_RECORD, ACTION_DISPLAY_DETAIL, PERSPECTIVE_DETAIL),

new NavigationPath(PERSPECTIVE_DETAIL, IFPM.EVENT_BACK, PERSPECTIVE_RECORD),

new NavigationPath(PERSPECTIVE_DETAIL, ACTION_UPDATE_DETAIL, PERSPECTIVE_RECORD),

// XZQ End

new NavigationPath(PERSPECTIVE_CONFIRM, IFPM.EVENT_BACK, PERSPECTIVE_RECORD)

});

// build CAP

// YCY deprectaed method call removed Jan 20, 2004 8:20:14 AM

CAPItem capItem1 = new CAPItem("1",wdThis.wdGetAPI().getComponent().getTextAccessor().getText("VACCalendar"),vacCalendar);

CAPItem capItem2 = new CAPItem("2",wdThis.wdGetAPI().getComponent().getTextAccessor().getText("VACWorklist"),vacWorklist);

cap = new CAPItem[] {capItem1,capItem2};

//@@end

}

//@@begin javadoc:getNextPerspective()

/** declared method */

//@@end

public com.sap.pcuigp.xssfpm.java.Perspective getNextPerspective( com.sap.pcuigp.xssfpm.java.Perspective currentPerspective, java.lang.String eventName )

{

//@@begin getNextPerspective()

// stay on same perspective when CAP changes

if (eventName.equals(IFPM.EVENT_CAPSELECT)) {

return (Perspective) perspectives.get(currentPerspective.getName());

}

// switch to new perspective

String currentPerspectiveName = (currentPerspective == null) ? "" : currentPerspective.getName();

// String toPerspectiveName = navigationGraph.getNextNode(currentPerspectiveName, fpm.getRunningContext(), eventName);

String toPerspectiveName = navigationGraph.getNextNode(currentPerspectiveName, eventName);

if (toPerspectiveName == null) {

// YCY deprectaed method call removed Jan 20, 2004 8:20:42 AM

fpm.getMessageManager().raiseException(wdThis.wdGetAPI().getComponent(), null, IMessageManager.DEFAULT_EXCEPTION, wdThis.wdGetAPI().getComponent().getTextAccessor().getText("EXCNoNextPers"));

return null;

}

Perspective toPerspective = (Perspective) perspectives.get(toPerspectiveName);

if (toPerspective == null) {

// YCY deprectaed method call removed Jan 20, 2004 8:20:52 AM

fpm.getMessageManager().raiseException(wdThis.wdGetAPI().getComponent(), null, IMessageManager.DEFAULT_EXCEPTION, wdThis.wdGetAPI().getComponent().getTextAccessor().getText("EXCInvalidPers", new Object[]{ toPerspectiveName }));

return null;

}

return toPerspective;

//@@end

}

//@@begin javadoc:getCAPState()

/** declared method */

//@@end

public com.sap.pcuigp.xssutils.java.CAPState getCAPState( com.sap.pcuigp.xssfpm.java.Perspective perspective )

{

//@@begin getCAPState()

if (perspective.getName() == PERSPECTIVE_RECORD)

{

return new CAPState(cap, cap[0].getId());

}

else

{

return null;

}

//@@end

}

//@@begin javadoc:getStartPerspective()

/** declared method */

//@@end

public com.sap.pcuigp.xssfpm.java.Perspective getStartPerspective( )

{

//@@begin getStartPerspective()

return getNextPerspective(null, IFPM.EVENT_START);

//@@end

}

//@@begin javadoc:getROPState()

/** declared method */

//@@end

public com.sap.pcuigp.xssutils.java.ROPState getROPState( com.sap.pcuigp.xssfpm.java.Perspective perspective )

{

//@@begin getROPState()

// YCY deprectaed method call removed Jan 20, 2004 8:21:19 AM

// XZQ Begin

ROPStep step4 = new ROPStep("DetailDay", wdThis.wdGetAPI().getComponent().getTextAccessor().getText(PERSPECTIVE_DETAIL), null);

// XZQ End

ROPStep step1 = new ROPStep("Detail", wdThis.wdGetAPI().getComponent().getTextAccessor().getText(PERSPECTIVE_RECORD), new ROPStep[] {step4});

ROPStep step2 = new ROPStep("Review", wdThis.wdGetAPI().getComponent().getTextAccessor().getText(PERSPECTIVE_REVIEW), null);

ROPStep step3 = new ROPStep("Confirm", wdThis.wdGetAPI().getComponent().getTextAccessor().getText(PERSPECTIVE_CONFIRM), null);

String perspectiveName = perspective.getName();

ROPState ropState = new ROPState(new ROPStep[] {step1, step2, step3}, step1.getId());

if ( perspectiveName.equals(PERSPECTIVE_RECORD) )

ropState = new ROPState(new ROPStep[] {step1, step2, step3}, step1.getId());

else if ( perspectiveName.equals(PERSPECTIVE_REVIEW) )

ropState = new ROPState(new ROPStep[] {step1, step2, step3}, step2.getId());

else if ( perspectiveName.equals(PERSPECTIVE_CONFIRM) )

ropState = new ROPState(new ROPStep[] {step1, step2, step3}, step3.getId());

// XZQ Begin

else if ( perspectiveName.equals(PERSPECTIVE_DETAIL) )

ropState = new ROPState(new ROPStep[] {step1, step2, step3}, step4.getId());

// XZQ End

return ropState;

//@@end

}

/*

  • The following code section can be used for any Java code that is

  • not to be visible to other controllers/views or that contains constructs

  • currently not supported directly by Web Dynpro (such as inner classes or

  • member variables etc.). </p>

*

  • Note: The content of this section is in no way managed/controlled

  • by the Web Dynpro Designtime or the Web Dynpro Runtime.

*/

//@@begin others

private IFPM fpm;

private NavigationGraph navigationGraph;

private Perspective DetailPerspective;

private Perspective ReviewPerspective;

private Perspective ConfirmPerspective;

// XZQ Begin

private Perspective DetailDayPerspective;

// XZQ End

private VAC vacDetail;

private VAC vacCalendar;

private VAC vacWorklist;

private VAC vacReview;

private VAC vacConfirm;

// XZQ Begin

private VAC vacDetailDay;

// XZQ End

private HashMap perspectives;

public static String PERSPECTIVE_RECORD = "Detail";

public static String PERSPECTIVE_REVIEW = "Review";

public static String PERSPECTIVE_CONFIRM = "Confirm";

// XZQ Begin

public static String PERSPECTIVE_DETAIL = "DetailDay";

// XZQ End

static public boolean hasReviewStep = true;

// XZQ Begin

public final static String ACTION_DISPLAY_DETAIL = "DISPLAY_DETAIL";

public final static String ACTION_UPDATE_DETAIL = "UPDATE_DETAIL";

// XZQ End

private CAPItem[] cap = null;

//@@end

}

Former Member
0 Kudos

Hi ,

cap = new CAPItem[] {capItem1,capItem2};

change tis to

cap = new CAPItem[] {capItem2};

Regards

Bharathwaj.

Former Member
0 Kudos

Hello Bharathwaj,

I have made the code changes and deployed the application.

This changes completely remove the calendar and the calendar link from the application.

How can we make the "calendar link" to show up and hide the calendar by default.

Please suggest.

Thanks again for your time on this thread.

Regards,

Raj Kumar

Former Member
0 Kudos

Hi ,

I dont get you. Do you want it to be open by default ?

Regards

Bharathwaj

Former Member
0 Kudos

Hello Bharathwaj,

I want the Calendar to be CLOSED by default. It should open only after I click on "Show Calendar".

The code changes you have suggested previously completely remove the calendar from the application.

Please suggest.

Thanks,

Raj Kumar

Former Member
0 Kudos

Hi ,

I havent edited this component.. But am pretty sure that by default its closed.. Unless u have opened it in the previous screen or somethin..

If you have to minimize it the procedure would be look for something like

new CAPItem("1","Calendar",VacCalendar);

Here VacCalendar might be somethin relevant to your application.Check what component that Vac is based on.. say for example VcCalendar.. Then u have open this component and change the same.

Your relevant component is <b>VcCatCalendar

</b>

Regards

Bharathwaj

Message was edited by:

Bharathwaj R