Issue: I am unable to access portlet action URL from within panel in my struts2 liferay portlet.
Description:
I need to access "var"
<portlet:actionURL var="Overview" ../>
from inside
<sj:tabbedpanel href=%{Overview}.../>
but I am unable to access it , it gives blank value!
options I have tried:
<sj:tab href=${Overview}..../>
It gave exception:"according to tld or attribute href, does not accept any expressions" ,
also tried <sj:tab href=%{#Overview}..../>
didnt gave any exception but it did not fetch any value either.
Please help!!
Related
I am using Orbeon Forms as my form builder. I have modified "submit" button of the Form Builder to have custom behaviors, please look at my snippet below:
<property as="xs:string" name="oxf.fr.detail.process.send.*.*">
save()
then send(
uri = "{xxf:property('ORBEON_API')}/api/submitForm",
replace = "none",
method = "POST",
content = "xml",
content-type = "application/xml",
nonrelevant = "keep",
serialization = "application/xml"
)
then set-workflow-stage(name = "submitted")
then success-message("save-success")
Now, I am trying to get response of the send() action but can't really find a document describing how to do this in Orbeon CE. I plan to receive an URI from this "{xxf:property('ORBEON_API')}/api/submitForm" so that I can use it to navigate to another page.
I found it is possible to store an Action's response into dataset using Action Settings in PE edition. Sadly, I am using the CE one.
My question is that: Is there a way/workaround for storing and manipulating Action's response in Orbeon CE? Any suggestions are much appreciated 👍.
Thanks in advance.
Currently, actions in processes can't return data, and this is really what you would want here (see #1688). However, send() stores the XML returned by your service in an instance called fr-send-submission-response. So you can access that instance and extract information returned by your service. From XPath, you'd use the following to access that instance:
xxf:instance('fr-send-submission-response')
For instance, the following will make a GET request on a URL that returns breakfast menu, and show the first item on the menu as the success message. (Yes, I know, this isn't a very realistic example! But at least it is one that anyone should be be able to run locally.)
<property as="xs:string" name="oxf.fr.detail.process.submit.*.*">
send(
method = "GET",
uri = "https://www.w3schools.com/XML/simple.xml",
replace = "instance"
)
then success-message(
message = "First item on the menu: {xxf:instance('fr-send-submission-response')/food[1]/name}"
)
</property>
The success message will show like:
I am using following spring security saml repo from github:
https://github.com/spring-projects/spring-security-saml/tree/master/sample
Whenever I try to update the SSO url, for e.g. localhost:8100/saml/ddo, instead of /saml/sso, browser gets stuck in infinite loops.
(I have followed the steps mentioned in readme and updated the url on okta as well in application to test)
Sample code and config enclosed in:
Spring secuirty saml issue
EDIT:
I did what below answer suggested,but I am getting the Incoming SAML message is invalid..
On debugging, I found that attemptAuthentication in SAMLProcessingFilter, the location in endpoint that are added still contain the /api/saml/SSO instead of /api/saml/ddo
and that's why getEndpoint method in SamlUtil throws excpetion with following line:
throw new SAMLException("Endpoint with message binding " + messageBinding + " and URL " + requestURL + " wasn't found in local metadata");
because the requestUrl and endpoint location do not match.
I also checked my metadata.xml but it does not contain any info related to these urls.
In the MetaDataGenerator class method getSAMLWebSSOProcessingFilterPath, the samlWebSSOFilter is null and that's why the default filter url: /saml/SSO is returned. I am trying to figure out how to set this value at runtime?
I understand that there is a method with name: setSamlWebSSOFilter, and everything works correct if I provide the url /saml/ddo at the time of startup. But I am not able to make this work if config is changed at runtime.
Any idea how can I move forward?
Setting field filterProcessesUrl on bean samlWebSSOProcessingFilter to value /saml/ddo should solve the problem.
I installed ERP "Openbravo" following the custom approach:
So I followed the steps from the tutorial.I set "localhost" for the parameter "Web URL" in the configuration file. After that I ran the servers, Apache and Tomcat.
When accessing the application via browser using http://localhost/openbravo
The problem I am facing is that,the browser doesn't find some components.
I got this log in console of Google-chrome like this:
Login_F1.html:11 GET http://localhost/openbravo/security/localhost/js/ajax.js 404 (Not Found)
When i try to accede to the previous url in a new tab i got "not found",
but when i change by this URL "http://localhost/openbravo/web/js/utils.js" works well.
My question is that how i can make Openbravo generate "/web/" instead "/security/localhost/".
If you look at Openbravo.properties file
.....
//Static content URL. Use the default value to make it dynamic.
//Don't change this unless you know what you are doing
web.url=#actual_url_context#/web
// Full URL of the context, *only* used by the Web Services installation
and diagnostic task
context.url=http://localhost:8080/openbravo
.....
#actual_url_context# will get replaced by domain name with port number and application context name (for example: mydomain:8989/openbravo)
404 is due to application is not able to locate ajax.js under
../web/ajax.js
1 ==> To fix the issue you can just restore to #actual_url_context# and perform smartbuild.
or do an install.source
2 ==> To add any client side customization or to support static content under web folder you can follow
an example: http://wiki.openbravo.com/wiki/How_to_add_a_button_to_the_toolbar
http://wiki.openbravo.com/wiki/How_to_create_a_Manual_UI_Process
I am using the following code in my logout button :
<a id="login-control-logout" href="${createLink(controller:'LicGenerator', action:'logout')}"><i class="icon-off"></i> Logout</a></li>
Inside my controller, I am using the following code :
def logout() {
request.getSession().invalidate()
response.setHeader("Cache-Control","no-cache,no-store,must-revalidate")
response.setHeader("Pragma","no-cache")
response.setDateHeader("Expires", 0)
redirect(uri:'/login.html')
}
It goes to login.html, but when I enter the username and password again, it doesn't log me back in and throws an error
type Status report
message /LicGenerator/j_security_check
description The requested resource (/LicGenerator/j_security_check) is not available.
When I refresh the browser, I got this error :
type Status report
message Invalid direct reference to form login page
description The request sent by the client was syntactically incorrect (Invalid direct reference to form login page).
Also, the back button takes me to page even though I added cache control to response.
Simply invalidating your session for spring security is probably not advisable. As there is a SecuritySession which also has cookies. It may be better to use whats provided by spring security already.
import grails.plugin.springsecurity.SpringSecurityUtils
redirect uri: SpringSecurityUtils.securityConfig.logout.filterProcessesUrl
Then you can configure your default login url via the config options for the spring security plugin
I'm use Yii Framework.
I have a named anchor <a name="projet">projet</a> in about.php page.
I've created a link in the index page to the named anchor in the about page like that :
<?php echo CHtml::link('MyLink',array('site/page','view'=>'about#projet')); ?>
But when I click on the link "MyLink", I have an error 404 response with this message :
The requested view "about#projet" was not found.
And in the url I have:
localhost/myApps/index.php?r=site/page&view=about%23projet
I checked default charset application is UTF-8. So I don't understand why my link isn't well encoded.
Someone can help me please?
try this:
echo CHtml::link('MyLink',array('site/page','view'=>'about', '#'=>'projet'));