cancel
Showing results for 
Search instead for 
Did you mean: 

display list constraint in space Wizard

yannicks
Champ in-the-making
Champ in-the-making
Hello,

Next to my post:

http://forums.alfresco.com/viewtopic.php?t=8155

I have a question!

How can I display a list with my constraint inside the space Wizards for the name part?

I think i have to play with the JSP files but i'm not sure at all!
and i can't find any documentation explicit enough! Maybe i'm not smart enoughSmiley Happy

thanks,

Yannick
6 REPLIES 6

gavinc
Champ in-the-making
Champ in-the-making
You're right, you will need to add some custom code to do this. At creation time the wizard has to be generic as it could be creating any type of space so constraints are not used.

You could customize the wizard however to make it use your constraint. Have a look at the wiki page for customising the create content wizard as that will give you some pointers on how to customise the space wizard: http://wiki.alfresco.com/wiki/Customising_The_Create_Content_Wizard

yannicks
Champ in-the-making
Champ in-the-making
Thanks for the answerSmiley Happy

yannicks
Champ in-the-making
Champ in-the-making
I've got one question

WHen i have to put the new configuration inside the web-client-config-custom.xml
it will look like this for a space


<config evaluator="string-compare" condition="Space Wizards">

</config>

but for a list of differents possible names of space what must i put?

Assume that the list name will be

part1
part2
part3

And i will only have that name…

Must i put it in the web client config custom

or direct in my bean code?

I hope i 'm clear enough!

Thanks for your answers,

Yannick

yannicks
Champ in-the-making
Champ in-the-making
I made all my files following the guide

but now i've got an error after deploying it and packaging like in http://wiki.alfresco.com/wiki/Packaging_And_Deploying_Extensions

and the error is that the bean is not defined…
org.alfresco.error.AlfrescoRuntimeException: Failed to start wizard as managed bean 'GreischCreateSpaceWizard' has not been defined
at org.alfresco.web.bean.wizard.WizardManager.setCurrentWizard(WizardManager.java:103)
at org.alfresco.web.app.AlfrescoNavigationHandler.handleWizardOpen(AlfrescoNavigationHandler.java:636)
at org.alfresco.web.app.AlfrescoNavigationHandler.handleNavigation(AlfrescoNavigationHandler.java:118)
at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:82)
at javax.faces.component.UICommand.broadcast(UICommand.java:109)
at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:97)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:171)
at org.apache.myfaces.lifecycle.InvokeApplicationExecutor.execute(InvokeApplicationExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:95)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:70)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:139)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.alfresco.web.app.servlet.AuthenticationFilter.doFilter(AuthenticationFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at java.lang.Thread.run(Thread.java:595)

I don't know why! i made it like in the guide to deploy!

Thanks for your help if somebody as an answerSmiley Happy

Yannick

yannicks
Champ in-the-making
Champ in-the-making
i forgot one xml part in my faces-config.xml -_-

Now i have another maybe simple problem!

in my .jsp

I want to make a condition about a custom spaceType

so in my condition i make

<condition if="#{CustomSpaceWizard.spaceType =='\{http://my\.custom\.model\}myCustomSpace}">

Is there anything wrong?

The webclient said
javax.faces.el.ReferenceSyntaxException: Invalid expression: '${GCreateSpaceWizard.spaceType == '\{http://www\.greisch\.com/custom/model/1\.0\}projectPhaseFolder'}'
caused by:
org.apache.commons.el.parser.ParseException: Encountered "\'\\{" at line 1, column 35.
Was expecting one of:
<INTEGER_LITERAL> …
<FLOATING_POINT_LITERAL> …
<STRING_LITERAL> …
"true" …
"false" …
"null" …
"(" …
"-" …
"not" …
"!" …
"empty" …
<IDENTIFIER> …

Can somebody please help!

Thanks for your answers,

Yannick

gavinc
Champ in-the-making
Champ in-the-making
This may be that the { character is invalid within JSF value binding expressions (even when they are escaped), one solution would be to do the check with a method in your custom bean that returns a boolean and then use that in the config i.e.

public boolean isCorrectSpaceType()
{
   return this.getSpaceType().equals("{http://my.custom.model}myCustomSpace}");
}

then in your config do:

<condition if="#{CustomSpaceWizard.correctSpaceType}" >