0

I have create ADF application which has page that using panel splitter and command tool bar button. 1.How to make panel splitter width fixed and and cannot be moved in the ADF pages? Since currently, i can move the splitter using mouse and adjust the size.

2.How to disable command toolbar button or change the colour after click? Reason I do like this is to let user know which page that currently view right now. For example: I have navigation bar(using command Toolbar button) -HOME -REGISTRATION -VIEW PROJECT If I choose REGISTRATION button,it will display registration page.REGISTRATION button will disable or change colour until other button has been choose.

Can anyone help?Need this thing urgently. Thanks in advance.

Reena Sham
  • 41
  • 3
  • 8
  • Does you panel splitter move horizontal? A screenshot would be helpfull (for your first problem). For your second problem (the button) you can just add a method in your bean which gets activated when you click a certain button. yourButton.setDisabled(true) (Don't forget to bind you button) – User404 Oct 16 '12 at 06:45

1 Answers1

0

Q1) set the disabled property of the splitter to true

<af:panelSplitter id="ps1" disabled="true" ... />

Q2) How about putting an information on the page so that the user can read on which page he is. For this you don't have to changes anything if another page has to add to the application. If you realy like to implement it with the button styles you can set an attribute in pageflow scope to the last clicked button id, then you set the disabled property of each button in the toolbar ro an EL like

disabled="#{pageFlowScope.lastButtonClicked eq 'ctb1'}"

Where ctb1 is the ID of the button. On the button ctb1 you add an

<af:setActionListener from="#{'cbt1'}" to ="#{pageFlowScope.lastbuttonClicked}"/>

Then you may need to add some partial triggers to see the result.

EDIT:

You can use the same techniqure to switch e.g. the background color of the button. For this you use the EL on the inlineStyle attribute of each button like:

inlineStyle="#{pageFlowScope.lastButtonClicked eq 'ctb1'?'background-color:Aqua;' :''}"

Then the last clicked button should come with Aqua background color.

UPDATE:

#{(sessionScope.teamPage eq 'MGRV')?'background-color:rgb(99,206,255); color:red; font-weight:bolder;':'background-color:transparent;'}
Timo Hahn
  • 2,466
  • 2
  • 19
  • 16
  • Hi... Thanks for the reply.I already set disable ="true" for panel splitter and it works.Thanks.. For command button, is it can if I want command button colour change after user click.since currently it disable only.Is it possible to do this? Thanks in advance. – Reena Sham Oct 17 '12 at 02:04
  • Thanks...it really help me.Button color is change but the font color not change.Here is the code that i put in the inlineStyle.#{(sessionScope.teamPage eq 'MGRV')?'background-color:rgb(99,206,255);color:red; font-weight:bolder;':'background-color:transparent;'} I want to change the font-color since when i disable the button,the font color become dull.Is it posibble? – Reena Sham Oct 18 '12 at 03:12
  • This should work. Your expression however needs a space between the background color and the font color. I added this to the answer for the better formatting. – Timo Hahn Oct 18 '12 at 06:58