cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling Add Content Dialog with property setting

slothrop
Champ in-the-making
Champ in-the-making
I would like to make a custom Add Content Dialog which does not allow the content to be added unless a boolean property is set to true.  I would like the checkbox to be initially set to false so the property cannot be constrained to be true but I don't want to proceed unless the user checks it.

If this is possible, which method do I need to override and how do I access the property.

Thanks.
6 REPLIES 6

ribz33
Champ on-the-rise
Champ on-the-rise
I think you need override AddContentDialog, in init you need to add :
showOtherProperties = false;

Dont forget to override add-content-dialog.jsp to use your custom bean

roman
Champ in-the-making
Champ in-the-making
Got problems with the Add Content Wizard.

My aim is to write a custom wizard which is kind a Add Content Wizard with extended functionality. but i would like to keep the standard Add Content wizard too.

i've read this threads:
http://forums.alfresco.com/viewtopic.php?p=34509#34509
http://forums.alfresco.com/viewtopic.php?t=944&highlight=addcontent

but i still don't know which is the right solution.

i need a method of resolution…
it's hurrying

thx in advance

ribz33
Champ on-the-rise
Champ on-the-rise
You need to create your own class which extends AddContentDialog or BaseContentWizard, it depends what you want to do…
Then in your own faces-config.xml you need to override <managed-bean-class> by your custom class in managed-bean AddContentDialog.
(take a look on faces-config-beans.xml)

Best regards.

roman
Champ in-the-making
Champ in-the-making
thanks a lot for your answer…

all that things i've already done.

if i'll call (perform an action 'startMyWizard') it works…
(the wizard starts and calls the defined jsp)

now i would like to use the code from the original add-content-dialog.jsp
but as a result i'll get only garbage…

i suppose i can't use the original code and got to write own…

please correct me if i'm wrong.

best regards

ribz33
Champ on-the-rise
Champ on-the-rise
It seems that there is no private method in AddContentDialog so you can extend this class and call methods from your custom class. To re-use this dialog you need to make your own dialog, i don't see other solution to do it.

bst regards.

roman
Champ in-the-making
Champ in-the-making
Like Metallica said:
SAD BUT TRUE  Smiley Very Happy

thanx a lot for your support

best regards
rome