how to push component state changes to multiple different pages using icefaces - icefaces

In my project i want to upload a image in one page(ie:in one view),after uploading the image event is generated and bean1 is executed.please provide a solution for updating the loaded image to another page(ie second view)in which i use GraphicImage component.how to refer second view components in bean1 without generating event from second view.
Is it possible to do ajax push using icefaces 1.8.2 as discussed above.

IceFaces uploads a file to a specific path, given by
{Application Root}/{Upload directory}/{Session ID}
The Upload Directory is specified in web.xml. The Session ID folder is optional, depending on whether you specified the "uniqueFolder" attribute in the tag. You can also set the upload path as an attribute in the tag.
You can store the file path in a String or in a session variable through actionListener for the inputFile.
To refer to this path String from Bean2 without using the backing bean, you can bind your components to "#{Bean1.pathString}". If you want to use the backing-bean, you can do:
((Bean1) geBean("Bean1")).getPathString()
but only if you extend from AbstractPageBean. Also, Bean1 should be session scoped for either case.

Related

get asset properties on htl page with asset path without using backend service in crx

I have an asset path, which contains an asset, which I want to display in the UI. I can display the image using the path. But I want to display asset properties like title and other metadata which are present in jcr:content under that asset path.
One way I'm aware of is to use backend service and adapt to the asset and fetch those properties and send it to html file. Is there any way I can directly fetch those details in html file itself without having to use backend service.
note: asset number can be very high, would it better to use the service itself.
It's best to use the (backend service) Asset APIs but you could also hack your way with just HTL if you know exactly the JCR node and property. data-sly-use allows specifying a JCR path to return the org.apache.sling.api.resource.Resource:
<sly data-sly-use.myImg="/content/dam/core-components-examples/library/adobe-logo.svg/jcr:content/metadata">${myImg.valueMap['dc:title']}</sly>
Example for asset title.
${item.metadata['dc:title']}

Why google search console need to verify dns txt?

First I build blog in hugo and deploy with netlify.
Verifying with file or txt, it isn't rendered in my case. I try to put content folder, also themes folder. So i found alternative way using google Web master center. And then, just add html tag. Finally, I got Verification completed. But, I can't use search console, yet. Because I'm not verified.
Why and How can correct?
If you want static content, rendered as-is, place it in Hugo's static directory and it will be added directly to the output public directory without alteration. Alternatively, you could use a meta tag to verify; just place that in your base layout; typically layouts/_default/baseofhtml.html

SAP UI5 embed manifest.json right

I just wrote the description file for my UI5 application.
Now I have these questions:
Where and how can I embed the manifest.json in my project correctly?
How can I test if it's working fine? (correctly embedded)
Is the "start_url": "" similar to initialPage of the index.html?
Many thanks for your guidance,
Chris
Usually, the manifest.json file (aka. "Application Descriptor") is put into the same folder as where the Component.js file is located. The component will look for the file name "manifest.json" in the same folder. If the descriptor is located somewhere else or has a different file name, assign the relative URL of the file to the manifestUrl in the component factory function like this, which is recommended to do so anyway because it ...
loads the descriptor file before creating the component (same as manifestFirst) allowing us to preload dependencies and model data to improve the initial loading time.
makes specifying the name of the component redundant.
You can either pass the name of the component or the URL of the descriptor file to load [the component] via the descriptor.
To see if the file is correctly embedded, run the app and see if e.g.
the rootView is loaded,
models (for example ResourceModel for i18n) are set to the component instance,
custom resources assigned to sap.ui5/resources are loaded, etc. etc..
→ Make sure to include (or in case of manifestFirst/ manifestUrl, don't be tempted to remove) manifest declaration in the component metadata.
The "start_url" is purely advisory and meant for the web standard rather than for UI5. It's telling the browser where to look for the initial page when the user starts the web app.
To learn more about the descriptor file, take a look at the developer guide such as "Descriptor for Applications" or as a summary, here.

New file in template is not accessed

I am trying to display results in a web page. I want to link this from the waterfall page of buildbot. But when I useclick , the required web page does not open. I have placed this new web page in the templates directory. Is there something more that needs to be done?
Since the results you want to display are produced by one of your builds,
the waterfall web templates are not relevant, since they are templates
for the whole waterfall, including all builds, whether or not they
are builds that produce these particular results.
If you wish to provide links to some files generated by a build, you select
a buildstep in the build, or create one for the purpose, that will provide
those links within its status box in the waterfall display (e.g. in the
way that a ShellCommand buildstep provides a link to its stdio log).
For example, you might just add a final step to the build with the description
Report or Publish.
You must write a customized BuildStep class to execute the step that you select
or create. Your customized BuildStep class must be derived from LoggingBuildStep,
or from a class, such as ShellCommand, that is already derived from LoggingBuildStep.
The necessary customization is to override the createSummary method with
your own implementation, and in that implementation call the addURL method to adds URL(s)
to the file(s) you want to publish to the buildstep's status box. You can add as
many URLs as you like. Here is an outline example:
class ReportingStep(ShellCommand):
...
command = ['upload','report',to','some','server']
...
def createSummary(self,log):
...
url = "url/to/the/report/on/the/server"
self.addURL("Report", url)
Now, when ReportingStep completes, its status box will contain
a link labelled Report to the report that the step has uploaded to the server.
Google "buildbot buildstep createSummary" for more leads.
What if my files are saved locally and for now I just want the user to have a link to download the zipped files?
From what I understand, the above customization will help provide an external url.
The user clicks a link that is served from your buildmaster. If your
build just saves these files locally, then they're saved on the buildslave.
So unless your buildslave is on the same machine as the buildmaster then the link has to be URL to an "external" file.
On the other hand, if your buildstep uploads the file to the buildmaster,
then the link can be a link to local file - local on the buildmaster, which
is serving the link.
If your buildslave is on the same machine as your buildmaster, then obviously
you don't need to do any uploading:
addURL("Report",file:///path/to/the/zipfile.zip)
But remember, if you want the content at these links to be persistent then
/path/to/the/zipfile.zip had better not be somewhere that gets clobbered
by every build.

How to Intercept image load requests in WebView?

Is it possible to intercept image load requests in WebView before they are actually started and modify their URLs?
For example, I have
mWebView.loadUrl(myUrl);
In onLoadResources event I can see URLs, but I can't modify them?
The thing is I am working on application that loads html content from remote location. For some reason author excluded image path and in img src he just have file name. Existing iPhone application is using this html content and I assume the content is build the way that is the best for iPhone. So, I need somehow to figure how to alter these paths. For example, if I choose to download all images first, I would need to alter path and add file:///... in front of image.jpg name.
Thanks.
you can use onLoadResource although are not only images but any resource loaded like javascript and css