Hi all,
You can easily use a List in struts2 select tag, but is there a way to use Map in tag?? If it is possible please provide a sample code...
thanx !
Is there a way to check if a template tag exists before using the template tag?
In other words, I would like to be able to do something like this:
{% load my_custom_tags %}
...
{% ifloaded my_custom_tags %}
{% some_custom_tag %}
{% endifloaded %}
I want to have a DropDown List / < Select HTML Tag behaviour with AutoComplete Feature using Twitter Bootstrap TypeAhead. The link here achieves the feature of Combo Box where user can provide his own input also. I want to restrict the User to select only from the option provided. Is there any way to tweek the Twitter Bootstrap TypeAhead Plugin to emulate the behaviour of DropDown List / Tag with Autocomplete Feature.
I have referred the Following question before posting
Adding a dropdown button to Twitter bootstrap typeahead component
Here is the email from the client explaining what he is trying to do,
we have spent hours trying to sort out this problem but cannot find a solution that works.
I am trying to correct a problem with
my blog and google “not found” URLs.
I thought it might be very simple to
correct (!ha!) This is my line of
code;
RewriteCond %{THE_REQUEST} ^www.uk-domestic-cleaning.com/wpblog/tag/?(.*)/HomeMaid%20Domestic%20Cleaning$
RewriteRule ^wpblog\/tag\/?(.*)\/HomeMaid%20Domestic%20Cleaning$ "http\:\/\/www\.uk\-domestic\-cleaning\.com\/wpblog\/tag\/$1" [R=301,L]
What I am trying to do is
any request to */wplog/tag/ “anything
here”/HomeMaid Domestic Cleaning To
strip the “HomeMaid Domestic Cleaning”
bit off the end, but leave the rest of
the request intact, which will then be
a valid request.
Any idea's guys?
I have a UIWebView and a UITextField for the url. Naturally, I want the textField to always show the current document url. This works fine for urls directly input in the field, but I also have some buttons attached to the view for reload, back, and forward.
So I've added all the UIWebViewDelegate methods to my controller, so it can listen to whenever the webView navigates and change the url in the textField as needed.
Here's how I'm using the shouldStartLoadWithRequest: method:
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
NSLog(@"navigated via %d", navigationType);
//loads the user cares about
if ( navigationType == UIWebViewNavigationTypeLinkClicked
|| navigationType == UIWebViewNavigationTypeBackForward ) {
//URL setting
[self setUrlQuietly:request.URL];
}
return YES;
}
Now, my problem here is that an actual click will generate a single navigation of type "LinkClicked" followed by a dozen type "Other" (redirects and ad loads I assume), which gets handled correctly by the code, but a back/forward action will generate all its requests as back/forward requests.
In other words, a click calls setUrlQuietly: once, but a back/forward calls it multiple times.
I am trying to use this method to determine if the user actually initiated the action (and I'd like to catch page redirects too). But if the method has no way of distinguishing between an actual "back" and a "load initiated as a result of a back", how can I make this assessment?
Without this, I am completely stumped as to how I can only show the actual url and not intermediate urls. Thank you!
Hello All,
I am wanting to rewrite a url like:
http://my.project/mydomain.com/ANY_NUMBER_OF_CATEGORIES/designer/4/designer-name/page.html
to this:
http://my.projects/mydomain.com/ANY_NUMBER_OF_CATEGORIES/page.html?designer=4
I would like to use mod-rewrite to accomplish this.
Things to note:
Any number of categories can be between 'mydomain.com/' and '/designer'. For instance the url could be http://my.project/mydomain.com/designer/4/designer-name/page.html or it could be http://my.project/mydomain.com/tops/shirts/small/designer/4/designer-name/page.html
A query string may be provided in the original url that needs to be preserved in the rewritten url.
For example url provided could be: http://my.project/mydomain.com/designer/4/designer-name/page.html?color=red&type=shirt
Given the url above the resulting url would need to be: http://my.projects/mydomain.com/page.html?designer=4&color=red&type=shirt
The order of the query string does not matter. The 'designer=4' part could come before or after the rest of the query string.
I'm new to .htaccess and re-writes so any examples and or explanations would be greatly appreciated. Thank you very much.
Hi all !
i have a code for get pagecontent from a URL
here is code !
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
public class GetPageFromURLAction extends Thread {
public String stringPageContent;
public String targerURL;
public String getPageContent(String targetURL) throws IOException {
String returnString="";
URL urlString = new URL(targetURL);
URLConnection openConnection = urlString.openConnection();
String temp;
BufferedReader in = new BufferedReader(new InputStreamReader(openConnection.getInputStream()));
while ((temp = in.readLine()) != null)
{
returnString += temp + "\n";
}
in.close();
// String nohtml = sb.toString().replaceAll("\\<.*?>","");
return returnString;
}
public String getStringPageContent() {
return stringPageContent;
}
public void setStringPageContent(String stringPageContent) {
this.stringPageContent = stringPageContent;
}
public String getTargerURL() {
return targerURL;
}
public void setTargerURL(String targerURL) {
this.targerURL = targerURL;
}
@Override
public void run() {
try {
this.stringPageContent=this.getPageContent(targerURL);
} catch (IOException e) {
e.printStackTrace();
}
}
}
The problem is :
1 Some time i receive a error lik 405 ,or 403 HTTP error ... and result string is null .
To repair i check permission to connect URL but it usualy return null
URLConnection openConnection = urlString.openConnection();
openConnection.getPermission(
)
is mean that i don't have permission to acess link ?
To get resultString without HTML Tag ? i do like that
String nohtml = sb.toString().replaceAll("\<.*?","");
Para sb is Stringbulder , but it can't remove all HTML Tab in string return ?
I use thread here because i must get page alot of url ,
so how can i cread a multi thread to impro speed of program !
Thanks
How do i set a tag for a button programmatically?
I later want to compare to tags for a conclusion
ive tried this
-(IBAction)buttonPressed:(id)sender{
NSLog(@"%d", [sender tag]);
}
but that just crashes the app.... :(
any other ideas?
Cheers Guys
Sam
hi,
I am creating a line in canvas tag using jquery drawing library. After the line drawn the
<div id="cool"><canvas id="canid"></canvas></div>
Then on click the below code executed.
$('#canid').remove();
What happens in IE after removing, dom with canvas end tag and also line is not removed.
Please help me out!.
Hi all
I have a sql query in formula tag inside property tag.
In that query i am creating alias name but the hibernate appends table name and throwing me error.
select sum(e.salary) as sal from employee e
but hibernate changes to
select sum(e.salary) as employee.sal from employee e
how to avoid this ....
it should recognise as sal inside of employee.sal !!!
when validating a site using w3c validator it tells me the tag is not valid markup. So i take it out and it works on safari/chrome but not firefox(3.5.x) but validates fine. Is there something in the tag i must add in order for firefox to display flash.
Hi all,
I am hoping that this is a simple issue with a simple solution and that I have missed something obvious. Let me explain the problem;
We have an application that generates PDF reports (using Jasper). These reports contain data from our database, as well as imagery (photographs). These photographs are stored in S3.
We use signed URLs to access these photographs. We link these photographs into our Jasper reports using these S3 URLs.
Because the S3 URLs are signed and time-limited (by design), the process is as follows;
User requests a report to be generated,
Report is filled, and goes to our database (at which time UUIDs to any required images are retrieved),
For each UUID an S3 signed URL must be generated,
To do this the URL behind each report image is a call to an authenticated URL in our app (/get_img?uuid=foo),
The controller behind this URL generates a signed S3 URL and returns it,
Reports loads the image.
The problem is with step (4) - the call to the authenticated URL fails because Jasper does not pass any authentication information with the request.
Is there a solution here?
Thanks all for your time.
Ben
Hi,
Just wondering if it's possible to pass a global javascript array value into a html tag, specifically inside a img (title) tag?
Basically want to know if I can do this:
<img src="_info.gif" height="26" width="37" title=myArray[5]/>
If so, how and if not, can people possibly provide other suggestions.
Thanks
I want to add a unique attribute say "ind" to every tag in the xml. How do i do it using xsl. It need'nt be a sequence number. As long it is unique for every tag it is sufficient.
Input:Some textSome other textSome other text
Expected output: Some textSome other textSome other text
Hi,
I want to attach a click event at the document level with
$(document).click();
And on clicking the element i would like to find out whether it is an anchor tag. If it is an anchor tag, then i will call a method to do something. How can that be done? Any idea?
Hi,
I am working on an iphone application in which I am consuming a webservice.
So i am parsing the XML file data. any idea about how to parse self closing tag
like: State/ and how to read data of self tag like: Contact Email="[email protected]" Name="PhD" Phone="123-521-3388" Source="location"/
I am parsing xml file using NSXMLPARSER class methods and library
Thanks,
hi all,
I am new to HTML 4 validations, in that if I put HEAD runat="server" tag
I am getting this error - Error Line 6, Column 82: character data is not allowed here
…lesheet" type="text/css" media="all" /
In the head tag I have called css files.
So if any one know about thin can help me,how to solve this error?
Thanks in advance.
In Display tag, on giving a property in the display:column tag, that property gets printed as a column. What should I do if we want to fix the table header as it's dont scroll with the column?
I would like to dump all css key/value pairs for an html tag.
In particular, I would like to learn the css properties for <audio> tag, so I can try to customize the look.
document.getElementById('myaudio').style returns a CSSStyleDeclaration object but length returns 0 and I cannot figure out to iterate over the key/value pairs.
Thank you
I have a custom template tag:
def uploads_for_user(user):
uploads = Uploads.objects.filter(uploaded_by=user, problem_upload=False)
num_uploads = uploads.count()
return num_uploads
and I'd like to do something like this, so I can pluralize properly:
{% with uploads_for_user leader as upload_count %}
{{ upload_count }} upload{{ upload_count|pluralize }}
{% endwith %}
However, uploads_for_user leader doesn't work in this context, because the 'with' tag expects a single value - Django returns:
TemplateSyntaxError at /upload/
u'with' expected format is 'value as name'
Any idea how I can get round this?
Hi How can I define and use in my phtml file custom tag block like this:
for example this tag create the list of all entries and show the title of them?
I read some AJAX-Form tutorial like this. The tag form is used in HTML code. However, I believed that it is not necessary. Since we send HTTP request through XmlHttpRequest, the sent data can be anything, not necessary input in form.
So, is there any reason to have form tag in HTML for AJAX application?
What's a possible way to use Spring Security tag <sec:authentication property="principal.id" /> as the value for the <c:set…> tag?
These statements:
<c:set var="userId" value="<sec:authentication property='principal.id' />"/>
<c:set var="userId" value="<sec:authentication property=\"principal.id\" />"/>
won't work.