Search the FirstSpirit Knowledge Base
Hello,
Using FS_REFERENCE name i have to get the name of the selected page.But it always shows undefined object?
Why this behavious is happening? I am working with FS4.2 version.
Error:
de.espirit.firstspirit.parser.eval.NullEnhancer$Null#getValue()
Form:
<FS_LIST name="stFilters" hFill="yes">
<DATASOURCE type="database" useLanguages="no">
<ACTIONS>
<ACTION name="ADD"/>
<ACTION name="NEW"/>
<ACTION name="REMOVE"/>
<ACTION name="UP"/>
<ACTION name="DOWN"/>
<ACTION name="COPY"/>
<ACTION name="DETACH"/>
<ACTION name="EDIT"/>
</ACTIONS>
<COLUMNS>
<COLUMN show="no">#identifier</COLUMN>
</COLUMNS>
<LAYOUT>
<ADD component="overview" constraint="center"/>
<ADD component="stackedview" constraint="bottom"/>
<ADD component="toolbar" constraint="top"/>
</LAYOUT>
<QUERY name="filter.filter_filter">
<PARAM name="clientID">bgn</PARAM>
<PARAM name="feedType">news</PARAM>
</QUERY>
<TABLE>filter.filter</TABLE>
</DATASOURCE>
<LANGINFOS>
<LANGINFO lang="*" label="verfügbare Filter"/>
<LANGINFO lang="EN" label="available Filters"/>
</LANGINFOS>
</FS_LIST>
<FS_REFERENCE name="stWCMSConfigurator" allowEmpty="no" hFill="yes" imagePreview="no" useLanguages="no">
<FILTER>
<ALLOW type="pageref"/>
</FILTER>
<LANGINFOS>
<LANGINFO lang="*" label="WCMS Configurator" description="TEXT"/>
<LANGINFO lang="DE" label="WCMS Konfigurator" description="TEXT"/>
</LANGINFOS>
<PROJECTS>
<LOCAL name=".">
<SOURCES>
<FOLDER name="root" store="sitestore"/>
</SOURCES>
</LOCAL>
</PROJECTS>
</FS_REFERENCE>
Template HTML Source:
$CMS_IF(!#global.preview)$
$-- get data from page --$
$CMS_SET(setPageData,stWCMSConfigurator.getPageRef().getPage().getFormData())$
$-- get wcms context --$
$CMS_SET(setContextRef,setPageData.get(#global.language,"ptWCMSContext").get())$
$CMS_SET(setContext,setContextRef.getValue().name)$
<span class="testing0" style="display:none">$CMS_VALUE(stWCMSConfigurator)$</span>
<span class="testing1" style="display:none">$CMS_VALUE(stWCMSConfigurator.getPageRef())$</span>
<span class="testing2" style="display:none">$CMS_VALUE(stWCMSConfigurator.getPageRef().getPage())$</span>
<span class="testing3" style="display:none">$CMS_VALUE(stWCMSConfigurator.getPageRef().getPage().getFormData())$</span>
<span class="testing4" style="display:none">$CMS_VALUE(setPageData.get(#global.language,"ptWCMSContext"))$</span>
<span class="testing5" style="display:none">$CMS_VALUE(setPageData.get(#global.language,"ptWCMSContext").get())$</span>
<span class="testing6" style="display:none">$CMS_VALUE(setPageData.get(#global.language,"ptWCMSContext").get().getValue())$</span>
<span class="lap_newsparams" style="display:none"></span>
<span class="lap_urlparams" style="display:none"></span>
<span class="lap_context" style="display:none">$CMS_VALUE(setContext,default:"news")$</span>
output:
Actual output value for lap_context is: news
Thank you.
Hi,
I'm not able to reproduce it. I used the exactly same FS_REFERENCE as in your example and I have a $CMS_VALUE(stWCMSConfigurator)$ in my template. After selecting a page within the FS_REFERENCE component, my output looks like [mithras_home:SITESTORE_LEAF]@21300751. I only get a [(undefined)]@54c89a0f if the FS_REFERENCE is empty.
Maybe your FS_REFERENCE is empty, too?
Best regards,
Donato
Hi,
I'm not able to reproduce it. I used the exactly same FS_REFERENCE as in your example and I have a $CMS_VALUE(stWCMSConfigurator)$ in my template. After selecting a page within the FS_REFERENCE component, my output looks like [mithras_home:SITESTORE_LEAF]@21300751. I only get a [(undefined)]@54c89a0f if the FS_REFERENCE is empty.
Maybe your FS_REFERENCE is empty, too?
Best regards,
Donato
Hello Siva,
do you need further help or did Donato's reply already help you? If so, it would be great if you marked his reply as "correct answer" so that other community users find the solution easily. If you have already found a solution by yourself, it would be very kind of you, if you posted it here.
Best regards
Tim
Hello Tim,
Thanks for your reply.I have in mind i have close it.But inplace update is going on for project(5.1 update).So time being delay in the implementation.But the problem is not yet resolved.We will take it up in the next spirint...So let it be open for some time...sure i will close if i get the solution..
Thank you.
Just edit and release the page again and redeploy the start page.Error gone.No "NullEnhancer Exception " gone.